Shelly 2-Way Switch Wiring with Home Assistant
1. How conventional Shelly 2-way switching works
Traditional 2-way switching uses two switches to operate the same light. A 3-core and earth cable often links the switching positions, with conductors used as strappers. Adding a compatible Shelly relay can provide smart control while retaining ordinary wall switches.
Our first drawing illustrates that starting point: a Shelly 1 Gen4 controlling the lighting, with two conventional 2-way switches operating its switch input.

Diagram 1: The existing 2-way switch arrangement with a Shelly 1 Gen4.
2. Repurposing the 3-core cable with retractive switches
Here’s where the wiring gets interesting. Instead of keeping the conventional 2-way strapper arrangement, we replace the original switches with momentary (retractive) switches. Each returns to its normal position after being pressed.
Where the cable layout is suitable, the three existing conductors can be reassigned to carry:
- Permanent live for a module at the remote switch position.
- Neutral for that module.
- A hardwired switching signal back to the primary Shelly’s SW input.
The retractive switches are connected to operate the same local input. Both positions continue controlling the original light, but now there is a permanent supply available at the far end of the cable.
Diagram 2: Existing conductors repurposed for live, neutral and a hardwired switch input.
Important: This example assumes permanent live and neutral are available at the primary switch position and a suitable 3-core and earth cable connects the positions. It is not a universal conversion for every older lighting circuit.
3. Extend your Home Assistant Zigbee network with Shelly Gen4
A common Home Assistant headache is weak Zigbee coverage: perhaps a sensor drops off the network or a device at the far end of the house becomes unreliable.
Compatible mains-powered Zigbee devices can act as Zigbee routers, forwarding messages around the mesh. With permanent live and neutral now available behind the second switch, a Shelly 1 Mini Gen4 running in Zigbee mode can provide another powered network point.
The Mini doesn’t need to control the original light. That’s still the job of the primary Shelly. We’re using the existing wiring to position another module where it might improve coverage.
Will it solve every Zigbee problem? No. Metal backboxes, building materials, interference and the position of the co-ordinator all matter. But it can be a useful option before reaching for the wall chaser.
Note: Shelly Gen3 and older Wi-Fi-only devices can provide smart control, but they cannot extend a Zigbee mesh. Use a compatible Zigbee router for that job.
4. Add a ghost switch to control another light
What if the upstairs landing switch could also turn off the downstairs hallway lights, without a new cable between those lighting circuits?
Fit an additional retractive switch at the remote position and connect it to the second smart module’s input. Instead of directly switching a lighting load, the extra button can trigger a Home Assistant automation.
We call this a ghost switch: a normal physical switch with a programmable job elsewhere in the house.

Diagram 3: The original light remains hardwired; an extra switch connects to the second Shelly’s input.
A real-world hallway and landing example
- Button 1: Operates the landing light through the original hardwired Shelly input.
- Button 2: Tells Home Assistant to switch off the downstairs hallway lights.
That second button could also start a bedtime scene, control several lights or trigger another automation.
For a dedicated input-only function, choose a module and configuration that expose button actions without requiring its relay output to operate a load.
5. The same idea works with intermediate switching
It isn’t limited to a simple two-switch staircase. Where existing intermediate-switch wiring is suitable, the intermediate switches can also be replaced with retractive controls, sharing the same hardwired switch input on the primary relay.
Our three-position example shows how the existing cables can distribute the required connections between switches.
A compatible module and extra retractive switch can be added at any suitable position where the required supply, connections and space are available

Diagram 4: Intermediate switching converted to retractive control, leaving options for additional smart inputs.
There’s no need to fit a smart module at every position. Add one where a ghost switch or another Zigbee router would actually be useful.
6. Ordinary-looking switches: Click MiniGrid retractive modules
You don’t need a fancy touchscreen or an expensive proprietary smart faceplate.
A modular plate, such as a Click MiniGrid one- or two-gang arrangement, can accommodate ordinary retractive switch modules.
For example, Click’s MD004 2-way retractive modules include ingot-style finishes. A suitable plate could carry one button for the original landing light and another for your programmable ghost switch.
Check the plate capacity, module combination and backbox depth before choosing accessories.
The clever stuff sits behind the wall switch; the front can still look reassuringly normal.
7. Shelly, Home Assistant, Wi-Fi and Zigbee: what connects to what?
The wiring principle isn’t limited to Shelly, but the device features matter.
- Shelly over Wi-Fi: Supported devices can use the native Home Assistant Shelly integration for local control.
- Shelly Gen4 over Zigbee: Supported devices can use a suitable Zigbee integration, including Zigbee2MQTT for Shelly 1 Gen4 and Shelly 1 Mini Gen4.
- Ghost-switch actions: The chosen device and integration must expose the input events needed by your automation. Verify relay/input behaviour before installation.
For Zigbee2MQTT, the supported Gen4 devices expose input actions and a momentary switch-type setting, although the exact configuration depends on firmware and integration support.
Don’t assume a Wi-Fi setup and a Zigbee setup behave identically.
8. Will the lights still work if Home Assistant goes down?
The original light can still be controlled from its hardwired retractive switches, provided the primary relay is powered, healthy and configured to respond locally to its input.
The light does not need Home Assistant, Wi-Fi or the Zigbee co-ordinator to process those physical button presses.
The ghost switch is different: if its action relies on the smart-home network, that remote action can stop working until the network or controller is restored.
A loss of power or a failed primary Shelly relay is another matter. This method preserves hardwired input control; it does not provide a mechanical bypass around a failed smart relay.
That’s the balance we like: smart convenience without making the original lighting dependent on the smart-home network.
9. Before trying this on an existing circuit
Check the actual wiring, rather than assuming every two-way switch is connected like the drawings. In particular:
- Confirm permanent live and neutral are available where required.
- Verify the cable routes and that the relevant switching positions are linked by suitable conductors.
- Check the smart modules’ input behaviour, power requirements and wiring instructions.
- Allow sufficient safe enclosure space for modules and terminations.
- Correctly identify repurposed conductors and maintain protective-conductor continuity.
- Inspect and test the modified circuit in accordance with BS 7671.
Electrical safety: These are conceptual wiring examples, not a universal step-by-step installation instruction. Alterations to fixed 230 V wiring must be designed, installed, inspected and tested by a competent person.
Make more of the wiring you’ve already got
There’s no magic here: just ordinary 3-core cable, retractive switches and compatible smart modules used differently.
In the right installation, you can keep the landing light under physical control, add ghost switches, extend Zigbee coverage and avoid unnecessary chasing and redecorating.
Keep control. Make less mess. Use what you’ve got.
That’s the Automate My Home approach. If a useful idea can be explained and shared, we’d rather do that than pretend it’s a trade secret.
Download the Shelly switching drawings
The six-page drawing pack illustrates the original 2-way circuit, the retractive conversion, a Zigbee module, an additional ghost switch and a three-position intermediate arrangement.
Download the Shelly 2-way and intermediate wiring PDF
Drawings & Disclaimer: These simplified drawings have been prepared by Imperial Green Systems Ltd for Automate My Home to share practical ideas and knowledge with the smart-home and electrical community. They illustrate the switching principles only and are not complete installation drawings. Circuit protective conductors (earths), protective devices and certain connections have been omitted for clarity. All wiring arrangements, equipment compatibility and safety requirements must be verified before installation. Electrical work must comply with BS 7671 and applicable Building Regulations, and be appropriately inspected and tested by a competent person. Imperial Green Systems Ltd accepts no responsibility for installations carried out by third parties based on these illustrations.
