I’ve also tried following the docs, tried comparing value_template to paylload_on and off, made sure not to set up avaliability since this sensor does not give me avaliability status as mqtt.
If I configure it as ‘sensor’ it returns the proper string “True” and “False”
This shows the same sensor, first is configured as Sensor second as Binary Sensor.
I need it to be configured as binary sensor so I can set the device class, otherwise the changes in state don’t show i.e. in the Picture Card.
Checked the Log, there is no indication what I’m doing wrong.
The word value must be included in square bracket notation as it has a similar meaning to value_json. It means “all the incoming data”, just not parsed as json and without the square brackets will not be interpreted as the key “value” in the json data. See: https://www.home-assistant.io/docs/configuration/templating/#processing-incoming-data
Also binary sensor templates should return true or false, not ON or OFF.
Oh yeah it was something I had tried earlier but after looking through the forums I removed it because it was removed in so many posts. After you showed me the template editor I tried it again but stupid me wrote ‘true’ instead of true. I was having HA compare a string to a boolean. Could have waited all night…