mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-20 14:37:01 +01:00
fixes #1369
This commit is contained in:
@@ -309,6 +309,11 @@ class LuiPagesGen(object):
|
|||||||
unit_of_measurement = entity.attributes.get("unit_of_measurement", "")
|
unit_of_measurement = entity.attributes.get("unit_of_measurement", "")
|
||||||
value = entity.state
|
value = entity.state
|
||||||
|
|
||||||
|
try:
|
||||||
|
value = str(round(float(value), 1))
|
||||||
|
except:
|
||||||
|
print("An exception occurred")
|
||||||
|
|
||||||
# limit value to 4 chars on us-p
|
# limit value to 4 chars on us-p
|
||||||
if self._config.get("model") == "us-p" and cardType == "cardEntities":
|
if self._config.get("model") == "us-p" and cardType == "cardEntities":
|
||||||
value = entity.state[:4]
|
value = entity.state[:4]
|
||||||
|
|||||||
Reference in New Issue
Block a user