Update pages.py

This commit is contained in:
illuzn
2022-05-22 15:34:24 +09:30
committed by GitHub
parent c1757cc78c
commit f93d0d50b4

View File

@@ -143,7 +143,7 @@ class LuiPagesGen(object):
entity = self._ha_api.get_entity(entityId) entity = self._ha_api.get_entity(entityId)
name = name if name is not None else entity.attributes.friendly_name name = name if name is not None else entity.attributes.friendly_name
if entityType == "cover": if entityType == "cover":
icon_id = get_icon_id_ha("cover", state=entity.state, device_class=entity.attributes.get("device_class", ""), overwrite=icon) icon_id = get_icon_id_ha("cover", state=entity.state, device_class=entity.attributes.get("device_class"), overwrite=icon)
pos = int(entity.attributes.get("current_position", 50)) pos = int(entity.attributes.get("current_position", 50))
if pos == 100: if pos == 100:
status = "0|1" status = "0|1"