Over time, I’ve seen many people claim to solve this problem but, so far, I haven’t found any that properly deal with all the necessary scenarios. Before I get my hopes up again, can you confirm that all the following scenarios are handled with your shortcut?
No: it depends on how you use your alarms and how you’d like to use them in HA itself. I only ever really use the Bedtime / sleep schedule and created the shortcuts-automation around this. So it happens to take ‘normal’ repeating alarms into account, but not one-time alarms. But again, I don’t use those, so I haven’t thoroughly tested the shortscuts-automation dealing with them.
Furthermore, the way Apple has implemented alarms in iOS and the way the shortcuts-app can access this data, has it’s limitations. Like I mentioned above, it can’t detect you’ve ‘skipped’ a planned alarm and will always send it to HA.
Yes?: you could use names for your ‘normal’ alarms and tweak the shortcuts-automation to filter accordingly to handle these too. It ought to work that way, but I can’t imagine all your ‘necessary scenarios’, so can’t tell you wether this would help or not.
I certainly understand the complexity and limitations at play, as I’ve tried a few times to build a shortcut myself before parking the effort until such time that I had more opportunity to focus on it. At the same time, as I said, I’ve seen a number of people try to solve the problem and not get all the way there. That was the only reason I asked - to see which scenarios you’ve accounted for, which you haven’t, and how easily your solution can be extended for additional scenarios.
Thanks for your response. I’ll be sure to download it and give it a try. Cheers!
I’ve just updated the link to the real ‘last version’. Hope you find it useful and can make it work for your use-case!
I just stick to the bedtime/sleep schedule alarms, I have no use for the normal alarms. Makes it a lot easier
I need to wake up on time, even on off days, because of my medications. So I wake up anywhere between 6 and 8. For the rare occasion I don’t set my alarm (skipping a planned alarm), I created an override in HA to not trigger the wakeup-light. There is no way to do this within Shortcuts that I’m aware of. So the bedtime/sleep schedule fits my needs perfectly.
I’ve got troubles understanding what happens after the first if-clause, ie what does “Set datetime to Time on Dictionary”. Specifically, what does “datetime” do or mean?
The shortcuts-automation sends the data to HA, but HA only accepts this data in the form of a dictionary.
So the dictionary needs a key (‘datetime’) with a value (‘2023-01-22 12:00’) and an entity where this information needs to be stored (‘input_datetime.example’).
It’s the same as setting a value with yaml in the developer tools:
It seems the blueprint only accepts sensors with a date-time (ISO8601) format. There is no service for the Shortcuts-automation to set the value of a sensor.
But, you could tweak the automation and use the ISO8601 date-time formatting (instead of my custom one) to be send to a input_datetime helper and create a custom sensor within HA that sets a sensor with the same timestamp to be used in the blueprint.
Tank u so much for the fast answer. Since my knowledge of homeassistant is quite little, would u mind explaining more detailed, what i have to do? That would be great! Thx <3
Hi, i have imported the shortcut 2 days ago, i have every day set an alarm with bedtime. but not everyday at the same time. the shortcut has worked for 1 day the other days the datetime is not updated. in HA.
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?