It started with a handful of Philips Hue bulbs, simply because they run on Zigbee. I already had a Zigbee dongle running with Home Assistant’s built-in ZHA integration (Zigbee Home Automation) for other devices in the house, and Hue bulbs are among the most widely used Zigbee bulbs on the market – they could be paired directly into the same network, bypassing both the Hue Bridge and Philips’ own app.
The bulbs were the easy part

A Hue bulb pairs like any other Zigbee device – Settings → Devices & services → ZHA → Add device. It showed up on its own, with no extra setup or files needed. Home Assistant names it after the manufacturer, and from there it’s just a regular light entity that I can turn on, turn off, dim and set the color of from automations or the dashboard. At the same time, the Hue bulbs act as routers on the Zigbee network and strengthen it.
The hard part came with the switches
The hard part came only once the ordinary wall switches had to be synced up with the bulbs – I wanted selected bulbs to be dimmable and color-adjustable from Home Assistant, but without giving up on the switch still working manually, the way you’re used to, without anyone first having to open an app to get light.
An ordinary switch that simply cuts the power can’t dim or change the color of anything – it can only turn things on and off. And a smart bulb that loses power whenever the switch is turned off also loses its connection to the Zigbee network, and can’t be controlled again until it gets power back.
So I decided to try a Philips Hue Wall Switch Module, wired – a small module that sits behind the physical switch and, instead of cutting the power, sends a signal whenever someone presses it. The bulb keeps its power the whole time, and the press becomes something Home Assistant can react to.
There was no room in the box

Before any of the software side even became relevant, I ran into purely physical problems. The first was space: the Hue module has to sit in the box behind the switch mechanism itself, and even though the module is small, there’s rarely enough room. Older Danish installation boxes in the Fuga system are often only 30 mm deep, and even with newer 49 mm boxes it can be difficult to fit enough room behind the mechanism for the Hue module. In my installation, an electrician ended up having to replace both the box and the frame to make the necessary room before the Hue module could be fitted.
The second was the switch itself. An ordinary Fuga rocker switch stays in the “on” or “off” position, but the module works better with a clean press signal to react to. That’s solved by fitting a small spring behind the rocker, so it springs back to center after every press instead of staying put – afterwards it effectively works as a push-button switch, without anyone being able to tell it apart from an entirely ordinary switch just by looking at it.
The module didn’t speak ZHA’s language without help
The next problem was that it didn’t work the way I’d expected, straight from pairing. The newest version of the module – the one that identifies itself in ZHA as “ROM002” – isn’t understood at all out of the box. When you press it, it sends a message in a private, manufacturer-specific format. Without help, ZHA has no idea whether the message means “short press”, “held down” or “released”. The module showed up in the ZHA device list, but did nothing useful.
The solution was a so-called ZHA quirk: a small piece of code that translates the module’s signals into clean, recognizable events like “left button pressed” or “left button held down”. Quirks are ZHA’s own system for exactly this kind of thing – fixes for devices that don’t quite follow the Zigbee standard by the book, and it’s far from only Philips products that need them.
I found existing quirks for earlier versions of the module on GitHub, but none of them covered this newest hardware revision (the one identifying itself as “ROM002”). Using that as a starting point, and with AI (Anthropic’s Claude) helping to adapt the code to this specific model, I ended up with my own version – you can find it here: quirk for the Hue Wall switch module, ROM002. The file needs to sit in a folder that you point the ZHA integration to in your setup.
Catching press, hold and release
With the quirk in place, the module finally started sending something usable: an event for a short press, one for hold, and one for release. Short press became a simple automation that turns the lamp on or off – something an ordinary switch would otherwise just do by itself now has to be built as a rule. Hold and release I used for dimming. A hold starts a gradual brightness change, and a release stops it exactly where the light was. A small routine moves the brightness step by step and reverses direction at the bottom and top, so it feels like an ordinary dimmer – even though under the hood it’s really two separate events kept in sync with an ongoing process in between.
Was it worth the trouble
It was more involved than I’d imagined. The bulbs needed nothing more than ordinary ZHA pairing, but the switch module was harder work: space in the box, a quirk to get the module speaking ZHA’s language, an automation listening for press, hold and release, and a dimming routine keeping switch and light in sync. I got what I wanted – bulbs that can be dimmed and color-adjusted, without anyone needing to learn anything new to turn on the light – but it was a far cry from the small afternoon job I’d pictured when I put up the first bulb.
Equipment used in this setup
- Philips Hue bulbs (Zigbee, dimmable/color-adjustable)
- Philips Hue Wall Switch Module, wired
- Zigbee dongle/coordinator for Home Assistant
- Assorted surface-mount boxes and Fuga frames, plus springs
About the code
This article describes the principles and the obstacles I ran into along the way – not the concrete Home Assistant automations. The code will depend on your specific installation regardless: the device’s Zigbee address, entity names, and which bulbs are being controlled. The automations for press, hold, release and dimming can be generated with AI, provided the AI is given the technical background described above.
The quirk for the ROM002 module itself is the exception – it’s shared as finished code via this link. It was developed with help from AI (Claude), based on existing quirks for earlier hardware revisions found on GitHub.