Procházet zdrojové kódy

Fix instance check in unixtime handling

Jason Rumney před 2 roky
rodič
revize
34f12732e8

+ 1 - 1
custom_components/tuya_local/helpers/device_config.py

@@ -446,7 +446,7 @@ class TuyaDpsConfig:
             return v.hex()
         elif self.rawtype == "base64":
             return b64encode(v).decode("utf-8")
-        elif self.rawtype == "unixtime" and v instanceof datetime:
+        elif self.rawtype == "unixtime" and isinstance(v, datetime):
             return v.timestamp()
         else:
             return v