Turn on/off Wifi bulbs using a wall switch

Hello everyone!

I don’t know if this matter has been treated already but I couldn’t find anything but “can’t be done” in the web.
Maybe there is someone that already solve it.

Basically what I want is giving to “my wife” the option to turn on/off the lights using a wall switch instead Alexa or a Mobile App.
My lights are WiFi, they work with Tuya or SmartThings. and I can turn them on/off using Alexa or Hassio without any issue. Now, I have created an automation for a Power Plug which has a button to simulate a wall switch.
So, when I turn the switch button off, the lights should go off.
Example below:

- alias: 'Turn off lights when hit physical device button'
initial_state: 'off'
trigger:
 platform: state
 entity_id: switch.kitchen
action:
 service: light.turn_on
 data_template:
   entity_id: light.living
   brightness: >
    {% if is_state('switch.kitchen', 'on') %}
       255
    {% else %}
       50     
    {% endif %}

As you can see, I’m just changing the brightness because my brain is too burned right now and I can’t remember how to turn on/off a bulb based on another device status in an automation. Help, is welcomed.
On the other hand, the problem with this automation is that the delay between hitting the button and capturing a light status is too much. Therefore the lights turn off after 10 seconds.

Did anyone solve this puzzle?

My idea is to buy the Sonoff T1 switches and just connect them to wifi, not to the real lights.

Thank you very much!

You could try something like this, it’s a smart wall switch that runs on batteries and connects to a Xiaomi Gateway (or a ZigbeeToMQTT Gateway if you feel like getting your hands dirty).

https://www.gearbest.com/alarm-systems/pp_610095.html

I have a few WiFi light bulbs for some non-time-critical locations as well - I don’t have a neutral line at any of my switches, so I’m basically SOL and can’t use smart wall switches anyway.

It seems like you want to keep your WiFi bulbs and just find another way to switch them on and off - just like I do.

A few weeks ago there was a sale for the Amazon Dash Buttons, so I bought ten for $10.

One of them is - inside - close to my outdoor patio light; the mechanical switch needs to stay on or lose access to the WiFi bulb itself completely but I can easily push the dash button instead.

I set up the Nekmo’s Amazon-Dash code to toggle the bulb on/off itself. Unfortunately, I had to set it up on a separate RPi3 because it uses quite some processor time.

And the reaction time is too slow to use it for inside/time-critical lights - I don’t mind if it takes a few seconds to turn on the patio light because I need to unlock and open the patio door anyway. I wouldn’t want to use this for my garage or office light switch, though, because these are places where the light needs to come on instantly as soon as I flick the switch. A 2-3 second delay would not be in line with the WAF.

Hi,

I’d look into getting a Sonoff RF bridge and some 433RF switches like this one: https://www.ebay.com/itm/433MHz-Receiver-Module-86-Wall-Panel-RF-Transmitter-Smart-Home-Lamp-Light-Switch/183246365442?ssPageName=STRK%3AMEBIDX%3AIT&var=690528302516&_trksid=p2060353.m2749.l2649

If you flash the Sonoff bridge with Tasmota, it essentially becomes a MQTT-to-RF bridge, which you can easily set up in your Home Assistant instance to read the signal sent by your RF switches and turn you light bulbs on/off respectively.

BR

Thank you @lexam79 for your answer. Now, sorry for my ignorance, but do I need to buy a Sonoff bridge to accomplish it? Sonoff Bridge
I though that when we talk about flashing Sonoff, we just talk about flashing the switch itself. Sonoff Swtich

On the other hand, do I really need to get the Sonoff Bridge? Can’t I use the Sonoff devices without the Bridge? What is the advantage of it?

Thanks,

Hi, I assumed - maybe by mistake - that by “my lights are wifi” you meant that you have Wifi bulbs. If that’s the case, then you don’t need Sonoff switches (although those could work too), you just need some physical way of turning them on/off. If that’s indeed the case, the Sonoff bridge + RF switches that you can mount anywhere in your house can do what you’re looking for.