Sitemap

iam using openhab2. and after some diffculties with sliders on paper ui. i triend just to program everthing. but i ran in to some small issue

the serial mysensor is working, in paper iu every data is recieved and send
but if i made a sitemap. not all is working. outgoinig data are working fine. but incoming doesnt show nothing

Bridge mysensors:bridge-ser:gateway [ serialPort="/dev/ttyUSB0", sendDelay=200, baudRate=115200, skipStartupCheck=true ] {
power                   kuur01                  [ nodeId = "1",  childId="12"]
power                   tkwh01                  [ nodeId = "1",  childId="13"]

items

Number kuur01 “Watts per uur” { channel=“mysensors:power:gateway:kuur01:watt” }
Number tkwh01 “Totaal KWH” { channel=“mysensors:power:gateway:tkwh01:kwh” }

sitemap

```php
Text label= "Behagelijkheid" icon="temperature"{
                        Text item=kuur01 icon="settings"


but the sitemaps doesnt show any data
do i need to use the rules to decode mysensor data like in openhab

any some advise

You need to tell it to add the state to the label. Assuming the values are floating point numbers, change your label to"

label="Behagelihkheid [%.1f]"

That will print the state of the Item as a floating point number with one decimal place.

Yep that was working but give me some problems on the site map
so i did this

Number          kuur01          "Watts per uur[%.1f Watt]"      { channel="mysensors:power:gateway:kuur01:watt" }

when i go to the sitemap
it show the data
Watts per uur 504.0 WATT

but after update values
Watts per uur 504

i have to refrech the page again to see WATT

I remember there being some web traffic about a problem in OH 2 where the state values on the sitemap lose their formatting. This sounds like that issue.

thx
https://github.com/eclipse/smarthome/issues/640