Set iOS Focus mode

So for a while I’ve just been turning on my sleep focus through Siri Shortcuts because as far as I’m aware you can’t set focus modes in HA.

Today I was also trying to set my gaming focus when my PS4 is playing to no success. I tried getting the HA status of the PS4 in shortcuts which I couldn’t get working, so I then tried exposing the PS4 into HomeKit but because you can’t run shortcuts alongside HomeKit it wouldn’t work.

I know HA can read if a focus is on but I’d love to be able to set a focus mode from HA

Not sure if anything has changed since Oct 2021, but this says an iOS app cannot set focus mode.

However, MacOS can run a shell script containing “shortcuts run (whatever)”, and a shortcut can set focus mode. I have an always-on MacBook running Node Red, which receives an MQTT message from HA to run the shortcut. Clunky, but it works.

EDIT: This shows how an iOS app can run a shortcut, so I guess the companion app could be configured to run a helper shortcut to set the focus mode.

I do have a MacBook Pro but it’s a 2015 model so it’s stuck on the macOS before shortcuts was introduced :thinking:

I have a 2012 MacBook Pro :rofl:.

I followed something online on how to upgrade (might have been this). I haven’t had any issues with it since.

Yeah I’ve tried it twice! First time it worked then something went wrong with it, then the second time it just wouldn’t boot :rofl: