Sync next iOS16+ alarm clock in HA (with Shortcuts and companion app)

Could you run this shortcut?
It’ll list all your alarms, but without the formatting/sending to HA:

should give you something like this:

I’m wondering whether there is an alarm that’s missing a date (either 01-01-2001 or tomorrows date…).
What kind of alarm have you set up on your iPhone?

sorry for the late reply.
i use the alarm setting in the health app.
running the shortcut you provided gives me these 2:

Maybe i did it wrong because when i add a normal alarm it works fine. sorry about that.

no worries.

The only difference I can see, is you’re using a different date format. What settings is your phone on?

If you run the ‘test shortcut’ what does it say about the normal alarm?

I have these settings:


And these are the output of the test shortcut:


8:45 is the manual alarm 7:45 is the alarm set by the health app

@maartenhendrix and @M20Lucas Any news on the problem? I tried it also , and get the same error…

with the test shortcut I get the following:
alarm without health app

alarm with health app:

my iphone settings are the following:

seems that we have exactly the same issue… :frowning: could it somehow be related to the ‘,’ after the date, that @maartenhendrix and I have (or the different format of the date?) compared to @M20Lucas

@M20Lucas and @maartenhendrix : today I tried to debug the shortcut and found out one interesting thing:
I added a ‚note node‘ and there I displayed the tomorrows date and weekday and the day string of the alarm clock… here you can see the output:

As you can see do I get the weekday+‘s‘ from the alarm clock - in the next step I compare it to the weekday which results in the error above… now my question is if (and how) I can make it work? Can I somehow add a ‚s‘ to a weekday or remove it? I guess this error would disappear if I would change the language of the iphone to english…

edit: just tried to change the language to englisch, but problem didn‘t get solved… nevertheless the problem is that i conpare a date (e.g.: 2023-03-12) with a day (Tuesday) - which throughs an error… not sure how to solve this…

I’m sorry did not have time to look in to this anymore. Will probably take a look again in 2 weeks. Last time i checked it worked and i was assuming it was caused by one of the iOS beta versions I’m running

this is a good hint! i am also running a beta on this iphone. I could try to go back to a non-beta firmware…

I now downgraded to 16.3.1 and tested with my german language settings and I got the same error message. I then changed to a english language and tried again and in this combination (iOS16.3.1 + english language) it is working :thinking:

I’m so sorry for my late reply :flushed:
I have a lot of exams these past and next few weeks and not a lot of spare time. I will get back to you, but I have to focus on work and school first…

1 Like

Thank you so much for this. Really looking forward to using it. I imported your version 2.3, made the changes to English in Set variable “tomorrow” and if Name is Never, and the two calls to Home Assistant and selected my server.

When I run the shortcut, I’m getting an error “Could not run Call Service. The operation took too long to complete. Please try again.”

How do I troubleshoot it? I did select Always when the first question popped up asking for permission to write to HA.

SOLVED. Actually, it was a format issue. I had to change the Time to HH:mm:ss. Thank you. I didn’t know about iOS shortcuts yesterday, and now I’m a big fan!

Could you share where you changed time to this format?

I updated to iOS 16.4 and there it is also working (with english language). Would be nice to find out how we can solve the problem with german language selected… :slight_smile:

Right before the first Call. Click on Time and change it to Custom and enter yyyy-MM-dd HH:mm:ss.

Also before the second Call, click Time and change it to Custom and enter HH:mm:ss

Mine sharing the modified flow?

I’m not sure how to do that. It is not obvious from the screenshots.

The share icon at the bottom and share iCloud link.

Here it is: Shortcuts

1 Like