I’m not proud of this Home Assistant smart lighting hack, but it works

It’s no secret that smart light switches are better buys than smart light bulbs, but I don’t have any smart switches installed yet. That’s what led me to devise a delightfully devilish hack that still lets me use my existing light switches to turn on my smart bulbs in a pinch.

It’ll have to do until I finally get around to installing smart switches. Here’s how it works.

What’s the problem?

Believe it or not, there are no overhead lights in my living room, dining room, or bedroom. We replaced the overhead lights with large fans, opting instead to light the room with lamps. An automation triggers ten minutes before sunset to turn on a low-energy lamp so that the cats aren’t sitting there in darkness until we get home.

But the kitchen, laundry, and bathroom all use standard overhead lights and switches on the wall. Because I’m a huge fan of automating routines, particularly the one I trigger when I’m in bed, I’ve installed some cheap IKEA light bulbs in these areas. This means that the light switches need to be left in the “on” position for the automations to trigger, either using scenes, voice controls, or (heaven forbid) a smart device.

An IKEA smart bulb in a kitchen overhead light. Credit: Tim Brookes / How-To Geek

I know, I know. I’m breaking the most basic rule of designing a smart home: don’t take away functionality. I don’t have enough cheap IKEA remotes to stick to the wall in place of a real smart switch, so I’m resorting to a dirty hack that allows me or guests to turn on the lights using the smart switch in an absolute pinch.

The vast majority of the time, the lights are triggered by a scene, a voice command, or a motion sensor. This is just a backup, I promise.

I’m not proud of this solution

All my lights and switches rely on a Zigbee mesh network and Home Assistant’s Zigbee Home Automation integration. If I access my Zigbee network using this integration, I can see the default settings for each device. Under the “Configuration” tab, there’s an option for “Start-up behavior.”

This controls what happens when the light joins the network. By default, this is set to “PreviousValue” which is to say that if someone turns off the light switch at the wall and the IKEA smart bulb disappears from the network, turning it back on will restore its previous state. This works great during a power cut, since all the lights that were on when the power went out will come back on again.

But if you change the “Start-up behavior” value to “On,” your light bulb will always light up when it joins the network. This means that if you need to reach for a light, and it’s already on, you only need to toggle it off and then on again to turn it on.

Modifying the start up value of an IKEA Tradfri light bulb.

The light is now “stuck” on until you turn it off using a voice command, scene, or smart device. In my case, that’s not a huge issue since scenes do most of the heavy lifting in my small house. This works for other Zigbee devices on my network, notably smart plugs.

But wait, there’s more! You can actually go one better and choose “Toggle” in the “Start-up behavior” drop-down box. Now all you need to do is flick the switch a few times until you get the desired result. This means that with enough flicks, you can turn a smart bulb off and leave the switch in the “On” position so that future voice commands and scenes will still work as normal.

I know this is a sin, I know it’s a dirty hack, and I know that it’s not a long-term solution. But it works, perhaps a little too well. You should be able to do this with any device that allows you to modify its startup behavior, Zigbee or not. Home Assistant keeps track of the state and makes changes accordingly.

Smart switches are on the way

Of course, I really want smart switches. I want them installed even in the living room, where I have no overhead lights, so I can turn on the whole room with a good old-fashioned switch. I want to be able to send different commands from my smart switches, like a “press and hold” to turn on every light in the house.

Tapo S505 smart light switches in a kids' bedroom. Credit: Bertel King / How-To Geek 

I want to bind my smart switches to lights, so that they continue to work in the unlikely event that my Home Assistant server goes down. I’m adding fan controller switches to the same panels, too. I’m doing all of this with Zigbee, extending my mesh network as I go.

But in the meantime, I’m tapping on the kitchen light switch like I’m sending a message in Morse code, and I’d be lying if I said I wasn’t a little bit pleased that I figured this out.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top