This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Front doorbell motion template condition | |
# Template condition which only passes if it has been more than 1 minute (60 seconds) that the automation.front_doorbell_motion ran. | |
- condition: template | |
value_template: > | |
{% if state_attr('automation.front_doorbell_motion', 'last_triggered') %} | |
{{ as_timestamp(now()) | int - | |
as_timestamp(state_attr('automation.front_doorbell_motion', 'last_triggered')) | int > 60 }} | |
{% else %} | |
false | |
{% endif %} |