mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-20 14:37:01 +01:00
@@ -498,7 +498,7 @@ key | option | type | default | description
|
|||||||
`tMainTextAlt` | True | list | White | `[R, G, B]`
|
`tMainTextAlt` | True | list | White | `[R, G, B]`
|
||||||
`tMRIcon` | True | list | White | `[R, G, B]`
|
`tMRIcon` | True | list | White | `[R, G, B]`
|
||||||
`tMR` | 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.
|
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.
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ class LuiPagesGen(object):
|
|||||||
|
|
||||||
# send color if configured in screensaver
|
# send color if configured in screensaver
|
||||||
if theme is not None:
|
if theme is not None:
|
||||||
if not ("AutoWeather" in theme and theme["AutoWeather"] == "auto"):
|
if not ("autoWeather" in theme and theme["autoWeather"]):
|
||||||
state = None
|
state = None
|
||||||
self._send_mqtt_msg(get_screensaver_color_output(theme=theme, state=state))
|
self._send_mqtt_msg(get_screensaver_color_output(theme=theme, state=state))
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ def map_color(key, theme, state=None):
|
|||||||
return config_color
|
return config_color
|
||||||
|
|
||||||
def map_weather_icon_color(key, state):
|
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]]
|
config_color = default_weather_icon_color_mapping[state[key]]
|
||||||
else:
|
else:
|
||||||
config_color = "65535"
|
config_color = "65535"
|
||||||
|
|||||||
Reference in New Issue
Block a user