From ad4aec2e336f36d81dc73f2a8d609afa22b4ff27 Mon Sep 17 00:00:00 2001 From: Johannes Date: Tue, 31 May 2022 20:56:51 +0200 Subject: [PATCH] do not replace icon with sensor value on binary_sensors --- apps/nspanel-lovelace-ui/luibackend/pages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index 71e28e5c..f129e348 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -215,7 +215,7 @@ class LuiPagesGen(object): device_class = entity.attributes.get("device_class", "") unit_of_measurement = entity.attributes.get("unit_of_measurement", "") value = entity.state + " " + unit_of_measurement - if cardType == "cardGrid": + if cardType == "cardGrid" and entityType == "sensor": icon_id = entity.state[:4] if icon_id[-1] == ".": icon_id = icon_id[:-1]