This commit is contained in:
Johannes
2022-08-09 18:40:46 +02:00
parent 328cf1d8a0
commit 09ef8c28c8
2 changed files with 3 additions and 1 deletions

View File

@@ -93,6 +93,8 @@ def map_to_mdi_name(ha_type, state=None, device_class="_", cardType=None):
return "lightbulb" return "lightbulb"
elif ha_type == "fan": elif ha_type == "fan":
return "fan" return "fan"
elif ha_type == "vacuum":
return "robot-vacuum"
elif ha_type == "input_boolean": elif ha_type == "input_boolean":
return "check-circle-outline" if state == "on" else "close-circle-outline" return "check-circle-outline" if state == "on" else "close-circle-outline"
elif ha_type == "cover": elif ha_type == "cover":

View File

@@ -301,7 +301,7 @@ class LuiPagesGen(object):
text = entity.state text = entity.state
return f"~button~{entityId}~{icon_id}~17299~{name}~{text}" return f"~button~{entityId}~{icon_id}~17299~{name}~{text}"
if entityType == "vacuum": 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": if entity.state == "docked":
text = "Start" text = "Start"
else: else: