fix entities without name

This commit is contained in:
Johannes
2022-07-30 21:59:56 +02:00
parent 6c3049493e
commit e72014e60e

View File

@@ -205,7 +205,7 @@ class LuiPagesGen(object):
if item.condStateNot is not None and item.condState != entity.state: if item.condStateNot is not None and item.condState != entity.state:
return "" return ""
name = name if name is not None else entity.attributes.friendly_name name = name if name is not None else entity.attributes.get("friendly_name","unknown")
if entityType == "cover": if entityType == "cover":
device_class = entity.attributes.get("device_class", "window") device_class = entity.attributes.get("device_class", "window")