Error rendering data template: ValueError: Template error: as_timestamp got invalid input ‘<template TemplateState(<state sensor.tlmtiago_next_alarm=2024-05-22T21:00:00+00:00; Local Time=Wed May 22 22:00:00 GMT+01:00 2024, Package=com.samsung.android.app.routines, Time in Milliseconds=1716411600000, device_class=timestamp, icon=mdi:alarm, friendly_name=TlmTiago Next alarm @ 2024-05-22T17:02:19.765273+01:00>)>’ when rendering template ‘{{ as_timestamp(states.sensor.tlmtiago_next_alarm) - 60 * 20 }}’ but no default was specified
however if it’s not a proper datetime (e.g. if it’s time only) or not the right format, then it won’t work… so if it doesn’t, please share what that states() template gives.
I’ve ran into a new issue though… And it’s a weird one.
My trigger for this automation is everyday at 5:30… And for some reason, my phone reports my next alarm at 5:30. Changed the automation to 6:30, the next alarm also changed to 6:30.