change timer from button to text

This commit is contained in:
joBr99
2022-12-21 07:05:36 +01:00
parent 4ed266141f
commit d6a8043261
4 changed files with 5 additions and 5 deletions

View File

@@ -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

Binary file not shown.

Binary file not shown.

View File

@@ -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":