[SOLVED] How to report on/off status on sitemap without switching capability

Sorry about asking what looks to me like a stupid question, but I have now searched on my own without success for long enough.

I have a couple of thermostats (one Insteon, one ZWAVE) that can report on the current status of the heating function. Is it currently actively heating or not? This is a simple yes/no business.`:

The relevant Insteon and ZWAVE items are defined as follows:

Number Chauffage_salon_statut "Statut du chauffage, salon" { insteonplm="32.f5.55:F00.00.18#isheating"}

Number Chauffage_bureau_statut “Statut du chauffage, bureau” {channel=“zwave:device:d325bddb:node2:thermostat_state”}

Unless I am mistaken, the only relevant values are 0 (=Inactive) and 1 (=Active).

At the moment the relevant portion of my sitemap reads as follows:

Switch item=Chauffage_salon_statut label="Statut [%d]" icon="radiator" mappings=[0="En Pause",1=Actif]

Switch item=Chauffage_bureau_statut label=“Statut [%d]” icon=“radiator” mappings=[0=“En Pause”,1=Actif]

But this does not yield the result I want because:

  1. This creates a switching capability in the UI which is inappropriate: the relevant items are just reporting on the state of the thermostats: they do not constitute user-triggered switching facilities. And

  2. Moreover the resulting display is bizarre. It displays two buttons “En pause” and “Actif” with one of them being highlighted according to the current status of the thermostat, which is OK. But it also displays on the left of the first button the numerical value of the item, 0 or 1.

What I would like to get instead, is just one string: “En pause” or “Actif”.

It is not clear to me how to achieve that result.

Thanks in advance for your help.

Use state transformation (mapping in the item file) E.g.
Contact Livingroom_Window "Ventana del salón [MAP(window_esp.map):%s]"

See State presentation

Just use a text label instead of a switch in your sitemap and to transform the state use the transformation

Text item=Chauffage_bureau_statut label=“Statut [MAP(heating.map):%s” icon=“radiator”

@ljsquare @Dibbler42: Problem resolved, many thanks. – Pierre