popupShutter now also respects device_class

generate_shutter_detail_page() now respects device_class and fetches the appropriate icon
This commit is contained in:
illuzn
2022-05-22 21:14:28 +09:30
committed by GitHub
parent 8f934a0e90
commit 7e9578f72f

View File

@@ -426,7 +426,8 @@ class LuiPagesGen(object):
def generate_shutter_detail_page(self, entity): def generate_shutter_detail_page(self, entity):
entity = self._ha_api.get_entity(entity) entity = self._ha_api.get_entity(entity)
icon_id = get_icon_id_ha("cover", state=entity.state) device_class = entity.attributes.get("device_class", "")
icon_id = get_icon_id_ha("cover", state=entity.state, device_class=device_class)
pos = entity.attributes.get("current_position") pos = entity.attributes.get("current_position")
if pos is None: if pos is None: