Sensativ Strip Door Sensor

Hi,

I did install a Sensativ Stripr door sensor (I use Vera as a z-wave chip) and i can see the sensor in HA.
But I see the status as “On/off” just like it would be a Motion Sensor.

Is there any way I can change it to a real door sensor? (Open/Closed) and a door icon?

I did try this, but i get error:

  - platform: template
sensors:
  huvudentre_door:
    value_template: '{% if is_state("binary_sensor.huvudentre_125", "on") %}Open{% else %}Closed{% endif %}'
    friendly_name: 'Huvudentre_Door'

This is the error:
SyntaxError: invalid syntax Failed config sensor.template: platform: template sensors: [source /home/homeassistant/.homeassistant/sensor.yaml:143] Huvudentre_door: [source /home/homeassistant/.homeassistant/sensor.yaml:144] friendly_name: Huvudentre_Door value_template: {% if is_state(“binary_sensor.huvudentre_125”, “on”) %}Open{% else %}Closed{% endif %} Successful config (partial) sensor.template:

One way to change the state is noted in the thread below.

To change the icon use the customize function.

You may be able to change the device class under the customize settings and change the state reported, however, I am not that familiar with using this function so I can’t report on how well it works.

sensor:
  - platform: template
    sensors:
      huvudentre_door:
        value_template: '{% if is_state("binary_sensor.huvudentre_125", "on") %}Open{% else %}Closed{% endif %}'
        friendly_name: 'Huvudentre_Door'

Try that, you had a few spacing issues. Note that ‘sensor’ only needs to be entered once. I just added it here to show a line with 0 indentation/spacing.

This is my template for one of my sensitive strips.

- platform: template
  sensors:
    front_door:
      value_template: '{% if is_state("binary_sensor.front_door_sensor", "on") %}Open{% elif is_state("binary_sensor.front_door_sensor", "off") %}Closed{% endif %}'
      friendly_name: 'Front Door'

Hope it helps…

Hi

Thanka alot, works perfect

You can also use the customize component to tell HA that a binary sensor is a specific type i.e. a door. Use the “device_class: opening” setting and HA will automatically set the right on->open/off->closed titles and associated icons. I use the following for my z-wave door sensor:

customize:
  binary_sensor.aeotec_zw089_recessed_door_sensor_gen5_sensor:
    friendly_name: Front Door
    device_class: opening
3 Likes