How to combine rf 433 door sensor with 3xentity to one sensor

Hi,

I have rf 433 door sensor with 3xentity.

sensors:
open - binary_sensor.sensor_door_open_attic_01 - triggered when the door is opened
close - binary_sensor.sensor_door_close_attic_01 - triggered when the door is closing
temper - binary_sensor.sensor_door_temper_attic_01 - triggered when the sensor is taken

How to combine those three entity to one?

Hello,

You have to create a template binary_sensor

template:
  - binary_sensor:
    - name: sensor_door_attic_01
      state: >
        {% if is_state('binary_sensor.sensor_door_open_attic_01','on') %}
          true
        {% elif is_state('binary_sensor.sensor_door_close_attic_01','on') %}
          false
        {% elif is_state('binary_sensor.sensor_door_temper_attic_01','on') %}
          {# I don't know what that means, is it open (on) or closed (off)? if unavailable, then put unknown here #}
        {% else %} 
          {# What if none of the three is on? #}
        {% endif %}
      device_class: door
1 Like