From 7e9578f72faaa9dfcdb3984e23e9024e2cda8a8c Mon Sep 17 00:00:00 2001 From: illuzn <57167030+illuzn@users.noreply.github.com> Date: Sun, 22 May 2022 21:14:28 +0930 Subject: [PATCH] popupShutter now also respects device_class generate_shutter_detail_page() now respects device_class and fetches the appropriate icon --- apps/nspanel-lovelace-ui/luibackend/pages.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index f1a09cc5..4213c249 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -426,7 +426,8 @@ class LuiPagesGen(object): def generate_shutter_detail_page(self, 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") if pos is None: