Ver código fonte

Summary: Migration: fix condition to handle tank entities

Because tank could be either tank_full or tank_empty, it had a more
complex condition, using a string method that does not actually exist.

Issue #984
Jason Rumney 1 ano atrás
pai
commit
be8486c1c9

+ 1 - 1
custom_components/tuya_local/__init__.py

@@ -356,7 +356,7 @@ async def async_migrate_entry(hass, entry: ConfigEntry):
                     if e.entity == platform and not e.name:
                         new_id = e.unique_id(device_id)
                         if (new_suffix and new_id.endswith(new_suffix)) or (
-                            new_suffix is None and new_id.contains(suffix)
+                            new_suffix is None and suffix in new_id
                         ):
                             _LOGGER.info(
                                 "Migrating %s unique_id %s to %s",

+ 1 - 1
custom_components/tuya_local/manifest.json

@@ -9,5 +9,5 @@
     "iot_class": "local_push",
     "issue_tracker": "https://github.com/make-all/tuya-local/issues",
     "requirements": ["tinytuya==1.13.2"],
-    "version": "2024.3.0"
+    "version": "2024.3.1"
 }