Currently I have a Sonoff M5 wall switch connected to an LED. I want to change the LED to an addressable one with WLED.
Is it possible (if yes, how) that I keep my wall switch with ESPHome and between LED and wall switch to add an ESP8266 with WLED installed? So when I toggle the wall switch it triggers the ESP8266 with WLED to on/off, but it does not control the power output via a relay.
Basically I dont want the wall switch to directly control the power to the LED via a relay. But serve as a bridge to send command for on/off to WLED controller, in this case ESP8266.
Could you install WLED on the switch’s ESP instead of esphome ? I know that WLED has option for button input ?
EDIT: Had one of these lying around so flashed it with WLED and it works ! I have a 2 button one and left turns on off and right cycles through effects. Using LED in switch for output to test but seems to work. Probably need to find a GPIO for the proper LED signal out though
WLED can even control the Relay so could turn on off your LED PSU
In your scenario, you could install another WLED instance wherever you LED is and SYNC the WLED on the switch and the LED WLED
I’m going to look into this more and see if I can use it for anything
@Holdestmade thanks for your feedback but I am not sure I understand you.
Attached is a diagram that I have in my mind to implement this. This diagram is simple because there is not much logic needed.
The problem is that, what I want to achieve, I am not sure if this is the right setup and the second thing is the config on esphome (sonoff m5 in this case).
If you want to keep esphome on the M5, just remove the relay output in the config so it doesn’t turn the 5V PSU on and off and connect the PSU to the live, not relay output. The switch in the M5 can still be used as a trigger for a HA automation to turn the WLED on and off.
Alternatively, leave the relay output and use that to turn on the 5V PSU, you can set WLED to a preset on power on