This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/Keliam on 2023-10-04 15:44:43.


I use some things with the Shortcuts app to run various Homeassistant scripts/tasks with voice commands, NFC tags, etc. But I’ve always wished I could run something on my iPhone from a Homeassistant trigger. In my case, when I go to bed -> change brightness, ringer, orientation lock, sleep mode. When I wake up, undo the last 2. With iOS17 this is possible, now that you can trigger an iOS shortcut with a received email.

Prerequisites:

  • Homeassistant
  • iPhone
  • A SMTP account set up in Homeassistant
  • An iCloud email, or one that will push notify your iPhone (I don’t believe Gmail accounts allow this)

Once you have those set up, use your automation/trigger of choice in Homeassistant to send an email. I use the subject line “wakeup” in this example. In the Shortcuts app, create a new automation. “When I receive an email” and specify the email account you have connected to Homeassistant. I’ve actually created a Gmail account specifically for Homeassistant related things, so I’ll only ever get emails from that account for this purpose. You can also set a filter for subject, which I’ve done as I plan to do this for different uses. Then set it to run immediately, and choose the shortcut you wish to have run!

In my testing, I had my phone simply toggle the flashlight. I made sure the phone was locked and ran the automation. I believe it takes ~5-10 seconds (which I thought was more than fast enough) and sure enough, my phone flashlight came on.