jasonacox / tinytuya

Python API for Tuya WiFi smart devices using a direct local area network (LAN) connection or the cloud (TuyaCloud API).
MIT License
923 stars 165 forks source link

Update core.py #294

Closed nyok92 closed 1 year ago

nyok92 commented 1 year ago

To get Detect_Available_DPS working :

Traceback (most recent call last): File "/home/pi/script3.py", line 9, in data = d.detect_available_dps() File "/home/pi/.local/lib/python3.9/site-packages/tinytuya/core.py", line 1392, in detect_available_dps if "dps" in data: TypeError: argument of type 'NoneType' is not iterable

Based on https://github.com/jasonacox/tinytuya/issues/171

jasonacox commented 1 year ago

Seems good to me!

@uzlonewolf can you review and merge if it looks ok? I'm not where I can test right now.

uzlonewolf commented 1 year ago

Thanks @nyok92 !