Hi, today I have a template that is used to control if the alarm should be armed or not, it is based on if we are home or not, untill it has only been the who of us, me and my wife. But now I need to adapt it to my kid and I seem to run into issues, se code below:
# Alarm sensor true if all are away
- platform: template
sensors:
away:
friendly_name: "away"
value_template: >-
{% if is_state('person.1', 'home')
or is_state('person.2', 'home')
or is_state('person.3', 'home')%}
false
{% else %}
true
{% endif %}
It seems the “if” statement does not consider the third case, only two are allowed, am I missing something?