mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-01-07 07:05:48 +01:00
Update pages.py
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user