mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-24 00:14:26 +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
|
||||
elif state is not None:
|
||||
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
|
||||
|
||||
def map_weather_icon_color(key, state):
|
||||
if key in state and state[key] in default_weather_icon_color_mapping:
|
||||
def map_weather_icon_color(key, theme, state):
|
||||
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]]
|
||||
else:
|
||||
config_color = "65535"
|
||||
|
||||
Reference in New Issue
Block a user