How to get mode mappings from a (Z-Wave) channel

I have a Z-Wave Stella Radiator Valve that can be set into various modes - Heat, Economy Heat, Off and Manual.
I want to put a Selection control on a sitemap, and provide mappings for the modes.

PaperUI can do this, on the Control tab, and it provides a drop down to set Heat=1, Economy Heat=11, Off=0, Manual=31

How does PaperUI get these values?

(yes I know I could just type them in, but where’s the fun in that :slight_smile:)

They are defined in the thing XML file, or the channel XML file (depending on exactly what channel type you want). For general channels (ie that are the same in every device) they are specified in the channel configuration. For channels specific to a device, they are specified in the thing file.

Thanks for the pointers Chris.
I’ve found that I can get the values by REST with GET /channel-types/zwave:eurotronic_stellaz_00_000_thermostat_mode but have no clue how to do that in a sitemap. All a bit too ambitious for me. I’ll just have to type it in.

Yes, the REST interface has them, and one day, when there’s an updated OH2 version of sitemaps, then this will be linked up…

no
you can use a “mapping”

just like this… thats all:

Switch item=heat1_mode label=“Modus” mappings=[0=Off, 1=Comfort, 11=Eco, 31=Manual] icon="radiator"
Setpoint item=heat1_settemp minValue=6 maxValue=24 step=0.5 icon=“temperature”

I think the point was that there is currently no way to automatically get this from the system - you have to manually type it in to the sitemap, or map file or somewhere even though the system knows this already as it’s defined in the thing…