Hello … Since this morning Oct 26 at 9:40 (GMT+1), all my switches defined in Home Assistant disappeared (without restarting HA). I restarted HA, same problem and no error message… My devices are still in Tuya and working fine within the Android App. Other types (scenes and climate devices) are still correctly loaded in HA…
Anyone has the same issue ?
So as these switches appeared a couple of months ago and disappeared recently, I decided to go back to a manual definition for the “lost” switches… using “localtuya” and “pytuya”… For the “local_key” and the “device_id”, I used my android phone to get those. The “Packet Capture” app is giving you this information (let me know if you cannot find the procedure on the web) and even more ! Without having to “root” your phone !!!.. “Even more” as mentioned because I have led’s on my switches, this means two entities for the same switch (the second entity (led) was never discovered automatically by Tuya). With Packet App, you can easily find the “id” (channel) of the switch and the other one for the led… Here is an example of my config:
switch:
- platform: localtuya
host: 192.168.2.81
local_key: 6283aXXXXXXXX
device_id: 60000XXXXXXXXX
switches:
switch1:
friendly_name: Hall Etage AR
id: 1
switch2:
friendly_name: Hall Etage AR Led
id: 27
I guys, sorry to revive this post, but using “Packet Captuer” app all the data information sended from smart life looks crypted, i’m doing something wrong? should i use tuya app to get the local_key?