Blog Post: Using ANY iOS 18 + iOS 26 Focus Mode to trigger HA automations

If you are an Apple user and would love to trigger Home Assistant automations based on focus mode changes, this post is for you. While in iOS 18 Apple made this fairly easy for most focus modes, “Sleep” was special for some reason. It was missing the focus mode “on” and “off” triggers that every other focus mode had.

For iOS 18, I have a fresh blog post that uses a simple third party utility to FULLY automate ANY focus mode change on your iPhone. I now have fully automated bedtime scenes that turn on when sleep focus mode is enabled, and a morning scene that is triggered when sleep focus mode is turned off.

In iOS 26 developer beta 1, Apple has removed the sleep focus mode limitations and now all focus modes have the same “on” and “off” triggers. This means no third party tool is needed on iOS 26 to trigger HA automations for ALL focus modes.

Check out my full how-to guide here for iOS 18 and iOS 26:

Hi! Very well written tutorial, easy to follow. But I ran into one problem, the “When” in the shortcuts app doesn’t have the “Is Turned On” or “Is Turned Off”, the options I have are “Wind Down Begins”, “Bedtime Begins” and “Waking Up”. I chose “Bedtime Begins” for turning on Sleep Focus Mode, which works well, but for turning off Sleep Focus Mode neither of the other two options work.

I’m on an iPhone 14 Pro running iOS 18.5.

I solved this issue by an automation that triggers when the state of ‘binary_sensor.(your iPhone name)_focus’ changes to turned off. This sensor is an entity from the Mobile App integration. This seems to work well, but something that maybe could be a problem for someone is that it triggers the automation the even if you turn off one of your other focus modes on your phone, but to be honest I can’t see how that could cause a problem.