mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-24 00:14:26 +01:00
implement value override on cardpower
This commit is contained in:
@@ -635,7 +635,12 @@ class LuiPagesGen(object):
|
||||
speed = str(item.entity_input_config.get("speed", 1))
|
||||
speed = apis.ha_api.render_template(speed)
|
||||
unit = get_attr_safe(entity, "unit_of_measurement", "")
|
||||
command += f"~{icon_color}~{icon}~{speed}~{entity.state} {unit}"
|
||||
value = f"{entity.state} {unit}"
|
||||
# Overwrite for value
|
||||
ovalue = item.value
|
||||
if ovalue is not None:
|
||||
value = apis.ha_api.render_template(ovalue)
|
||||
command += f"~{icon_color}~{icon}~{speed}~{value}"
|
||||
elif item.entityId == "delete":
|
||||
command += f"~~~~"
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user