From 3b7771103b868d9db3d10fbadbea16553ee6ebcb Mon Sep 17 00:00:00 2001 From: Johannes <29555657+joBr99@users.noreply.github.com> Date: Mon, 30 Jan 2023 20:17:43 +0100 Subject: [PATCH] Update pages.py --- apps/nspanel-lovelace-ui/luibackend/pages.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/nspanel-lovelace-ui/luibackend/pages.py b/apps/nspanel-lovelace-ui/luibackend/pages.py index f6b7db92..46df1983 100644 --- a/apps/nspanel-lovelace-ui/luibackend/pages.py +++ b/apps/nspanel-lovelace-ui/luibackend/pages.py @@ -288,7 +288,10 @@ class LuiPagesGen(object): entityTypePanel = "text" device_class = entity.attributes.get("device_class", "") unit_of_measurement = entity.attributes.get("unit_of_measurement", "") - value = entity.state + unit_of_measurement + value = entity.state + if device_class != "temperature": + value = value + " " + value = value + unit_of_measurement if entityType == "binary_sensor": value = get_translation(self._locale, f"backend.component.binary_sensor.state.{device_class}.{entity.state}") if cardType == "cardGrid" and entityType == "sensor" and icon is None: