I’ve just installed Home Assistant 2021.1.5, it has automatically discovered all of my LIFX lights and Smart Life (Tuya) light switches.
I’ve setup an automation that when one of the light switches is turned on, it switches on a LIFX bulb. The automation works if I turn the switch on via the Home Assistance GUI, but if I physically press the switch on the wall, it doesn’t do anything. The physical press of the switch on the wall also doesn’t register a change of state in Home Assistant.
I know the switch works, as I previously had it turning on a smart wall plug via the Smart Life app.
Maybe I missed something in the setup of the switch in Home Assistant, not sure?
I did not think the Lifx switches were supported (yet). So you can see the state of the switch change in home assistant when you press the wall switch?
Can you please post your automation here (correctly formatted)?
Ah I wasn’t aware that LIFX switches were not supported. They were discovered with no issues, and toggling them off and on via Home Assistant works well.
When I press the wall switch physically, it does not change state in Home Assistant. But if I change the state of the switch in Home Assistant, the wall switch will change state. You can hear it click and the light on the switch goes on/off.
I tried the first code snippet, but it didn’t do anything unfortunately, either via the physical switch, or using the “Execute” command in Home Assistant.
When I tried the second code snippet, that didn’t do anything when the physical switch was pressed, but when I used the “Execute” command in Home Assistant, it turned on the light, but didn’t turn on the physical switch.
If I look at switch.1303035410521ce8d7da_2 in the Developer Tools States menu, it doesn’t change state when I physically press the switch.
Sorry and I just noticed you said LIFX switches in your original post, I read it as LIFX lights. I don’t have LIFX switches, I have LIFX bulbs. The light switch I am using is Smart Life/Tuya compatible one.
Definitely. If you want to use it with home assistant.
This I’m not so sure on. I flashed all my Tuya devices with alternative firmaware so they work locally using the ESPHome API. So I know very little about the Tuya integration.
Are there any errors related to your Tuya switch in the Configuration / Logs menu?
Yep. Tuya keep moving the goal posts. I got in early, before their first firmware update to prevent hacking of their devices. Now they don’t even use ESP chips in some of their devices.