Hello, I just bought the hardware of “yours” specifically the wifi temperature and humidity detect and it turns out that I do the integration of the manufacturer without problems but when I go to integrate it in the HA I only have the option of switch and not the sensor, some idea? so I do not see the temperature or humidity, I only see the action of the switch.
Hi, welcome to the community. You are not able to see the temperature and humidy, maybe because these are not supported now. There is currently support for the following device types within Home Assistant:
Climate - The platform supports the air conditioner and heater.
Cover - The platform supports curtains.
Fan - The platform supports most kinds of Tuya fans.
Light - The platform supports most kinds of Tuya light.
Scene - The device state in frontend panel will not change immediately after you activate a scene.
As you have already found out, tasmota is not supported with this device. This is because tasmota works with Esp8266 or Esp32 chips which are not present in these. HA tuya integraion is constantly improving and so I think the support for temperature sensors and others will be coming shortly.
As I understand from his github page, Paul Annenkov cloned and took over the deployment of the abandoned Tuya Python library “tuyapi v0.1.3”. Thus, I understand that he is developing/checking/correcting his tuyaha Python library for HA, right?
I might be wrong, but I’m wondering why he’s asking the users of his library to send an email to the unresponsive [email protected]? It’s almost 2 years since Tuya abandoned their HA Python library, will they care much if few of us would send them an email?
Hello, I fully agree with Adi_tca. Who and how unlock this problem ? Should we give up buying this device? As you have understand I have invested in these devices… and I hope use them with HA.
Device added wrongly
Do not select “Switch” ,Select “SENSOR” whenn add it.
Then will appear temp/humidity/battery statuses
But then next problem
device is conecting only onece at 24h to wifi for less then 5 seconds,
take ip from router conect to tuya cloud and return to low power mode.
No chance to get data exactly in this moment.
LocalTuya works well, but it seems it pull devices not so often then it could catch the data for motion and temperature/humidity sensors.
But with TinyTuya I have luck, I could run a script in the loop and wait until these sensors will wake up and push the data.
This works for me for the TuYa motion sensor and for the same Temperature and Humidity sensor.
Here small script:
import tinytuya
tinytuya.set_debug(True)
temperature = None
humidity = None
battery = None
while(True):
d = tinytuya.OutletDevice('xxxxxxxx', '192.168.30.116', 'yyyyyyyyy')
d.set_version(3.3)
data = d.status()
print(data)
data = d.status()
if isinstance(data, dict):
if 'dps' in data:
if '1' in data['dps']:
temperature = data['dps']['1']
print(temperature)
if '2' in data['dps']:
humidity = data['dps']['2']
print(humidity)
if '3' in data['dps']:
battery = data['dps']['3']
print(battery)
file='/home/pi/hass/tinytuya/th001.log'
with open(file, 'w') as filetowrite:
filetowrite.write('{"name":"TH001","temperature":"' + str(temperature)+ '","humidity":"' + str(humidity) + '","battery":"' + battery + '"}')
For testing, I am removing battery for 10-15 sec from this sensor, then when I put it back it connecting and send the data to the cloud, at that moment script could fetch data from it, via local API.