According to the wiki you use a comma, not logical operators, to have multiple conditions under which an item is visible. So your sitemap element should be:
Text item=HeatPump_alarm visibility=[HeatPump_alarm!=0, HeatPump_alarm!=16384]
As far as I can tell that is functionally equivalent to an OR. There is no support for AND it would appear.
It is not working with comma. [or] is not the right command for my use case. It has to be [and].
How can I fix this? I want to have the alarm item visible only if it is bigger as 0 and smaller as 16384. Maybe with < and > signs? But I don’t know how to set this up without having the same problem like above.
The wiki says “If any of the rules are true then the item will be visible” so this should work and I think it is what you really want. Before, assuming it worked, would not have hidden the item if it was -1 or 16385.
There is no way to control visibility the way you want because the logic “when HeatPump_alarm is not 0, or HeatPump_alarm is not 16384” always returns true. There is no AND operator available.
What you can do is to use an additional frame, without a label. Downside is, that there will be a slightly visible frame on the sitemap, but you can add a second visibility condition to get a kind of a AND logic:
Frame label="" visibility=[ConditionSwitch1=="ON"] {
Text item=Item_1 icon="switch" visibility=[ConditionSwitch2=="ON"]
}
Edit: TIL, and maybe also worth mentioning here, that frame in frame is not allowed and android app is not capable visualizing it (although iOS + browser obviously are):