sitemap Test label="Test" {
Text item=ITEM1_MODE label="Item1 [MAP(HM-CC-RT-DN.map):%s]"
Text item=ITEM2_MODE label="Item2 [MAP(HM-CC-RT-DN.map):%s]" visibility=[ITEM1_MODE!=ITEM2_MODE]
}
Maybe visibility can only be tested against a fixed value. I’m not sure about this and the documentation does not mention this case.
As a workaround, I would suggest a proxy item plus a simple rule:
Switch ITEM2_MODE_vis
rule "compare"
when
Item ITEM1_MODE changed or
Item ITEM2_MODE changed
then
ITEM2_MODE_vis.postUpdate(if(ITEM1_MODE.state != ITEM2_MODE.state) ON else OFF)
end
sitemap Test label="Test" {
Text item=ITEM1_MODE label="Item1 [MAP(HM-CC-RT-DN.map):%s]"
Text item=ITEM2_MODE label="Item2 [MAP(HM-CC-RT-DN.map):%s]" visibility=[ITEM2_MODE==ON]
}
Thanks, but i thought about proxy items and rules and i would go that way for one or two items. But in my case i would need this for 10 items to be useful.
I don’t want to copy/paste that much stuff (currently).