I wanted to trigger action at specific time calculated before the actual input time. This logic is not triggering anything. What I am missing here? Can someone please help. Exact code is validated at developer tools.
HA Developer validation screenshot attached
Blueprint Code:
input:
switch_off_at:
name: "Switch off"
default: '19:00:00'
selector:
time: {}
variables:
switch_off_at: !input switch_off_at
triggers:
# Should trigger 60 second before 'switch_off_at' time
- platform: template
value_template: >-
{{ as_timestamp(now()) | int >= ((as_timestamp(now().strftime('%Y-%m-%d ' + switch_off_at)) | int) - 60) }}
actions:
- action: script.reusable_notify_mobile_app
data:
notification_title: Aqua Test!
notification_message: Triggered