mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-22 23:44:25 +01:00
change override config format
This commit is contained in:
@@ -320,8 +320,8 @@ Only the icons listed in the [Icon Table](HMI#icons-ids) are useable.
|
|||||||
items:
|
items:
|
||||||
- light.wled
|
- light.wled
|
||||||
- light.schreibtischlampe
|
- light.schreibtischlampe
|
||||||
- item: switch.deckenbeleuchtung_hinten
|
- switch.deckenbeleuchtung_hinten:
|
||||||
icon: lightbulb
|
icon: lightbulb
|
||||||
- delete
|
- delete
|
||||||
- delete
|
- delete
|
||||||
- type: cardMedia
|
- type: cardMedia
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ class LovelaceUIPanel:
|
|||||||
for item in items:
|
for item in items:
|
||||||
# in case item is a dict, grab the item name
|
# in case item is a dict, grab the item name
|
||||||
if type(item) is dict:
|
if type(item) is dict:
|
||||||
cleaned_list.append(item["item"])
|
cleaned_list.append(next(iter(item)))
|
||||||
else:
|
else:
|
||||||
cleaned_list.append(item)
|
cleaned_list.append(item)
|
||||||
return cleaned_list
|
return cleaned_list
|
||||||
@@ -443,8 +443,8 @@ class LovelaceUIPanel:
|
|||||||
def generate_entities_item(self, item):
|
def generate_entities_item(self, item):
|
||||||
icon = None
|
icon = None
|
||||||
if type(item) is dict:
|
if type(item) is dict:
|
||||||
icon = item["icon"]
|
icon = next(iter(item.items()))[1]['icon']
|
||||||
item = item["item"]
|
item = next(iter(item.items()))[0]
|
||||||
|
|
||||||
# type of the item is the string before the "." in the item name
|
# type of the item is the string before the "." in the item name
|
||||||
item_type = item.split(".")[0]
|
item_type = item.split(".")[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user