I have an EnOcean window handle that sends the following states once you turn it basically “full circle”:
closed --> open --> tilted --> open_from_tilted --> closed
In my sitemap, I would like to use the contact icon set (contact, contact-closed, contact-open, contact-ajar) in order to show the status. However, I am struggling with state transformation. Right now, my item definition is as follows:
String ug_sz_sensor_fenster “Spielzimmer [%s]” {mqtt="<[mosquitto:ug/sz/sensor/fenster:state:closed:closed],<[mosquitto:ug/sz/sensor/fenster:state:open:open],<[mosquitto:ug/sz/sensor/fenster:state:open:open_from_tilted],<[mosquitto:ug/sz/sensor/fenster:state:open:tilted]"}
The corresponding sitemap definition is as follows:
Text item=ug_sz_sensor_fenster
As you can see from the item defintion, the different states distinguishes between open and closed. However, I would like to see “tilted” in my sitemap whenever the window is tilted. That should go in conjunction with the contact-ajar icon.
How am I supposed to do the state transformation?