3 ms·
I’ve been struggling to make a simple “door left open too long” alarm. The first problem I ran into was weird inconsistencies between personal shortcuts that ru
by sholladay 1y ago
I’ve been struggling to make a simple “door left open too long” alarm. The first problem I ran into was weird inconsistencies between personal shortcuts that run on your device vs home shortcuts that run on HomePod. For example, there is no Speak Text action on HomePod, so I can’t have the alarm say “front door open” unless it runs on my phone, which means it won’t work when I’m not home. Oh well, a generic alarm sound will have to do. Oh wait, it doesn’t have that, either. The alarm sound has to come from Apple Music. That means this alarm relies on the internet! Oh well. At least there are plenty of sound effects albums on there. Hey, why isn’t the alarm working today? Oh, that album was taken down, probably due to a copyright dispute. That’s annoying, but at least there are plenty more to choose from. WTF, it’s not working again, only a month later, same thing. Fine, more whack—a-mole…
Next problem: I had to set the alarm sound to play at high volume since the effect itself is relatively quiet. Woah! That volume is permanent and now after an alarm, everything plays loud. Ok, no problem. I’ll just have the shortcut get the current volume and save it to a variable at the beginning and then change the volume to that variable at the end. Oh, there’s no way to set the volume to the value of a variable? WTF? The HomePod has actions for resizing and rotating images, even though it doesn’t have a display, but it can’t do what I need it to as a speaker?! Alright, hardcoded 50% volume will have to do.
Final problem: My shortcut repeatedly waits a few seconds and then checks the state of a door sensor in a loop. It would be nice if I could have a condition to exit the loop early but keep running the rest of the shortcut. Oh, Apple made a whole scripting system for shortcuts but didn’t include a `break` keyword. Lovely.
I officially have a love/hate relationship with shortcuts, which leans towards hate most of the time.