this post was submitted on 21 Jul 2026
18 points (90.9% liked)
homeassistant
20115 readers
15 users here now
Home Assistant is open source home automation that puts local control and privacy first.
Powered by a worldwide community of tinkerers and DIY enthusiasts.
Home Assistant can be self-installed on ProxMox, Raspberry Pi, or even purchased pre-installed: Home Assistant: Installation
Discussion of Home-Assistant adjacent topics is absolutely fine, within reason.
If you're not sure, DM @GreatAlbatross@feddit.uk
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Assuming technically possible, this solution requires no other hardware:
Is it possible to make the smart plug default to the opposite of the last state? You could use the wall switch like a pushbutton (cut and restore power) and it would toggle, then maintain control from HASS. You might be able to save the last state of the smart plug, detect when it comes online after a power failure (theoretically), and set it to the opposite of the previous state in an automation.
That's probably possible, but doesn't solve my problem. That said, some commentors found my explanation confusing.
When the switch is toggled ON, I want the lights to go ON.
When the switch is toggled OFF, I want the lights to go OFF.
Irrespective of the switch position, I want to be able to turn the lights ON or OFF with Home Assistant.
It sounds like a zigbee relay behind the switch will be the way to detect the switch position.
@eddiereasoner@lemmus.org might actually be on to something...
Depending on the wall switch you have, you might be able to add a spring that makes it always return to the previous position when released. At least the switches I have in my house have a special little socket for adding a spring.
So in your Zigbee control panel you would configure the "power on behaviour" of the smart light/socket to "toggle".
Then I you would add the spring inside your physical switch.
Now when you press the switch it would cut the power to the light/socket briefly, and as soon as you release the switch the power would be restored.
If the light/socket is on, you press and release the switch, which cuts the power and the light/socket stays off due to the "toggle" behaviour.
If the light/socket is off, the light/socket is still powered, soo you can still turn it on via Zigbee, and if you pres the switch, it momentarily cuts the power and the toggle behaviour would now make if turn on.
This gives you basically the same behaviour as if you installed a relay, but if you use smart bulbs you gain the benefit of being able to control the brightness, color temperature, and hue, if it has those controls
Thanks for the better explanation