Change 1 to On and 0 to Off

Hello All
Maybe it is trivial but I need help.
I define items and siemaps
Number e_HC1_pmp “pump status [%s]” (Vaillant) {ebus=“id:boiler.state_pump, dst:08, refresh:10”}
I get 0 or 1 ( ) for off, 1 for on)
I my sitemaps i get
Text item=e_HC1_pmp label=“pump status [%s]” icon=“line”
How to get On or Off instead 1 or 0 on sitemaps ???

Hi,

have a look @ https://github.com/openhab/openhab/wiki/Explanation-of-Sitemaps#mappings

kind regards,
Patrik

Example:

Item definition:
Number ComfoAirErrorIntern "Filter (intern) [MAP(comfoAirFilter.map):%s]" <none> (gComfoAir) { comfoair="filter_error_intern" }

.\Transform\comfoAirFilter.map:
1=Offen
0=Geschlossen
undefined=undefiniert
-=undefiniert

Sitemap entry simplifies to
Text item=ComfoAirErrorIntern

Many thanks for your replay but it dosent work…
Maybe i do something wrong???
Items
Number e_HC1_pmp “HC1 load [MAP(eBus_pump_status.map):%s]” (Vaillant) {ebus=“id:boiler.state_pump, dst:08, refresh:10”}
.\Transform\ eBus_pump_status.map
0=Off
1=On
undefined=undefined=unknown

sitemap
Text item=e_HC1_pmp

Number and %s no sense for me, try with String

It is works now
Number e_HC1_pmp “Pump load [MAP(eBus_pump_status.map):%s]” (Vaillant) {ebus=“id:boiler.state_pump, dst:08, refresh:10”}

eBus_pump_status.map
1=on
0=off
undefined=unknown

Text item=e_HC1_pmp

cool :smile: … what was the problem?

I just have to wait several minute to update the value :smile: