Hello, I have an automation to lift my blinds every morning when the alarm on my phone goes off but it is not working anymore around the same time I got the 2024 update (not sure it is related though)
I am using this trigger template :
{{now().strftime('%a %h %d %H:%M %Z %Y') == (((state_attr('sensor.phone_next_alarm', 'Time in Milliseconds') | int / 1000) ) | timestamp_custom('%a %h %d %H:%M %Z %Y'))}}
I have tried to debug using the template tool in the developer menu :
The first part is working great showing the right formated date time
{{now().strftime('%a %h %d %H:%M %Z %Y')}}
The second part is also working great and showing the right formated date time
{{(((state_attr('sensor.phone_next_alarm', 'Time in Milliseconds') | int / 1000) ) | timestamp_custom('%a %h %d %H:%M %Z %Y'))}}
Apart from when my alarm goes off where it is showing the following error :
ValueError: Template error: int got invalid input 'None' when rendering template '{{(((state_attr('sensor.phone_next_alarm', 'Time in Milliseconds') | int / 1000) ) | timestamp_custom('%a %h %d %H:%M %Z %Y'))}}' but no default was specified
Any idea why this is happening and how to fix it ?
ps : I have also tried using the time -> next alarm trigger instead of the custom template trigger without success