mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-09 06:46:34 +01:00
bump to 41 and fix color on screensaver
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
HMI/nspanel.HMI
BIN
HMI/nspanel.HMI
Binary file not shown.
BIN
HMI/nspanel.tft
BIN
HMI/nspanel.tft
Binary file not shown.
@@ -142,24 +142,22 @@ class LuiPagesGen(object):
|
|||||||
up = name if name is not None else entity.attributes.friendly_name
|
up = name if name is not None else entity.attributes.friendly_name
|
||||||
icon = get_icon_id_ha("sensor", state=entity.state, device_class=entity.attributes.get("device_class", ""), overwrite=icon)
|
icon = get_icon_id_ha("sensor", state=entity.state, device_class=entity.attributes.get("device_class", ""), overwrite=icon)
|
||||||
if "color" in wOF:
|
if "color" in wOF:
|
||||||
theme = {}
|
if theme is None:
|
||||||
shift = int(self._config._config_screensaver.raw_config.get("alternativeLayout", False))
|
theme = {}
|
||||||
overwrite = wOF.get("color")
|
color = wOF.get("color")
|
||||||
if type(overwrite) is list:
|
if type(color) is dict:
|
||||||
color = overwrite
|
for overwrite_state, overwrite_val in color.items():
|
||||||
if type(overwrite) is dict:
|
if overwrite_state == entity.state:
|
||||||
state = entity.state
|
|
||||||
for overwrite_state, overwrite_val in overwrite.items():
|
|
||||||
if overwrite_state == state:
|
|
||||||
color = overwrite_val
|
color = overwrite_val
|
||||||
if i+shift == 1:
|
if i == 1:
|
||||||
theme["tF1Icon"] = color
|
theme["tF1Icon"] = color
|
||||||
elif i+shift == 2:
|
elif i == 2:
|
||||||
theme["tF2Icon"] = color
|
theme["tF2Icon"] = color
|
||||||
elif i+shift == 3:
|
elif i == 3:
|
||||||
theme["tF3Icon"] = color
|
theme["tF3Icon"] = color
|
||||||
elif i+shift == 4:
|
elif i == 4:
|
||||||
theme["tF4Icon"] = color
|
theme["tF4Icon"] = color
|
||||||
|
|
||||||
unit_of_measurement = entity.attributes.get("unit_of_measurement", "")
|
unit_of_measurement = entity.attributes.get("unit_of_measurement", "")
|
||||||
down = f"{entity.state} {unit_of_measurement}"
|
down = f"{entity.state} {unit_of_measurement}"
|
||||||
weather_res+=f"~{up}~{icon}~{down}"
|
weather_res+=f"~{up}~{icon}~{down}"
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ class NsPanelLovelaceUIManager(hass.Hass):
|
|||||||
|
|
||||||
controller = LuiController(self, cfg, send_mqtt_msg)
|
controller = LuiController(self, cfg, send_mqtt_msg)
|
||||||
|
|
||||||
desired_display_firmware_version = 40
|
desired_display_firmware_version = 41
|
||||||
version = "v3.3.0"
|
version = "v3.3.1"
|
||||||
|
|
||||||
model = cfg.get("model")
|
model = cfg.get("model")
|
||||||
if model == "us-l":
|
if model == "us-l":
|
||||||
|
|||||||
Reference in New Issue
Block a user