Recently I bought a neo-coolcam z-wave door/windows sensor. It’s paired with my Vera z-wave controller, which in turn is linked to my home assistant.
I see the sensor showing up as binary_sensor.door__window_sensor_61 in home assistant, and after adding it to a group, it showed up on the screen.
As soon as I trigger the sensor, I see it change from on to off right away, so that’s great!
The only thing I would like to change is the “On” / “Off” to open / closed.
Apparently, the way to do that is with a “platform: template” entity. For that, I created the following in my configuration.yaml:
binary_sensor:
- platform: template
sensors:
raamzolder:
value_template: >-
{% if states('binary_sensor.door__window_sensor_61') == 'on' %}
Open
{% elif states('binary_sensor.door__window_sensor_61') == 'off' %}
Closed
{% else %}
Unknown
{% endif %}
Unfortunately, the sensor just shows up as “Off” and doesn’t change when the sensor is triggered. When I go into “templates” and put the same code in there (after >-), it works like a charm.
Any idea where I’m going wrong?