So i tried using just %d instead of the map to see if i can get it to display just a 0 or 1 but this isnt working either .Its just displaying - I cant see why this is not working .The Mqtt is definitly working as per my mqttfx test and im sure the topic is correct. Maybe a glitch in openhab2? The temp sensor is also on the same esp device and that is working fine. Everything is working except for displaying a value in openhab . I did install the map transform in paperui as well. It just seems like openhab is not accepting a 0 or 1 .
I would like to get it working with the current 0 or 1 values but if not i may have to change it to a contact item. If i do how do i transform a 0 or 1 into a open / closed ? Do i just change number to contact and in map write
0=closed
1=open
Also i have a idea that openhab2 is looking for a decimal value like 0.00/1.00 instead of what the sensor is putting out which is 0/1 .Would it be possible to change the value in espeasy so it sends the decimal values instead of 0 or 1? Maybe a rule or something?
Oh man ! i found the problem and it was super simple. I put a publish arrow instead of a subscribe by accident .It was > . Im surprised nobody here caught it since i posted the item line a bunch of times. lol All good now.
Now to make another mqtt lightswitch turn on when there is motion .I do this in rules correct?
Thanks .Thats what i had in mind. My only question is with the motion sensor im using that sends a value of 0 or 1 and then is transformed to still or motion , what do i use in the rule ? Can i use the tranformed variable of still or motion or do i use 0 or 1 ? I cant seem to find anything about this in the openhab2 documentation