Control iPhone from HA?

I have a “bath time” script that enables DND on Echo Dots, turns on bathtub bulb to 1 % and plays soothing music. I would love to be able to turn on DND mode on iPhone also for this time. How would you do this? I run this script from HA app or, most times, voice command to Alexa. I know I could make a Shortcut on iPhone that would trigger the HA script but is there a way to initiate this from Alexa? Thanks!

You can’t.

I am WAY too late to this party, but although (as tom_I said) you cannot do this directly, you can do it using two, third-party integrations. In fact, you can trigger any iOS Shortcut by calling IFTTT and then integrating IFTTT with Pushcut Server (https://apps.apple.com/us/app/pushcut-shortcuts-automation/id1450936447) . Pushcut runs on a dedicated iOS device (any old iPhone or iPad will work…)

1 Like

Any particular reason you involved IFTTT? Seems like Pushcut has custom webhook support, should be able to just hit it directly from HA with a rest command.

Great point!

I’m a transplant from Homekit itself (I just discovered the amazing HA about a month ago and my pushcut and IFTTT integrate was a necessity from back then. So it was just a left over. I have not dug into the power of HA’s webhooks yet as I am still coming up to speed on the many other aspects of HA, so I had not yet integrated Puscut directly.

That´s a liiittle bit too far for me but very interesting, thanks!

I know I am late but I do the exact same thing with an nfc tag I sticked on the wall in my bathroom.
The nfc tag triggers an ios shortcut that can set the iPhone to DND and at the same time triggers an home-assistant event to do all the other stuff.
Very conveniant in my eyes.

You still have to confirm running these ios shortcuts, right? IOS 13 and older didn’t, but AFAIK 14 and 15 do, which makes these so much less convenient.

You do not have to confirm them. There is an option to run without conformation.
Only thing: the display of the phone has to be active and you always get a push message that the shortcut was startet

Too bad the option to run without confirmation does not apply to Bluetooth triggers (as in, triggering by connecting a BT device). But that’s another story, thanks.