mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Fix theme color (#31366)
This commit is contained in:
parent
f5b790054a
commit
3f9dbe6845
@ -342,10 +342,12 @@ def _async_setup_themes(hass, themes):
|
|||||||
"""Update theme_color in manifest."""
|
"""Update theme_color in manifest."""
|
||||||
name = hass.data[DATA_DEFAULT_THEME]
|
name = hass.data[DATA_DEFAULT_THEME]
|
||||||
themes = hass.data[DATA_THEMES]
|
themes = hass.data[DATA_THEMES]
|
||||||
if name != DEFAULT_THEME and PRIMARY_COLOR in themes[name]:
|
MANIFEST_JSON["theme_color"] = DEFAULT_THEME_COLOR
|
||||||
MANIFEST_JSON["theme_color"] = themes[name][PRIMARY_COLOR]
|
if name != DEFAULT_THEME:
|
||||||
else:
|
MANIFEST_JSON["theme_color"] = themes[name].get(
|
||||||
MANIFEST_JSON["theme_color"] = DEFAULT_THEME_COLOR
|
"app-header-background-color",
|
||||||
|
themes[name].get(PRIMARY_COLOR, DEFAULT_THEME_COLOR),
|
||||||
|
)
|
||||||
hass.bus.async_fire(
|
hass.bus.async_fire(
|
||||||
EVENT_THEMES_UPDATED, {"themes": themes, "default_theme": name}
|
EVENT_THEMES_UPDATED, {"themes": themes, "default_theme": name}
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user