Madelena / Metrology-for-Hass

🎨 Give your Home Assistant a modern and clean facelift. 🟥🟧🟩🟦🟪 24 Variations with 2 Styles + 6 Colors (Magenta Red / Orange / Green / Blue / Purple) + 🌞 Light and 🌚 Dark modes included. Based on Metro and Fluent UI Design Systems from Microsoft Windows.
https://community.home-assistant.io/t/metrology-metro-fluent-windows-themes-for-home-assistant/
564 stars 30 forks source link

Theme causes Safe Mode in 2022.8.0b0 #37

Closed iridris closed 2 years ago

iridris commented 2 years ago

Using the Metrology theme caused HA to go into safe mode when upgrading to 2022.8.0b0.

2022-07-27 11:27:16.447 ERROR (SyncWorker_0) [homeassistant.util.yaml.loader] while constructing a mapping
in "/config/themes/metro.yaml", line 645, column 7
expected a mapping or list of mappings for merging, but found scalar
in "/config/themes/metro.yaml", line 633, column 11
2022-07-27 11:27:16.449 ERROR (MainThread) [homeassistant.bootstrap] Failed to parse configuration.yaml: while constructing a mapping
in "/config/themes/metro.yaml", line 645, column 7
expected a mapping or list of mappings for merging, but found scalar
in "/config/themes/metro.yaml", line 633, column 11. Activating safe mode

This was initially reported as a Core issue but was determined to be a theme issue. Core issue with information about what is triggering this is here: https://github.com/home-assistant/core/issues/75847

Madelena commented 2 years ago

There's a code typo as pointed out by @frenck. Thanks for testing it and letting me know. I'll push a new fix.

Madelena commented 2 years ago

May I ask how you downloaded the theme?

I just downloaded the 1.6.2 prerelease and checked, but the buggy lines that @frenck pointed out had already been removed: image

frenck commented 2 years ago

It's on the main branch (right now).

image

Madelena commented 2 years ago

Should be fine now that the code for the bug fixes has merged with the main branch.

iridris commented 2 years ago

When this issue occurred, I had the theme manually installed from the main branch. I've now switched over to using HACS to install this. I've installed version 1.6.2 via HACS and restarted Core successfully without issue. Thanks!

Madelena commented 2 years ago

@iridris Awesome! I'm glad the bug is fixed. Thanks for testing this. :)