Update pages.py

This commit is contained in:
joBr99
2023-01-30 17:18:20 +01:00
committed by GitHub
parent f7a542c1f8
commit 48979fdc65

View File

@@ -288,7 +288,7 @@ class LuiPagesGen(object):
entityTypePanel = "text" entityTypePanel = "text"
device_class = entity.attributes.get("device_class", "") device_class = entity.attributes.get("device_class", "")
unit_of_measurement = entity.attributes.get("unit_of_measurement", "") unit_of_measurement = entity.attributes.get("unit_of_measurement", "")
value = entity.state + " " + unit_of_measurement value = entity.state + unit_of_measurement
if entityType == "binary_sensor": if entityType == "binary_sensor":
value = get_translation(self._locale, f"backend.component.binary_sensor.state.{device_class}.{entity.state}") 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: if cardType == "cardGrid" and entityType == "sensor" and icon is None: