Hi.
I have my garage door controlled by an automation that at a selected time checks if it’s still opened and, if so, it send a telegram alert to my mobile, with option to close it immediately or wait automatic closing in 15 minutes.
The automation is triggered when this sensor goes on:
chiusura_automatica_box:
value_template: >
{% if states.input_select.orario_chiusura.state is defined %}
{{states.input_select.orario_chiusura.state == states.sensor.time.state}}
{% else %}
False
{% endif %}
friendly_name: 'Chiusura Automatica Box'
The second automation should be triggered 15 minutes later, by another sensor that goes on.
But this sensore never goes on:
chiusura_automatica_box_quindici_minuti:
value_template: >
{% if states.input_select.orario_chiusura.state is defined %}
{{ ( states.input_select.orario_chiusura.state | int + 900 ) == ( states.sensor.time.state | int ) }}
{% else %}
False
{% endif %}
friendly_name: 'Chiusura Automatica Box Dopo 15 Minuti'
What’s wrong in the second sensor?
Thanks.