Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95354

Binary sensor checking time ok, how to add offset?

$
0
0

@xalex75 wrote:

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.

Posts: 5

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>