HomeKit Automations That Actually Help
My theory of smart home automation is simple: the best automations are invisible.
The goal is not a phone full of remote controls. It is to have the home land in the state you wanted anyway, like the lights on, the doors locked, the porch lit, or the media paused, without explicitly thinking about it. A good automation should feel like the door at a department store opening before you get there. The house notices the situation and moves into the right state.
One of my main success metrics is how often I have to pull out my phone. If I have to open an app to turn on a light, close the garage, or make the room feel right, that is minus points. Home automation should be automatic. It should get out of the way. My north star is to make the house do what we want, when we want it, while minimizing the number of times anybody has to become the remote control.
The reverse is also true. If I am taking a shower and the room goes dark because a motion sensor was placed badly or its timeout is too short, that is negative points for me as the person who implemented it. The house did not become smarter. It made me stop living in the room and start debugging it.
Getting there takes tinkering. Every family has different habits, tolerances, rooms, and devices that are reliable in their own annoying little ways. Most HomeKit automation advice stops at the obvious stuff: turn on the porch light at sunset, turn it off at sunrise, maybe run a scene when someone gets home. Those are useful, but they are not the automations I think about much.
The automations I care about are the ones beyond the basics: little household systems that make HomeKit feel less like a remote control and more like a quiet helper. They are also the ones that usually need “Convert to Shortcut”, a dummy switch, or a carefully chosen accessory state.
The gear underneath matters
Two ecosystems take up roughly 80 percent of my smart home headspace: Philips Hue and Lutron Caseta.
Philips Hue is mostly smart bulbs, which means the smartness lives in the bulb, not the switch. You generally control those lights with automations, the Hue app, HomeKit, voice, or Hue remotes. The catch is that the bulbs need constant power. If a guest flips the normal wall switch off, the Hue bulb disappears from the bridge. HomeKit cannot control what is not powered.
That is confusing because guests know how light switches work. So you get into the awkward habit of saying, “please do not touch the light switches,” which is almost the opposite of invisible. It is also one more way Hue can send you into debug mode: is the bulb flaky, is the bridge weird, or did somebody just cut power to the circuit?
If I were starting over, I would lean harder into Lutron Caseta. Lutron has been rock solid for me. I basically never debug it. The smartness lives at the switch, and the bulbs can be normal dumb bulbs. More importantly, the switches act like light switches because they are light switches. Guests can press them. Kids can press them. Nobody needs a house briefing.
The reason I still like Hue is the light itself. Warm ambience matters. Cooler light during the day and warmer light as the evening goes on helps the house feel like it is winding down. I do not discount Hue entirely. It just comes with a mental model everyone has to learn.
The tradeoff is simple: Hue is better when the quality and color temperature of the light matter. Lutron is better when reliability and normal-human switch behavior matter. If a smart home is supposed to disappear into the background, Lutron gets you closer by default.
With that context, here are the patterns that have been most helpful to me.
A Good Night scene that retries itself
Start with the most software-engineering-shaped pattern: if the command sometimes fails, try it again.
I wanted to call this one Goodnight Gorilla, after the children’s book where bedtime turns into a tiny chorus of good nights. The name is silly. The implementation is not.
The problem is Philips Hue. Hue lights are some of the flakiest devices in my HomeKit setup. When we say, “Hey Siri, good night,” one or two bulbs might linger on even though the scene ran. So I applied a boring software engineering trick to the house: retry the operation.
The setup is slightly sideways on purpose. My Good Night scene turns off a Lutron Caseta switch for the driveway light. That switch would almost never be turned off manually between 10 PM and 2 AM, and Lutron is reliable enough that I trust it as the trigger. So the first normal Good Night scene turns off the Lutron switch, and that switch turning off starts this failsafe automation:
Repeat 10 times
Wait 1 second
Set Good Night
End Repeat
That is it. Ten seconds of stubbornness. Since adding it, we have not had a flaky Hue bulb stay on after telling Siri good night. We have seen a bulb turn off a second or two later than expected, which is exactly the kind of small delay I will happily accept over telling Siri good night again, and possibly again, until the last Hue bulb finally turns off.
This is useful because HomeKit scenes are not always as atomic as they pretend to be. The Hue-specific version is less mysterious than “smart homes are flaky.” Hue bulbs do not talk directly to Wi-Fi; the Hue Bridge talks to them over a Zigbee mesh, where each bulb can act as a repeater. A bulb at the edge of the mesh, a busy Bridge, 2.4 GHz Wi-Fi noise, or a burst of scene commands can all look the same at bedtime: one light misses the command. Re-sending the same idempotent scene a few times makes the final state much more reliable.
This does not replace fixing Hue itself. If the same bulb is always the straggler, I would look at the mesh first, then try boring radio fixes like changing the Hue Zigbee channel or splitting a very large Hue setup across Bridges. The retry loop is for the intermittent version, where I do not need to know exactly which tiny thing went sideways at 11 PM. I just need the room to be dark.
To build it:
- Create the scene you actually want, like
Good Night. - Include one highly reliable accessory in that scene that can also act as a trigger. Mine is a Lutron Caseta switch controlling the driveway light.
- Create a second automation from that reliable accessory changing state, scoped to the time window when it should only happen because of the scene.
- In the automation action picker, choose
Convert to Shortcut. - Add
Repeat,Wait, andSet Scene. - Keep the loop short enough that it is helpful, not annoying.
The trick is that the scene must be safe to run repeatedly. “Turn these things off” and “set these lights to this level” are good candidates. Anything with side effects that should happen once, like sending a message or toggling a device, is not.
Doors that lock later, unless the real world changed
The next pattern starts from the same native-first instinct. Less custom glue means fewer failure modes and fewer things for future me to remember. Schlage has an auto-lock feature in its app, so I tried that first.
The problem is that Schlage’s auto-lock is basically a timer. You unlock the door, pick something like “lock again after 2 minutes,” and the clock starts. It does not care whether the door is physically open. If a guest is bringing suitcases in and the door stays open long enough, the deadbolt can extend while the door is still open. Then somebody closes the door like a normal person, because of course they do, and the deadbolt hits the frame.
So my HomeKit version uses a contact sensor and a little more state. I do not want a door to lock immediately every time it closes. Sometimes I am carrying things in. Sometimes someone is right behind me. But I also do not want to wonder whether the door is still unlocked half an hour later.
The front door and back door both use the same pattern:
When the contact sensor closes
Repeat N times
Wait interval
If any are true:
Contact sensor is open
Lock is already locked
Lock is jammed
Stop this shortcut
End If
End Repeat
Set door lock
My front door checks every 5 seconds for 5 minutes. My back door checks every 60 seconds for up to an hour, and only runs when somebody is home.
The important bit is the stop condition. The automation is not just “wait and lock.” It keeps asking whether locking still makes sense. If the door opens, the lock is already locked, or the lock reports a jam, stop. Only after the door has stayed closed and unlocked for the whole delay does it lock.
This turns a HomeKit automation into a tiny state machine:
closed -> wait -> still closed? -> still unlocked? -> not jammed? -> lock
That is the part the native timer was missing: awareness of the actual door. It also makes the automation easier to tune. A front door might want a short delay; a back door might want a long one; a garage entry might want a different set of guards.
For this setup you need a lock and a separate contact sensor if your lock does not reliably tell HomeKit whether the door is physically open. The contact sensor is the difference between “the lock is unlocked” and “the door is safe to lock.”
A notification webhook for events Home does not handle well
That native-first rule has a limit. Sometimes HomeKit exposes more than Apple’s Home app lets you touch. That is where I use Controller for HomeKit. It gives me access to HomeKit details and automation options that exist underneath the native Home app, plus a way to send notifications to my phone from an automation.
There are bigger power-user options here, too. Homebridge and Home Assistant can unlock a lot of smart home behavior, but they usually mean running your own home server and accepting more tinkering. That is more machinery than I want. I am trying to stay as close to the native HomeKit architecture as I can, with as few third-party dependencies as I can get away with.
The problem I am solving is very real-world and very North Carolina: sometimes our wooden door gets into a funky state where it does not close all the way. If the auto-lock engages while the door is in that state, the lock jams. Not fun, especially if we are leaving the house.
The native Home app does not give me a good way to notify myself when that happens. In fact, it does not even expose the lock’s Jammed state as something I can easily build around. Controller exposes both pieces: the jammed state and the notification tool.
The automation looks like this:
When the door lock becomes jammed
Get contents of https://api.controllerforhomekit.com/notify/<token>/<event-name>
In my setup, the event name is for a jammed-door notification. The real token stays private, because that URL is effectively a tiny notification API key. If the door jams as we are leaving, I get the notification while I can still turn around and fix it.
This pattern is useful whenever the thing you want is not another light, scene, or accessory state. You want a specific alert, and maybe a trigger from a HomeKit state the Home app does not make obvious.
To build it:
- Create the notification URL in Controller for HomeKit or whatever notification service you trust.
- In Controller, create the accessory automation that detects the hidden event, like the lock becoming jammed.
- Convert the automation action to a Shortcut.
- Add
Get Contents of URL. - Paste the notification URL.
- Test it once, then treat the URL like a secret.
The creative part is realizing that a HomeKit automation can do more than set accessories. It can make a network request, which lets HomeKit talk to services that fill in the gaps Apple leaves without rebuilding the whole house around a server.
Arrival scenes by time of day, not one giant “I’m home” scene
The same native-first instinct showed up with lighting. Philips Hue has a nice Natural Light scene that makes lights bluer during the day and warmer in the evening. In theory, Hue can use location services to apply that sort of lighting when you come home.
In practice, in typical Hue fashion, it was unreliable. I do not know whether the failure was Hue, Apple’s location privacy protections, or some awkward dance between the two, but the result was the same: we would sometimes come home to a dark house.
So I rebuilt the idea manually in HomeKit: one scene per time of day, each one roughly matching the color temperature and brightness I want at that point in the day. Morning is energizing. Daytime is focused. Evening gets warmer. Late night gets dimmer.
This is also where Controller matters again. The Home app does not show the full shape of these automations. In Controller, they are start events joined with OR, plus conditions that decide whether the scene should actually run. In plain English: wake up when something relevant happens, then check whether this is still the right scene for the room.
The lounge setup looks like this:
| Window | Start events | Conditions | Scene |
|---|---|---|---|
| 12 AM to 7 AM | Somebody arrives home | Somebody is home and it is between 12 AM and 7 AM | Lounge Nightlight |
| 7 AM to 10 AM | First person arrives home or it becomes 7 AM | Somebody is home and it is between 7 AM and 10 AM | Lounge Energize |
| 10 AM to 5 PM | First person arrives home or it becomes 10 AM | Somebody is home and it is between 10 AM and 5 PM | Lounge Concentrate |
| 5 PM to 8 PM | TV becomes inactive, somebody arrives, or it becomes 5 PM | Somebody is home and it is between 5 PM and 8 PM | Lounge Read |
| 8 PM to 10 PM | TV becomes inactive, first person arrives, or it becomes 8 PM | Somebody is home, it is between 8 PM and 10 PM, and the TV is inactive | Lounge Relax |
| 10 PM to 12 AM | TV becomes inactive, first person arrives, or it becomes 10 PM | Somebody is home, it is between 10 PM and 12 AM, the TV is inactive, and the driveway light is on | Lounge Rest |
The OR start events are the key. The scene can run when we arrive, but also when the house is already occupied and the next lighting window begins. That is what makes it feel more like Natural Light and less like a one-time arrival scene.
The TV guard matters. If the TV is already on, I probably do not want an arrival automation to blast the room into a brighter reading scene. The same TV state also drives a little Theatre mode at night: when the TV becomes active after sunset plus an hour, the lounge goes to Lounge Nightlight; when the TV turns off, a separate automation can bring nearby lights back up. If the driveway light is on late at night, that is a useful signal that we are still in a “not fully asleep yet” mode.
The setup rule is simple: make one automation per outcome. Do not create a universal mega-automation unless the trigger language supports the branching you need. HomeKit is easier to reason about when each automation is boring by itself and clever as a group.
Physical switches as household macros
Some of the best automations are tied to things people already touch.
One example: between midnight and 7 AM, turning on a bedside lamp also turns the hallway lounge lights on at 1 percent. Turning that lamp back off turns the lounge lights off again. This was built for sleepy nighttime trips through the house. Nobody has to say anything, open an app, or remember a special switch. The lamp is the switch.
Another example: the dining room lights act like a macro for nearby lights. Turning them on also turns on the dining room lamps and foyer lights. Turning them off turns those lights off too, with a guard so another room’s state can prevent the shutoff.
This pattern is worth stealing:
When accessory people already use turns on
Set related accessories for that context
When accessory people already use turns off
Clean up the related accessories
It works because the trigger has human intent baked into it. A real person touched the lamp or dimmer. HomeKit just expands that small action into the whole context around it.
A dummy plug as a HomeKit relay
The dummy plug is the same idea turned inward. Instead of a person touching a switch, one automation changes an accessory so another automation has a clean signal to watch. In my setup, when the last person leaves home, Home turns on an Everyone Leaves plug. A second automation watches that plug and runs Leave Home.
That sounds indirect, because it is. But the indirection is the point.
HomeKit is cautious around secure accessories. If an automation includes something like a garage door, door lock, or alarm system, it may require manual confirmation before it runs. I understand why that safety rail exists, but it gets annoying for a Leave Home scene. When I leave home, I already know what I want: close the garage, lock the doors, turn off the lights, and get the house into its away state. I do not want to approve that on my phone every time.
The dummy plug turns the people-based automation into a harmless accessory event:
Last person leaves home -> turn on Everyone Leaves plug
Everyone Leaves plug turns on -> run Leave Home
The first automation does not close a garage door or lock anything. It only turns on a plug. The second automation says, “when this plug turns on, secure the house.” In practice, that lets Leave Home run on autopilot without waiting for me to tap a confirmation.
You can do this with an unused smart plug, or with a virtual switch from something like Homebridge if you already run it. I use a physical plug because I do not want a home server just to get one virtual switch. Either way, name it like infrastructure, not like a lamp.
There are two cautions. First, be honest about what you are bypassing. I am comfortable using this for a scene that closes and locks the house when the last person leaves. I would be much more careful with anything that opens or unlocks an entry point. Second, reset the dummy plug after it fires. If a dummy switch represents an event, decide whether and when it should turn off again. Otherwise, it can become a stale flag and make the next automation harder to reason about.
Courtesy lights are still worth doing
I am not against straightforward automations. They are just not the interesting lesson. The good ones share the same theme: use a specific trigger and keep the action local.
Examples I keep:
- Unlocking the front door at night turns the foyer lights to 70 percent.
- Unlocking the back door at night turns on the back porch lights.
- Opening the garage door at night turns on the driveway and front porch lights.
- Opening the garage turns on the garage lights; closing it turns the lights off and pauses the garage HomePod.
These are small, but they feel good because they match the physical space: door opens, nearby light helps; door closes, nearby noise stops.
The tradeoffs are real
The obvious downside is that all of this takes tinkering. If you do not enjoy adjusting time windows, checking which accessory state is exposed where, or asking why one light has decided to be dramatic tonight, a deeply automated HomeKit setup may not be your cup of tea.
The less obvious downside is that a smart home can be very smart for the people who live there and a little weird for everyone else. My automations work well for our family 99 percent of the time because they are tuned to our patterns. They know what it usually means when the last person leaves, when the TV turns on at night, or when a particular lamp changes state.
But guests do not always fit those patterns. If my wife and I go on a date night and a babysitter stays at the house, HomeKit still sees the usual signal: the last family member left. So the Everyone Leaves automation can run, the house can shut off all the lights, and now the babysitter is sitting in a home that is confidently doing the wrong thing. Smart!
Those tradeoffs are worth it for us. Most of the time, the house quietly does exactly what we want. Occasionally it creates a comical edge case because it does not understand the social context around the sensor data. That is the bargain. Before you build too much of this, it is worth asking whether that bargain is worth it in your house.
What I skip
The obvious sunrise and sunset automations are still in my Home app. So are a few motion lights and seasonal things. They are useful. They just are not the interesting lesson.
The automations that feel most worth writing down have one of these shapes:
- Retry a scene that needs to be reliable.
- Wait, then re-check state before acting.
- Call a URL when Home cannot send the notification you want.
- Split one broad idea into small time-windowed automations.
- Treat a physical switch as a macro button.
- Use a dummy accessory as a relay when HomeKit needs a safer trigger shape.
That is when HomeKit starts to feel less like “if this, then that” and more like a little operating system for the house.