mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-20 13:14:44 +01:00
fixes #82
This commit is contained in:
@@ -77,6 +77,12 @@ class PageNode(object):
|
|||||||
|
|
||||||
def get_all_item_names(self, recursive=True):
|
def get_all_item_names(self, recursive=True):
|
||||||
items = []
|
items = []
|
||||||
|
# current page
|
||||||
|
if type(self.data) is dict:
|
||||||
|
items.append(self.data.get("item", next(iter(self.data))))
|
||||||
|
else:
|
||||||
|
items.append(self.data)
|
||||||
|
# childs of page
|
||||||
for i in self.childs:
|
for i in self.childs:
|
||||||
if len(i.childs) > 0:
|
if len(i.childs) > 0:
|
||||||
if recursive:
|
if recursive:
|
||||||
|
|||||||
Reference in New Issue
Block a user