Thanks for the inspiration @Lebowski9000 ! FYI - This is how I’ve solved it similarly in HA with node-red.
In my setup I’ve got 80+ LIFX lights, but I only have 1 “dumb” set of smart festoons wired into a switch that I want to control, so I only care about controlling 1 relay of 1 switch (I have 13 )
- Rather than a separate switch & sensor entity in HASS, I’ve got one switch entity I create in node-red.
- I query the state of the physical relay every second in case someone changes the power state physically on the switch, and if there is a change I pass this as a msg.enable true/false boolean to the HA switch entity. This will update the state in HASS, but the node will not output and fire a state change on physical switch
- When you change the switch state within HASS this triggers a LIFX set-state to change power of the physical relay
Works great thus far and I’ve then got a Light entity using the switch platform in HASS which I surface to Google Assistant and my dashboard so I’m controlling a Light entity which subsequently uses the switch entity.
Thanks for the inspo…this was the final thing in my setup I couldn’t control with GA!
Wondering now about taking it a step further. As my festoon lights are smart, but on FLUX platform, I might be able to leave that circuit powered on and then connect the relay button to something in LIFX for node-red to monitor and control soft power state on FLUX platform. I think I’ll need to have a LIFX light that doesn’t actually do anything to act as a “ghost” device though, possible could use a Z-strip/beam controller that’s not connected to an actual light.