I am trying to create an automation based the alarm set on my iphone, and need help with creating the Home assistant automation.
I’ve created an iOS shortcut script created and modified on the basis of https://wltd.org/posts/how-to-automatically-sync-ios-alarms-with-home-assistant, allowing me to have three sensor - one with the time of day the alarm should normally go off (sensor.bedtime with e.g. a value of 6:00), one with the weekdays the alarms should sound (sensor.bedtime_repeat with a value of e.g. Monday Tuesday Wednesday… - each separated by a line break), and finally one that will give a date and time of an alarm to skip (sensor.bedtime_exception with a value of e.g. 21-01-2023, 06:00).
The automation I am looking to create basically needs to trigger, when there is a match between the current time and sensor.bedtime value, a match between the current weekday and any of the weekdays listed in sensor.bedtime_repeat and there is no match between the current date and the date in sensor.bedtime_exception.
I have the time_date integration enabled, but I really do not know where to start or end in terms of comparing the different values, and am looking for inspiration. I appreciate any input. Thanks.