Main UI OR / AND condition for visibility

Hello,

i woult like to make so items in main ui visible depending on states.
With one item state it works fine, but i dont know to build the condition for multiple states.

For example i would like to show an item just at daytime “NIGHT” or “MORNING”…

visible: =items.TimeOfDay.state === "NIGHT"

Also i would like to combine the states of two or more items - is this possible, too?

Thanks in advance for your help!

Alex

You need to use an expression. Building Pages - Components & Widgets | openHAB

1 Like

Thank you for the link. Was not sure if and how i have to use the exoression.

This is an example of the result:

visible: =((items.TimeOfDay.state === "MORNING" || items.TimeOfDay.state === "DAY" || items.TimeOfDay.state === "EVENING") && items.Home_Anwesenheitserkennung.state === "ON")
1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.