mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-15 17:36:59 +01:00
Enable Override of autoWeather Default Colors
This commit is contained in:
@@ -61,11 +61,13 @@ def map_color(key, theme, state=None):
|
|||||||
# Use Autocolouring for weather
|
# Use Autocolouring for weather
|
||||||
elif state is not None:
|
elif state is not None:
|
||||||
if key in ["tMainIcon", "tF1Icon", "tF2Icon", "tF3Icon", "tF4Icon"]:
|
if key in ["tMainIcon", "tF1Icon", "tF2Icon", "tF3Icon", "tF4Icon"]:
|
||||||
config_color = map_weather_icon_color(key=key, state=state)
|
config_color = map_weather_icon_color(key=key, theme=theme, state=state)
|
||||||
return config_color
|
return config_color
|
||||||
|
|
||||||
def map_weather_icon_color(key, state):
|
def map_weather_icon_color(key, theme, state):
|
||||||
if key in state and state[key] in default_weather_icon_color_mapping:
|
if key in state and state[key] in theme:
|
||||||
|
config_color = rgb_dec565(theme[state[key]])
|
||||||
|
elif key in state and state[key] in default_weather_icon_color_mapping:
|
||||||
config_color = default_weather_icon_color_mapping[state[key]]
|
config_color = default_weather_icon_color_mapping[state[key]]
|
||||||
else:
|
else:
|
||||||
config_color = "65535"
|
config_color = "65535"
|
||||||
|
|||||||
Reference in New Issue
Block a user