Zwave - state lookup/map

Hi there, I think my question is somewhat similar to MAP transform for zwave items?

I have a Stelpro STZW402 4000W Thermostat, I want to display the “friendly/formatted” text for the thermostat_state and thermostat_mode.

ie… instead of seeing a “1” for thermostat_mode, I would like to see “Heat”. This appears to be currently defined correctly in the corresponding [mappings] (https://github.com/openhab/org.openhab.binding.zwave/blob/e9f2f8304a9b60f76598f57750db0c38a8ec294c/ESH-INF/thing/_channels.xml#L1097) from the zwave binding

When I look in habmin, I see that it’s cross referencing correctly.

However in my sitemap, I am unsure how to show the translated value? My current sitemap line is:

Text item=zwave_device_be6c9b8e_node3_thermostat_mode icon="light"

Also, in the console, I see the numeric value:

openhab> items|grep zwave_device_be6c9b8e_node3
zwave_device_be6c9b8e_node3_sensor_temperature (Type=NumberItem, State=21, Label=Sensor (temperature), Category=null)
zwave_device_be6c9b8e_node3_thermostat_mode (Type=NumberItem, State=1, Label=Thermostat mode, Category=null)
zwave_device_be6c9b8e_node3_thermostat_state (Type=NumberItem, State=0, Label=Thermostat Operating State, Category=null)
zwave_device_be6c9b8e_node3_thermostat_setpoint_heating (Type=NumberItem, State=21, Label=Setpoint (heating), Category=null)
openhab>

Is there any way to get the translated value from the zwave binding? if not, what is the recommended way to transform the value myself? Define a new item with a map(of note, all my items have been auto-created so far)? I would hate to have to code what appears to be already done in the zwave binding.

thanks for your help!

the mode is porbably something you want to control from the UI?

So if you want to control it you can adapt the following for your thermostat

Switch item=heat2_mode label="Modus" mappings=[0=Aus, 1=Comfort, 11=Eco, 31=Manuell] icon="radiator"

If you indeed only want to see the state well formatted as text … you could go for transform:

btw you setpoint could look something like this

Setpoint item=heat2_settemp minValue=6 maxValue=24 step=0.5 label="Wunschtemperatur (Comfort)" icon="temperature"

thanks I’ll try that later today when home. Be interesting to know how to leverage the mapping that’s already done though :frowning:

I even noticed that in the OH2 Dashboard it displays properly as well. Just not sure how to leverage it from the sitemap.

The State definitions in OH2 are not available in Sitemaps since sitemaps are an OH1 concept. One day, there will hopefully be an OH2 sitemap system that can make use of the additional information, but for now at least, it’s not available.

thanks @chris , just curious, what about HABPanel?

didn’t realize sitemaps were OH1. Is HABPanel the 2.0 version of sitemaps ? or does the sitemap feature just need some rework?

I don’t know too much about HABPanels internals (yet!) but I see no reason why HABPanel should support this in the same way that HABmin does.

No. There was a discussion a while back on the ESH forum about a new Sitemap for ESH/OH2, but as yet no movement. The plan was at least for a significant upgrade rather than just ‘rework’…