diff --git a/HMI/code_gen/pages/cardEntitiesSerial.py b/HMI/code_gen/pages/cardEntitiesSerial.py index f5019910..17d62809 100644 --- a/HMI/code_gen/pages/cardEntitiesSerial.py +++ b/HMI/code_gen/pages/cardEntitiesSerial.py @@ -110,7 +110,7 @@ for i in range(1,5): covx tTmp.txt,sys0,0,0 btOnOff{i}.val=sys0 }} - if(type{i}.txt=="text") + if(type{i}.txt=="text"||type{i}.txt=="timer") {{ vis bUp{i},0 vis bStop{i},0 @@ -125,7 +125,7 @@ for i in range(1,5): // get Text (optional Value) spstr strCommand.txt,bText{i}.txt,"~",{idxstart+5} }} - if(type{i}.txt=="button"||type{i}.txt=="input_sel"||type{i}.txt=="timer") + if(type{i}.txt=="button"||type{i}.txt=="input_sel") {{ vis bUp{i},0 vis bStop{i},0 diff --git a/HMI/nspanel.HMI b/HMI/nspanel.HMI index 306c8c4d..ee6c2f5e 100644 Binary files a/HMI/nspanel.HMI and b/HMI/nspanel.HMI differ diff --git a/HMI/nspanel.tft b/HMI/nspanel.tft index 912a705c..9d49adf7 100644 Binary files a/HMI/nspanel.tft and b/HMI/nspanel.tft differ diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index f53fbd69..87588b34 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -36,7 +36,7 @@ class LuiPagesGen(object): attr = entity.attributes default_color_on = rgb_dec565([253, 216, 53]) default_color_off = rgb_dec565([68, 115, 158]) - icon_color = default_color_on if entity.state in ["on", "unlocked", "above_horizon", "home"] else default_color_off + icon_color = default_color_on if entity.state in ["on", "unlocked", "above_horizon", "home", "active"] else default_color_off if ha_type == "alarm_control_panel": if entity.state == "disarmed": @@ -374,7 +374,7 @@ class LuiPagesGen(object): value += f"\r\n{currently_tanslation}: {current_temperature}{temperature_unit}" elif entityType == "timer": entityTypePanel = "timer" - value = entity.state + value = get_translation(self._locale, f"backend.component.timer.state._.{entity.state}") else: name = "unsupported" return f"~{entityTypePanel}~{entityId}~{icon_id}~{color}~{name}~{value}" @@ -853,7 +853,7 @@ class LuiPagesGen(object): if isinstance(entity_id, dict): entity_id = entity_id["entity_id"] entity = apis.ha_api.get_entity(entity_id) - icon_color = 0 + icon_color = self.get_entity_color(entity) if entity.state in ["idle", "paused"]: editable = 1 if entity.state == "paused":