Hi to all, don’t know is this a right category for my question so correct me if I’m wrong…
Bought a “wall” switch because it looks like regular wall switch and it works with Tuya which is integrated in HA and it runs in two AAA batteries. Truth is that is much smaller than regular wall switch (51x51x16,5mm), it can be added in HA Tuya integration but it has no entities. Is it somehow possible to use it in HA? I have tried numerous ways but all them leads me to nowhere
Thing use Tuya chip CBU-NL and have places in PCB to solder wires to communicate with chip. Can it be flashed with ESP Home somehow?
A pushbutton switch like that does not usually have the entity you are expecting. It usually generates an event.
Can you show me how to use that for switching things?
If it works the same as my pushbutton devices (which are zigbee) …
Find the the tuya device page.
In the Automations panel, click +, it will show you a number of options, similar to this.
I have no luck, I don’t have anything in that panel
It means - “no available automation for this device”
I got the same switch, expecting somehting to show up in HA when added, but the ddevice is present, and no entities, and nothing is being generate that I know off. .
Have you looked in events? (Dev tools)
This Tuya board uses the BK7231N chip from Beken.
It can be flashed with the OpenBeken firmware and then you get a tasmota-like interface with MQTT. So you can use this switch like anyother MQTT device.
As the PCB has pins (holes) for serial should be easy to flash.
For flashing tool and instructions see this repo:
For linux I have found the python based flash tool easier though:
I have a different wifi (wall) switch from Aliexpress that doesn’t have any available entities/automations in HA. The device is listed as unsupported in the Tuya integration.
My challenge was: how can I push the (wall) switch button and trigger an automation in HA?
I made it work like this: I had a smart socket/plug for my AC. Besides the on/off switch, this smart plug also had two more booleans: child lock and overcharge switch.
Since I don’t use any of these two booleans I figured that I can make use of them to serve as a trigger in HA.
In Tuya I configured each one of the wifi switch buttons (wall) to change the state of the child lock or the overcharge switch from the smart socket.
Then I created an automation in HA that is triggered by the state change for these two booleans from Tuya. Simple as that.
Sure thing, I had a smart socket at hand, but it works with thermostats or any other devices that have some spare booleans.
And if you don’t have a spare physical device, then create a virtual/fake one in the Tuya developer platform.
I created a (virtual) light source product in Tuya Developer Platform and added it to Tuya on the phone.
In Tuya I configured the wall switch buttons to change this fake light source instead and the HA automation was triggered by the state change of this fake light source.
Needless to say that it works like a charm.
Now I have a switch button that both unlocks the doors and starts the car engine by the time I put my shoes on and lock the house door.
To summarize: if your Tuya smart switch is not supported in HA, then have it control a (virtual?) light source, smart socket, child lock feature of another device that is supported by HA. And then just trigger automations in HA when the state of that virtual device is changed.