I have a monoprice Z-Wave recessed door sensor. The binary sensor that gets setup in discovery doesn’t work. But I do have a lot of other sensors that I can use.
sensor.door_1_alarm reports 0 or 255 when the door is closed and open. This is very consistent. So I created a binary template sensor:
Thank you for replying,. I’ve added that, restarted, and while the sensor ‘badge’ on the states page will show the alarm change from 0 to 255 when opening the door, the binary sensor “pool door” shows no change since startup.
Check the development tools (lower left, sidebar).
There’s a states page (<> button) where you can see that actual sensor entity id and state. Is 255 actually the state or an attribute of the sensor? Is the id correct?
There is also a template editor where you can test templates.
It’s definitely the sensor value. From the states/overview page and each line was tested in template editor. It gave true/false readings in template editor and would change, but after I added a space or updated the template text. But the binary sensor still doesn’t move
I was going crazy trying to figure out why the sensor wouldn’t update, and of course the more it wouldn’t work the more commented out attempts went in there!
One less mystery.
@tom_l and toast,
If playing in the template area the commented lines all need to be at the end AND they need to start very near or preferably at the first column, otherwise the interpreter tries to read them as template
You can also use jinja comments eg {# ‘hello world’ #}