- alias: Jonathan Nightstand Alarm Light
initial_state: 'on'
trigger:
- platform: time
at: sensor.jonathan_next_alarm
However, the automation is never triggered. There are no automation errors, but it never triggers the automation and in the logbook it also shows nothing.
I saw some posts that suggested your timestamp must have the time zone, which mine does.
- id: "85cf493e-b8eb-4a8b-8645-b384b752d0fd"
alias: My Phone Alarm about to go off
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.next_alarm_stephan_minutes
below: "2"
Thanks for the reply. While you were writing it, I spent 30 minutes messing around in templates and found another hack to make it work. Basically it just does a string compare of 2 date stamps to see if they’re equal. This is not very elegant, but it is working…
I add 30 second offset because once the alarm triggers, the app immediately updates it to the next alarm, which seemed to get dropped by home assistant in my testing. Also, when i tried 10 seconds, it wasn’t reliably evaluating true to trigger the automation. So i chose 30 seconds, and then added a 10 second delay with the for condition.