mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-22 15:34:26 +01:00
Update pages.py
This commit is contained in:
@@ -172,7 +172,7 @@ class LuiPagesGen(object):
|
|||||||
status_entity = self._ha_api.get_entity(item.status)
|
status_entity = self._ha_api.get_entity(item.status)
|
||||||
icon_color = self.get_entity_color(status_entity)
|
icon_color = self.get_entity_color(status_entity)
|
||||||
if item.status.startswith("sensor") and cardType == "cardGrid":
|
if item.status.startswith("sensor") and cardType == "cardGrid":
|
||||||
icon_id = status_entity.state[:3]
|
icon_id = status_entity.state[:4]
|
||||||
if icon_id[-1] == ".":
|
if icon_id[-1] == ".":
|
||||||
icon_id = icon_id[:-1]
|
icon_id = icon_id[:-1]
|
||||||
else:
|
else:
|
||||||
@@ -236,7 +236,7 @@ class LuiPagesGen(object):
|
|||||||
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 cardType == "cardGrid" and entityType == "sensor":
|
if cardType == "cardGrid" and entityType == "sensor":
|
||||||
icon_id = entity.state[:3]
|
icon_id = entity.state[:4]
|
||||||
if icon_id[-1] == ".":
|
if icon_id[-1] == ".":
|
||||||
icon_id = icon_id[:-1]
|
icon_id = icon_id[:-1]
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user