Skip to content

Commit 25ae2e2

Browse files
committed
Currently only consider items with labels (as long as no better icon solution is found)
1 parent b049c99 commit 25ae2e2

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

nuimo_openhab/app_builder.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ def buildApps(self, openhab : openHAB, rootItemName = "Nuimo", parent: App = Non
88
nuimoGroupItem = openhab.req_get("/items/"+rootItemName)
99
for nuimoItem in nuimoGroupItem["members"]:
1010
if("label" in nuimoItem):
11-
icon = nuimo.LedMatrix(
12-
nuimoItem["label"]
13-
)
14-
app = App(name=nuimoItem["name"], appListener=OpenHabItemListener(openhab), icon=icon, parent=parent)
15-
if(nuimoItem["type"] == "Group"):
16-
self.buildApps(openhab, nuimoItem["name"], app)
17-
apps.append(app)
11+
if("*" in nuimoItem["label"] or "." in nuimoItem["label"]):
12+
icon = nuimo.LedMatrix(
13+
nuimoItem["label"]
14+
)
15+
app = App(name=nuimoItem["name"], appListener=OpenHabItemListener(openhab), icon=icon, parent=parent)
16+
if(nuimoItem["type"] == "Group"):
17+
self.buildApps(openhab, nuimoItem["name"], app)
18+
apps.append(app)
1819
return apps

0 commit comments

Comments
 (0)