mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-20 14:37:01 +01:00
add icon #393
This commit is contained in:
@@ -93,6 +93,8 @@ def map_to_mdi_name(ha_type, state=None, device_class="_", cardType=None):
|
||||
return "lightbulb"
|
||||
elif ha_type == "fan":
|
||||
return "fan"
|
||||
elif ha_type == "vacuum":
|
||||
return "robot-vacuum"
|
||||
elif ha_type == "input_boolean":
|
||||
return "check-circle-outline" if state == "on" else "close-circle-outline"
|
||||
elif ha_type == "cover":
|
||||
|
||||
@@ -301,7 +301,7 @@ class LuiPagesGen(object):
|
||||
text = entity.state
|
||||
return f"~button~{entityId}~{icon_id}~17299~{name}~{text}"
|
||||
if entityType == "vacuum":
|
||||
icon_id = get_icon_id_ha("robot-vacuum", state=entity.state, overwrite=icon)
|
||||
icon_id = get_icon_id_ha("vacuum", state=entity.state, overwrite=icon)
|
||||
if entity.state == "docked":
|
||||
text = "Start"
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user