Automation next_alarm

Hey,

I’ve installed Home Assistant today and currently I’m playing around with it.

I’ve installed the app on my phone so I can pull triggers from my phone.
However I’m unable to get the next_alarm to work with the GUI and the information I find about it online is either fully configured YAML templates which do not apply to the current version of Home Assistant or I do not get them to work.

I’m also unable to find documentation about how to automate the next_alarm from scratch. Anyone here who can help me either to find the correct documentation on scripting it via the GUI or via the CLI?

Thanks

But what do you actually want to do and what did you try? sensor.x_next_alarm simply returns a datetime which you can use. Just have a look at it via Development tools => States.

Hey Septillion,

Thanks for replying.
I want to use my android alarm to trigger my sonos radio and lights when I wake up.

I have it running now with the following trigger which I found online:
{{((states(‘sensor.smartphone_leon_next_alarm’)|as_timestamp|int - now()|as_timestamp|int)/60)|int}}

But I notice that after a couple of hours, I get the following message which turns only the lights on:
[Ochtend Alarm] has been triggered by time change or manual update via template

Any idea on how thats happening?

I’m confused about that template because of the divide by 60 in it and it not being a comparison.

I think with the last update you can just do

{{ states(‘sensor.smartphone_leon_next_alarm’)|as_datetime <= now() }}