Migrate openuv to use async_update_entry to alter config entries (#110371)

This commit is contained in:
J. Nick Koston 2024-02-12 11:34:26 -06:00 committed by GitHub
parent 1764c031df
commit 66607cd034
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -104,8 +104,8 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
if version == 1:
data.pop(CONF_BINARY_SENSORS, None)
data.pop(CONF_SENSORS, None)
version = entry.version = 2
hass.config_entries.async_update_entry(entry, data=data)
version = 2
hass.config_entries.async_update_entry(entry, data=data, version=2)
LOGGER.debug("Migration to version %s successful", version)
return True