mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-19 22:24:15 +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", "")
|
||||
value = entity.state
|
||||
|
||||
try:
|
||||
value = str(round(float(value), 1))
|
||||
except:
|
||||
print("An exception occurred")
|
||||
|
||||
# limit value to 4 chars on us-p
|
||||
if self._config.get("model") == "us-p" and cardType == "cardEntities":
|
||||
value = entity.state[:4]
|
||||
|
||||
Reference in New Issue
Block a user