فهرست منبع

Treat empty cid the same as no cid

When processing user entry through the config flow, we get
an empty string rather than None for an empty cid field.
This causes the test connection to fail when reconfiguring
(but not the original connection for some reason, otherwise
this would have been noticed sooner than 6 months after the
introduction of cid support).

Issue #1110
Jason Rumney 2 سال پیش
والد
کامیت
2e01bf6043
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      custom_components/tuya_local/device.py

+ 1 - 1
custom_components/tuya_local/device.py

@@ -66,7 +66,7 @@ class TuyaLocalDevice(object):
         self._api_protocol_working = False
         self._api_working_protocol_failures = 0
         try:
-            if dev_cid is not None:
+            if dev_cid:
                 self._api = tinytuya.Device(
                     dev_id,
                     cid=dev_cid,