How to Make a HomeKit Accessory Turn Itself Off

Originally published at: How to Make a HomeKit Accessory Turn Itself Off - TidBITS

The morning started abruptly. My wife Tonya’s alarm, which was set to follow her iPhone’s ringer volume, went off way too loudly. (We later fixed that by turning off a new iOS 27 option at Settings > Sounds & Haptics > Alarms and Timers > Match Ringtone Volume and setting a stable volume.)

Then, eager to see the first snow of the year, she asked Siri on our bedroom HomePod to “Open the bedroom shade.” Unfortunately, the correct phrase uses the plural, “Open the bedroom shades,” and old Siri—it’s running on an original HomePod—somehow interpreted the command as a request to turn on every accessory in the bedroom. Let there be light!

Alas, light wasn’t all there was. One of the accessories in the bedroom is our HomeKit-controlled electric mattress pad, which could be a wee bit dangerous if Siri misinterprets a command and turns it on during the day, as happened this morning. The mattress pad has a built-in 1-hour automatic shutoff feature, but to alert us sooner, I had configured the Home app to play Glenn Frey’s song “The Heat Is On” on all three of our HomePods whenever the mattress pad comes on between the hours of 7 AM and 9:30 PM (see “Getting Warmer with a HomeKit-Controlled Heated Mattress Pad,” 9 December 2024). It has saved us from inadvertent triggers a few times in the past two years, so it felt worthwhile.

This audio warning plays at a fairly high volume, causing us to freak out and yell at Siri to stop playing. Unperturbed, Siri calmly asked if we wanted to stop playback on HomePods other than the one in the bedroom. We couldn’t hear that over the music, which may also have been drowning out our increasingly strident commands. When Tonya tried tapping the top of the HomePod to stop the music manually, she accidentally tapped multiple times, pausing and resuming playback repeatedly. Eventually, one of these commands stopped the music, and, drained by the excitement, we considered going back to bed.

It wasn’t our finest home automation moment. Clearly, something had to be done.

Peaceful Easy Morning

First, I wondered whether the Apple Intelligence-enhanced Shortcuts app in iOS 27 could help here, so I described what I wanted. Although Apple Intelligence has previously built working shortcuts for me from descriptions, the Shortcuts app pleaded incompetence, and when I asked it to create a home automation in the Home app instead, it got confused and tried to push me into the editor.

Three Shortcuts app screens: a request to turn off the mattress pad when it turns on between 7 AM and 9:30 PM, a reply suggesting a Home automation instead, and a prompt to open the Shortcut editor.

Back to the Home app to see if I had missed something. My audio warning automation detects when the mattress pad turns on from 7 AM to 9:30 PM, and then it plays audio on the HomePods. Fairly straightforward, but it would be better if it simply turned the mattress pad off again. However, when an accessory triggers an automation, the Home app leaves that accessory out of the list of scenes and accessories the automation can control. As you can see below, Mattress is missing from the Bedroom accessories.

Two Home app screens: an automation that plays audio on the bedroom HomePod when Bedroom Mattress turns on from 7 AM to 9:30 PM, and the accessory list for that automation, which lacks Mattress.

Already Gone

But here’s the thing, and I’m annoyed I didn’t discover this years ago. (It has been there since iOS 13.) At the very bottom of the screen where you select scenes and accessories to automate (tap Select Accessories and Scenes in an existing automation), there’s a Convert To Shortcut button. Tapping that brings up a weird Shortcut screen containing a single Set Scenes and Accessories action. Tapping the faded Scenes and Accessories placeholder in that action brings back the list of scenes and accessories. This time, Mattress is available to be selected.

Three Home app screens: the Convert To Shortcut button at the bottom of the accessory list, a shortcut with an empty Set Scenes and Accessories action, and the accessory list with Mattress selected.

After I selected Mattress, tapped Next, set the Mattress tile to Turn Off, and tapped the checkmark, I was back at the super weird screen (what’s with the double back arrows?). Tapping its checkmark button gave me exactly what I wanted. (Which was good, because there’s no way to switch things back without creating a new automation.) Now, when the mattress pad turns on between 7 AM and 9:30 PM, a single-action shortcut turns it back off immediately with no driving rock song alert needed.

Three Home app screens: Mattress set to Turn Off, the shortcut’s Set Mattress action, and the finished automation that runs the shortcut when Bedroom Mattress turns on between 7 AM and 9:30 PM.

I understand why Apple doesn’t let you control an accessory from an automation triggered by that same accessory—there are undoubtedly some universe-destroying contradictions involved in such an approach. But the solution is so well hidden that most people will never find it. For giggles, I asked Siri AI about the problem, and after three missteps, it actually got the right answer, albeit with an unnecessary step of searching for a Control action that the converted shortcut already contains.

Four screens of a Siri AI conversation in which Siri schedules unwanted automations, offers instructions that won’t work, and finally explains how to use Convert To Shortcut to turn the mattress pad off.

Still, it’s a massive improvement on old Siri. Mostly. Two of its missteps involved cheerfully scheduling the mattress pad to turn off the next time we leave home and at 7 AM tomorrow, neither of which I requested and both of which I had to delete from the Home app.

The same approach should work for any accessory that should never be on at certain times, such as a space heater on a smart plug or outdoor lights during the day. Just remember that the automation fires regardless of intent, so you’ll need to disable it temporarily if you ever do want that accessory on during those hours.

2 Likes

A good description - thank you Adam.

On a related issue, a few years ago I found a way to turn an accessory off after a selected number of minutes after it is manually turned on (via the Home app) - but it involves using another accessory as a dummy timer:

1 Like

I have used Indigo for home automation for years. Massively powerful, albeit with a learning curve. Very good tech support and documentation.

HomePod’s actions can be eyrie, but they can also Frey your patience.

Thank you Adam

I used this cumbersome trick long time ago to let an on/off switch act like a push button.

In all those homekit automatisms I always ask myself, what my home is doing in absence of me :face_with_monocle::sweat_smile:

Does anyone as experience with homekit logging? I searched many times for software but never installed anything as I cannot test paid software and have no clue if it can log what I’d like to see …

Marcel