RGB Bathroom Light

I am after an end result that must be done fairly often, a night time setting on my bathroom light so that I am not blinded when getting up for a wee.

I thought I had it figured out, I flashed a Sonoff with Tasmota and have it working with a ‘dumb’ swtich using GPIO14 and ground to toggle power to the bub as well as through HomeAssistant.

My plan was to use a RGB LED bulb and set it to come on in red when motion is detected between certain hours. I have just realised though that using a Sonoff in the way I intended wouldn’t toggle to bulb on/off but remove power to it all together, which would probably mean a delay while the bulb reconnects to wifi every time it turns on.

My other thought would be to use the Sonoff as before, but not connect the output side to the light, then just use it as a way to trigger the bulb on or off. This would leave me unable to turn the light on if wifi was down though, which I’m not too keen on.

Anyone got any better ideas on this one. Apologies if this has been asked before.

From your text I got the impression the RB LED bulb is connecting to wifi.
If the bulb is WiFi already why control it through a sonoff and cut its power thusly making it worse than a regular bulb?

I am trying to keep things are original as possible and want to use the original switch to turn it on and off (it’s a pull cord). I think the second option I thought of might be the way to go. Connect power to a Sonoff and the original switch to GPIO14/Ground but don’t connect the output. Then use the state of the Sonoff to trigger the bulb on and off.

Only worry is if the wifi is down for any reason.

you can program the switch to control the wifi bulb via home assistant and still work as power cutoff on for example doubleclick, so it will work as intended without wifi

That is a good idea. Thanks for the inspiration.

I have a similar setup already. Motion sensor, yeelight light, physical wall switch and a xiaomi button switch for the toilet room, is as you say for the late night, This works good because i use the xiaomi switch next to the physical one, so the wall switch is not used, light is turn on automatically at night via the motion sensor.

In case of yeelight lights these ones maintain their color state after power has been cutted, so when power comes again they retain the color. So i am thinking you can automate at certain time to turn on the bulb set the color and brightness, turn off again via the sonoff. Then during the rest pf the night every time you enter they are turn on again via mains, then color is warm and low in brightness.