change override config format

This commit is contained in:
joBr99
2022-03-22 22:11:08 +01:00
committed by GitHub
parent 9614b61695
commit d236ffec59
2 changed files with 5 additions and 5 deletions

View File

@@ -320,8 +320,8 @@ Only the icons listed in the [Icon Table](HMI#icons-ids) are useable.
items:
- light.wled
- light.schreibtischlampe
- item: switch.deckenbeleuchtung_hinten
icon: lightbulb
- switch.deckenbeleuchtung_hinten:
icon: lightbulb
- delete
- delete
- type: cardMedia

View File

@@ -148,7 +148,7 @@ class LovelaceUIPanel:
for item in items:
# in case item is a dict, grab the item name
if type(item) is dict:
cleaned_list.append(item["item"])
cleaned_list.append(next(iter(item)))
else:
cleaned_list.append(item)
return cleaned_list
@@ -443,8 +443,8 @@ class LovelaceUIPanel:
def generate_entities_item(self, item):
icon = None
if type(item) is dict:
icon = item["icon"]
item = item["item"]
icon = next(iter(item.items()))[1]['icon']
item = next(iter(item.items()))[0]
# type of the item is the string before the "." in the item name
item_type = item.split(".")[0]