I’ve got 3 Tuya temperature & humidity sensors from amazon. I’ve installed them to my iphone using the Tuya app and can see their detected values. I’ve also got the device id, local id, ip address and mac address for each sensor, from the Tuya developer site.
The device name is something like 温湿度传感器wifi 1/2/3 and the product described as 温湿度传感器wifi
When entering into HA → settings → devices and serices → localtuya → configure → add a new device etc. with the name eg TH3 and local key I get an error : An unknown error occurred. See log for details.
This happens for each of the three devices.
I’m not sure how to set up the log, or why this data is at fault.
This because these battery operated devices go in deep sleep a few seconds after reporting their status to save power and then the ip address is released on the router.
What I did . manually specify dp points 1,2 in the config screen of local tuya integration. (I think is 4 for battery, but did not configure that). and then define those 2 DPs as sensors : DP 1 = temperature (attention 0.1 scaling factor to specify). DP 2 = humidity in %.
Then create 2 automations : 1/ when the temp sensor changes : store the value in a helper value 2/ when the humidity sensor changes : store the value in a helper value.
This way each time the device awakes and reports status update, you will store the latest values in the helper values and you can then use the helper values in your cards, automations, …