Window binary sensor template not refreshed

Hi. I just received my Aeotec ZW120 door sensor. It seems well included in my HA 0.90.0 install and I see the access_control value switching from 22 and 23 when my door opens and closes.

Fine. Now I want nice icon on my dashboard. So I have added the following binary sensor:

binary_sensor:
  - platform: template
    sensors:
      kitchen_window:
        value_template: "{{ is_state('sensor.window_sensor_kitchen_access_control', '22') }}"
        friendly_name: 'Kitchen Window'
        device_class: doorstrong text

But it does not refreshed when the door opens :frowning:
In the following image:
image
the right part (sensor.window_sensor_kitchen_access_control) is automatically refreshed but not binary_sensor.kitchen_window.

Any idea?

add entity_id: sensor.window_sensor_kitchen_access_control to your kitchen_window definition to tell HA to watch/react when that entity changes, otherwise nothing will happen indeed.

1 Like

more info on this here:


Also your device_class doesn’t seem to be valid.
Here are the supported device_class elements:

indeed that works! thanks!

Hi Guys,
I’m new in automatization.
I have a window sensor, i know the IP address and mac address. I see it in the network.
How can i configure it to binary sensor to HA?