diff --git a/README.md b/README.md index d4ae9f25..6d47e2af 100644 --- a/README.md +++ b/README.md @@ -498,7 +498,7 @@ key | option | type | default | description `tMainTextAlt` | True | list | White | `[R, G, B]` `tMRIcon` | True | list | White | `[R, G, B]` `tMR` | True | list | White | `[R, G, B]` -`AutoWeather` | True | string | None | Set to `auto` to enable weather icons to change depending on state e.g. blue for rainy. Any custom colors in `tMainIcon` `tF1Icon` `tF2Icon` `tF3Icon` `tF4Icon` take precedence +`autoWeather` | True | string | None | Set to `true` to enable weather icons to change depending on state e.g. blue for rainy. Any custom colors in `tMainIcon` `tF1Icon` `tF2Icon` `tF3Icon` `tF4Icon` take precedence. Specify colours as red green and blue values from 0-255 e.g. `[255, 0, 0]` for red or `[0, 0, 255]` for blue. These are translated internally to RGB565 (note that this has lower color depth so the colours may not appear the same). Also note that the screen has a low contrast ratio, so colors look sigificantly different at full display brightness and lowest brightness. diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index 45f00a59..c23df52f 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -130,7 +130,7 @@ class LuiPagesGen(object): # send color if configured in screensaver if theme is not None: - if not ("AutoWeather" in theme and theme["AutoWeather"] == "auto"): + if not ("autoWeather" in theme and theme["autoWeather"]): state = None self._send_mqtt_msg(get_screensaver_color_output(theme=theme, state=state)) diff --git a/apps/nspanel-lovelace-ui/luibackend/theme.py b/apps/nspanel-lovelace-ui/luibackend/theme.py index a7de37d2..33ff7b10 100644 --- a/apps/nspanel-lovelace-ui/luibackend/theme.py +++ b/apps/nspanel-lovelace-ui/luibackend/theme.py @@ -65,7 +65,7 @@ def map_color(key, theme, state=None): return config_color def map_weather_icon_color(key, state): - if state[key] in default_weather_icon_color_mapping: + if 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"