Smart Bulb or a Relay in the Box: the Most Important Buying Decision
Smart Bulb or a Relay in the Box: the Most Important Buying Decision
This is the decision that determines whether a household actually likes the smart home, or just switches it off at the wall. Circuit physics, HA entities, real-life scenarios, and a Plan B: no flowchart, but a test.
You know the categories from Lesson 2. Now we narrow it down to a single ceiling point with a wall switch. Three paths: intelligence in the bulb, in the box, or an installed dimmer. The first two both work. Either can wreck the project if you ignore the household's habits.
Plan on about 85 to 95 minutes.
A real-life problem: the switch beats the app
You install three Hue bulbs in the living room. Scenes work for a week. On Saturday, your father-in-law walks in and uses the switch by the door. The bulbs go dark. In HA, all three show unavailable. That evening you open the app. Your father-in-law says, "at our place it just turns on by hand." And he's right.
Or you choose a relay in the box, but don't check how it's wired and how the input is configured. A correctly mounted module should have constant power, and the plain switch should just be feeding it a control signal. That keeps the module reachable in HA, while the light can still be switched from the wall.
Detach mode is a different approach: it disconnects the wall input from directly controlling the output. You use it deliberately, for example when a smart bulb needs to stay constantly powered, and the wall button is meant to trigger a local action or an automation instead.
What a plain switch physically cuts off
A classic lighting circuit: the live wire (L) runs through the switch to the fixture. The neutral (N) often runs directly to the fixture, bypassing the switch. When you click a single-pole switch, you cut the live supply to the fixture. The fixture loses working voltage. The light source goes dark instantly. This is a teaching model: the actual wiring layout must be confirmed by an electrician; never assume the presence, function, or continuity of a wire based on a typical schematic.
A smart bulb is a light source with a built-in driver, radio, and control electronics. It has an LED driver, a Wi-Fi/Zigbee radio module, a processor, and state memory. All of that needs power all the time, even when the light is "off" from the user's point of view. The manufacturer handles this by putting the bulb into a low-draw standby mode. But with no live power to the fixture, there's no standby. The radio dies. Once power returns, the bulb boots from scratch, joins the network, and syncs its state with HA.
After power is cut, Home Assistant doesn't always immediately show unavailable. For a while it may still show the device's last known state. Once the integration determines there's no communication, the entity gets marked unavailable. The timing depends on the protocol, the bridge, and the specific integration: not on a network "ping" in the literal sense.
Home Assistant distinguishes between an unknown state, where an existing entity's state isn't known, and unavailable, where the entity can't be reached. Conditions expecting on or off shouldn't treat unavailable as a valid state. An automation can still trigger, but the condition won't pass, and the action might throw an error or produce no effect. This isn't a bug: it's the physics and topology of the circuit.
How a correctly mounted relay works
A correctly mounted module that needs L and N has constant power to the module itself, a separate output to the fixture, and a separate control input wired to the switch. Clicking a plain switch changes the state of the module's input. It doesn't have to cut power to the module.
In a typical setup, the module stays online, the switch locally toggles the output, and HA sees the change. Detach mode isn't needed for a plain switch to control a plain lamp through a relay. A wall switch is only a Plan B when, after HA is turned off, it still locally controls the module's output: you have to confirm this with a test.
A plain toggle switch stays in its new position after being flipped. A momentary button returns after being released and sends the module a brief pulse. Both can work with certain relays, but need the right input configuration. Don't swap hardware before checking the module's documentation and consulting an electrician.
What a smart bulb actually gives you
- brightness control with no external 230V dimmer,
- changing the white color temperature, if the model supports CCT,
- RGB or RGBW colors on the right models,
- independent control of individual sources within one fixture,
- reversible mounting with no changes to the installation.
All these features are only available while the bulb's electronics stay powered. So before you buy, you need to settle how a household member will turn it on and off without cutting the voltage.
When it makes sense: renting and reversibility, a floor lamp with a switch on the lamp's cord, a quick single-unit test, needing color or CCT without a dimmer in the box.
If a household uses a wall switch, the smart-bulb option needs a solution that leaves its power constant while still giving intuitive manual control. That could be a module in detach mode, a dedicated remote, a locally paired button, or a suitable wall controller.
When the relay wins
A ceiling used the same as always: a household member clicks the switch, the light turns on. The habit stays. One fixture, several sources controlled together: one relay controls the whole ceiling on/off. A fixture not built for smart sources: a ceiling light with an unusual socket, permanently fixed downlights.
A requirement: an N wire in the box (or a deliberately chosen no-N model), room for the module, an electrician. The HA entity: switch or light. A plain relay gives you on/off: not dimming.
If you want to dim the whole ceiling, don't compare a smart bulb only against a plain relay. A properly chosen dimmer can keep wall control and regulate compatible LED sources. It requires checking the fixture, the load, and the installation with an electrician, though. Details in Lesson 5.
A bulb, a relay, or a dimmer?
| Need | Smart bulb | Relay | Dimmer |
|---|---|---|---|
| Turn the whole ceiling on/off | Possible, but needs constant power | The simplest option | Possible |
| Brightness control | Yes, depending on the model | No | Yes, with compatible LEDs |
| White color temperature or color | Yes, on the right models | No | Usually no |
| Existing switch | Can't cut power | Can keep its normal function | Can keep manual control |
| Working inside the box | Not always | Yes | Yes |
| A Plan B without HA | Needs local control | A local switch after a confirmed test | A local button after a confirmed test |
Detach mode: the input doesn't directly control the output
In normal mode, a module can locally toggle the output once the switch's state changes. In detach mode, the wall input is disconnected from the output. That way the fixture can stay constantly powered, and the click can be used to trigger a scene, a smart bulb, or another action instead.
The input can be handled by HA, a local device script, a manufacturer's bridge, or a direct pairing: depending on the model and configuration. Don't assume every click reaches an HA automation.
If a click triggers only an HA automation, the button may stop doing anything once the server is off. To count it as a Plan B, you have to configure a local response handled by the device, a bridge, or a direct pairing, and check it with HA turned off.
A Plan B for a smart bulb
An app and a dashboard are ways to control things manually, but they aren't an independent Plan B. A Plan B exists when the light's basic function can be triggered without a working Home Assistant.
- a remote is locally paired with the lamp or a group,
- a manufacturer's bridge handles control without HA,
- once power returns, the bulb starts up in a deliberately chosen, safe state,
- a household member knows how to use this method without opening an app.
A plain relay placed ahead of a smart bulb can cut its power and create exactly the problem you're trying to prevent. That setup only makes sense when the module leaves the bulb constantly powered, and the input and failure behavior have been deliberately configured and tested.
A comparison in one room: the living room
Option A: three smart bulbs: independent brightness for each point, colorful scenes, but the switch by the door can't cut power. Plan B: a locally paired remote, after testing. Option B: one relay: the whole ceiling on/off, the switch works as always. Plan B: the wall switch, after testing with HA turned off. Option C: a hybrid: a relay on the ceiling + a floor lamp with a smart bulb. That's two separate points, not a relay ahead of a smart bulb on the same circuit.
One fixture, three sources: together or separate?
Before buying several smart bulbs for one fixture, ask whether you actually want to control each one separately. If they should always light up together, one relay can be simpler. If you want to create independent zones, colors, or light directions, smart sources give you features a shared relay can't.
Function: main light.
Number of sources: three GU10s, always controlled together.
Color: not needed. Dimming: not needed at this stage.
Decision: a relay, after an electrician's diagnosis.
Reason: household members and guests regularly use the switch.
Without HA: the switch has to locally toggle the light.
After power returns: the light should stay off.
Servicing: plain, replaceable sources; the module documented in the house's records.
Behavior after power returns
Some bulbs let you set the post-power-loss behavior: the last state, a specific brightness, turning on, or staying off. The available options depend on the model, firmware, and the integration method. Some devices have special behavior after a few quick power cycles: a reset or pairing mode: important when household members use a plain switch. Check this on a single test unit: the same bulb may expose different settings through a manufacturer's bridge than when directly paired with an HA coordinator.
A scenario: an automation turns off the light at midnight. At 2 AM, a power outage. At 2:05, power returns. A bulb with power-on set to "last state" might turn back on, if it was on before the outage. For a relay, a similar role is played by the "restore after power loss" option in the module's settings. That option can behave differently depending on the integration method; some devices also have special behavior after a few rapid power cycles (a reset or pairing mode): important when household members use a plain switch. Settle it with your household: "after a nighttime power outage, the light should end up off," and write that on the map.
A smart bulb restarting after the live wire is cut
When someone turns on the switch, voltage appears at the bulb. The LED driver starts up. The radio module boots its firmware and connects to the Zigbee bridge or Wi-Fi router. Only then does HA see the entity as on or off. This takes anywhere from a few seconds to a duration that depends on the device and the network. On a poorly functioning network, the device might not come back automatically.
A "turn on the living room to 30% at 10 PM" automation won't work if someone turned off the switch at 9:55. Once switched back on, the bulb might light up at 100% following its power-on behavior, not at 30% from the scene.
Entities and a Plan B: what you see in HA
A smart bulb: a light domain entity. Can support brightness, color temperature, color, and effects, depending on the model. Goes offline once the live wire is cut.
A relay: most often a switch entity, or an entity presented as light. A plain relay still only handles on and off.
A light group: one light entity that lets you control several sources together.
Light groups in Home Assistant
When you have several smart bulbs in one room, you create a light.living_room_group group. Scenes and automations target the group. One unavailable bulb doesn't have to disable the whole group: HA can still send the command to the remaining members. The effect will be incomplete, though: two lamps change state, and the third stays off or unreachable.
A group doesn't add missing features to devices. If one bulb supports RGB and another only brightness, a shared color command won't change what the second one can do. It's best to combine sources with a similar role and a similar feature set into one group.
A light group in the UI
- Go to Settings → Devices & Services → Helpers.
- Choose Create Helper.
- Choose Group, then Light group.
- Add every source belonging to one logical point.
- Check the created entity's ID.
light:
- platform: group
name: Living Room Ceiling Group
unique_id: living_room_ceiling_group
entities:
- light.living_room_point_1
- light.living_room_point_2
- light.living_room_point_3
Scenarios: the kitchen and the bedroom
Kitchen: the ceiling over the counter: a switch used by hand → a relay. Cabinet underlighting: an LED strip, a decorative effect → a controller in the cabinet. The map says: ceiling = switch/light from the box, counter = light.kitchen_strip.
Bedroom: a dimmer in the box for the ceiling plus a remote by the bed is a classic level 2-3 setup. Four smart bulbs require constant power for all four sources and a way to control them manually that doesn't cut their voltage. Most couples lose the switch-discipline battle within the first month.
A three-way circuit and renting
If one light is controlled from two or more locations, don't choose a solution based on the bulb alone. A three-way or four-way circuit needs an electrician to identify the wiring and the control method. Only then do you pick a module, smart switches, or another solution that preserves every manual control point.
In a rented apartment, choose reversible solutions until you have clear permission to modify the installation. Keep the original light sources and fixtures. Coordinate any changes to the boxes with the owner and have an electrician do the work.
Compare the full cost of the solution, not the price of a single device
| Item | Smart bulbs | Relay |
|---|---|---|
| Devices | One bulb for every source | A module plus plain light sources |
| Mounting | Usually no work inside the box | An electrician's diagnosis and installation |
| Extra control | A remote or controller that leaves power on | The existing switch, after a test |
| Features | Brightness, white tone, color, depending on the model | Usually on/off; dimming needs a dimmer |
| Servicing | The bulb is usually easier to replace yourself | The module is hidden; a failure can disable the whole circuit |
There's no universal "cheaper." You're comparing products with a different range of capabilities. A bulb on a high ceiling is harder to reach. A module in the box needs an electrician to mount, but a plain source in the fixture may be cheaper to replace.
Testing a smart bulb without opening the installation
- In Developer Tools, open the States tab and find the bulb's entity.
- Note its current state, brightness, and availability.
- Turn it off using the plain switch that cuts power to the fixture. Don't open the box or the fixture.
- Watch how long HA keeps showing the last state, and when
unavailableappears. - Try running the
light.turn_onaction. Record the result. - Restore power and measure the time until the correct state reappears.
- Check the brightness and color once it comes back on.
- Repeat the test with the internet disconnected, but the local network working.
Frequent, rapid power cycling is sometimes used by devices to trigger a reset or pairing mode. Don't flip the switch repeatedly without checking the manufacturer's instructions.
- action: light.turn_on
target:
entity_id: light.living_room_ceiling_1
data:
brightness_pct: 30
If the bulb has no power, the action won't restore it. Home Assistant controls the bulb's electronics, but can't close a physically broken circuit. We'll cover detach automations in Lessons 4 and 9.
Lesson 3 final check
☐ I know whether I need on/off only, or also brightness, white tone, or color.
☐ I checked whether the existing switch cuts power to the fixture.
☐ A smart bulb has constant power and manual control planned, without the app.
☐ A relay is meant to be mounted so the module stays constantly powered.
☐ I don't treat detach mode as an automatic Plan B.
☐ I checked manual control with HA turned off.
☐ I checked operation without internet, on a working local network.
☐ I recorded behavior after a power loss and restoration.
☐ I checked what happens when one group member is unavailable.
☐ I'm not buying more units before testing one complete point.
What can go wrong
Smart bulbs in the ceiling plus a three-way switch: unavailable from two directions. A relay with no N in an old box: the electrician refuses the install. Detach turned on, but a click only depends on HA: after a server failure, the button does nothing. A light group: one offline unit gives an incomplete scene effect, even though the group itself can stay available.
A hybrid with no notes on the map: the ceiling relay is off, the floor-lamp bulb is also off: a household member sees darkness. For a hybrid, you write down: "ceiling = switch, lamp = light, the Evening scene covers both."
What not to do
Don't buy dozens of bulbs before checking the switch habit.
Don't assume a plain relay needs detach for the switch to work.
Don't mount a relay ahead of a smart bulb on the same circuit without a plan.
Don't treat an app or an HA-dependent remote as a Plan B.
Don't pick a solution for a three-way circuit without an electrician's diagnosis.
Practical assignment
☐ For every ceiling on your map, choose: a bulb, a relay, a dimmer, or a two-point hybrid.
☐ Write down the full decision: function, Plan B, behavior after power returns, servicing.
☐ Run the unavailable test, if you have a smart bulb.
☐ Mark three-way circuits to discuss with an electrician in Lesson 4.
Key takeaways
The switch cuts the live wire to the fixture: a smart bulb loses its radio and goes unavailable.
A correctly wired relay: the module stays powered, the switch locally controls the output: no detach needed.
Detach: a special mode, not a default Plan B; it needs a test with HA turned off.
A dimmer: the third option, when you need brightness control for the whole ceiling.
A Plan B: has to work without the app and without HA: confirmed by testing.
What's next
Lesson 4: what's in your box. The neutral wire, space, a three-way circuit, bypass, and what to tell an electrician before buying a module.
The decision from this lesson, written on the map, is a contract with yourself. Don't buy hardware until you've chosen a variant for a given point and have a justified Plan B. When in doubt, choose the variant that leaves the wall switch to the household and HA to you.