Hi,
I want to show a an item in a sitemap with a Selection item and see its real-time states but only the commands available.
For example, for a garage gate, states are OPEN, CLOSED, OPENING, CLOSING but the relevant states to show in the Selection item of the sitemap are OPEN and CLOSED only.
To see the OPENING and CLOSING states for the Selection, I must add them to the mapping (which makes no sense because you don’t command a door to CLOSING). If you don’t put them in the mapping, the transitional states are not shown.
Is there a way to display the current state in the label (I could could by having different icons for each state but it is quite constraining) without having them in the mapping?
For the moment, my workaround is to have 2 items and handle this with visibility setting
Selection item=itemDoor label="My door [MAP(fr.map):%s]" mappings=[ 0="CLOSED", 100="OPEN" ] visibility=[itemDoor==0, itemDoor==100]
Text item=itemDoor label="My door [MAP(fr_amr.map):%s]" visibility=[itemDoor==10, itemDoor==90]
with .map
0=CLOSED
10=OPENING
90=CLOSING
100=CLOSED
But the problem is that you cannot send a command to the door until it is in a non-transitional state (as the Selection is hidden and only the Text visible).
Any suggestion?