tuya / tuya-iot-python-sdk

Tuya IoT Python SDK for Tuya Open API.
MIT License
117 stars 47 forks source link

Fix issue while adding new integration #67

Open dreamtheater39 opened 1 year ago

dreamtheater39 commented 1 year ago

Fixes the below issue.

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 365, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/tuya/init.py", line 79, in async_setup_entry response = await hass.async_add_executor_job( File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/usr/local/lib/python3.10/site-packages/tuya_iot/openapi.py", line 222, in connect self.token_info = TuyaTokenInfo(response) File "/usr/local/lib/python3.10/site-packages/tuya_iot/openapi.py", line 41, in init token_response.get("t", 0) TypeError: unsupported operand type(s) for +: 'int' and 'str'