OH2: occupant status, sitemap setpoint naming? (mapping/transformation?)

Hello,

I want to have a simple occupant status. It will be set by switches or rules, but how do I go about that best?

Each of the two occupants in the house should have a status. Either home, asleep or away.
I made a number item, and created a setpoint in the sitemap.
But the sitemap now (of course) shows “Status Daniel” as 1,2 or 3. I would like to map 1 to home, 2 to asleep, 3 to away. Any way to do that?

thank you
Daniel

Hi @Daniel_Hermann1,

you can do it this ways:

look for the Element Type ‘Switch’ and replace “TV Channel …” to youre needs

http://docs.openhab.org/configuration/sitemaps.html#element-type-switch

Switch item=<itemname> [label="<labelname>"] [icon="<iconname>"] [mappings="<mapping definition>"]

Matthias

1 Like

that does it, thank you