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
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