Migrate sensibo to use async_update_entry to alter config entries (#110390)

This commit is contained in:
J. Nick Koston 2024-02-12 12:46:30 -06:00 committed by GitHub
parent 5f03b5ad41
commit 300f5670e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,12 +47,11 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
except (AuthenticationError, ConnectionError, NoDevicesError, NoUsernameError):
return False
entry.version = 2
LOGGER.debug("Migrate Sensibo config entry unique id to %s", new_unique_id)
hass.config_entries.async_update_entry(
entry,
unique_id=new_unique_id,
version=2,
)
return True