Browse Source

Hotfix: fix string method name in migration

Because it is nested deep within conditions, the tests missed it.

Issue #984
Jason Rumney 2 năm trước cách đây
mục cha
commit
daf4306041

+ 1 - 1
custom_components/tuya_local/__init__.py

@@ -285,7 +285,7 @@ async def async_migrate_entry(hass, entry: ConfigEntry):
                                     break
                                     break
                         if e.entity == platform and not e.name:
                         if e.entity == platform and not e.name:
                             new_id = e.unique_id(device_id)
                             new_id = e.unique_id(device_id)
-                            if new_id.endsWith(new_suffix):
+                            if new_id.endswith(new_suffix):
                                 _LOGGER.info(
                                 _LOGGER.info(
                                     "Migrating %s unique_id %s to %s",
                                     "Migrating %s unique_id %s to %s",
                                     e.entity,
                                     e.entity,