Shortcut Struggle - Turn On DND Focus Mode when Smart Plug Turned on via Home

I have a basement office that I use when I work from home. I have a Wemo smart plug, with a night light plugged into it, in the hallway at the top of the basement stairs that I control via Apple Home app.

When I am in a work meeting, I go to the Apple Home app on my Mac and turn on the Wemo Plug (and therefore turn on the nightlight), signaling to everyone in the house that I am in a meeting and should not be disturbed. With the advent of Focus Modes, I frequently find myself then going to turn on the “Do Not Disturb” Focus mode after turning on the plug.

And I’m figuring these multiple actions should be automated so that when I turn on the Wemo Plug via Apple Home, DND Focus Mode should also turn on automatically, and when I turn off the plug via Apple Home, DND also turns off.

I tried setting up a Shortcut for this where the ‘trigger’ is turning on and turning off the Wemo Smartplug via Apple Home and really struggled to figure out how to do what I perceive to be a pretty straight forward Shortcut.

The logic I’m interpreting would be:

If Apple Home turns on Wemo Smartplug, then
Turn "Do Not Disturb" Focus Mode on.
If Apple Home turns off the Wemo Smartplug
Turn off the "Do Not Disturb" Focus Mode.

Please see screen shots below. Do I need to add in additional logic to make this work? What am I missing here? The problem with the below actions is that the first one is triggered by Apple Home while the second does not also turn off the Smart Plug. I’m thinking that this should be a pretty straight forward Shortcut but I’m feeling a little daft here.

Can you turn it around and have the loght/switch go on when you trigger a focus mode? Either DND, or a custom focus mode for work meetings.

It would be really cool if we could trigger automation based on the states in which we set our Apple devices. Unfortunately, HomeKit allows only 5 automation trigger types:

  • People arrive
  • People leave
  • Time of day occurs
  • Accessory is controlled
  • Sensors detect something

I’ve filed a feature request with Apple for this, you should too at Apple HomeKit Feedback.

Hi, you would need to create two separate personal automations. One when the WeMo turns on and another for when the WeMo turns off.

The ‘until turned off’ option you see in the Do Not Disturb action applies to Do Not Disturb, not the WeMo trigger.