Przeglądaj źródła

fix(entity): wrong comment syntax for Python

Jason Rumney 2 miesięcy temu
rodzic
commit
eabf89f824
1 zmienionych plików z 6 dodań i 2 usunięć
  1. 6 2
      custom_components/tuya_local/entity.py

+ 6 - 2
custom_components/tuya_local/entity.py

@@ -103,13 +103,17 @@ class TuyaLocalEntity:
         for a in self._attr_dps:
         for a in self._attr_dps:
             value = a.get_value(self._device)
             value = a.get_value(self._device)
             if value is not None or not a.optional:
             if value is not None or not a.optional:
-                // Decode json attributes for user convenience
+                # Decode json attributes for user convenience
                 if a.rawtype == "json":
                 if a.rawtype == "json":
                     try:
                     try:
                         value = json.loads(value)
                         value = json.loads(value)
                     except json.JSONDecodeError:
                     except json.JSONDecodeError:
                         if value is not None:
                         if value is not None:
-                            _LOGGER.warning("Failed to decode JSON for attribute %s: %s", a.name, value)
+                            _LOGGER.warning(
+                                "Failed to decode JSON for attribute %s: %s",
+                                a.name,
+                                value,
+                            )
                 attr[a.name] = value
                 attr[a.name] = value
         return attr
         return attr