Migrate sonarr to use async_update_entry to alter config entries (#110364)

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

View File

@ -104,8 +104,7 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
**entry.data,
CONF_URL: f"{new_proto}://{new_host_port}{new_path}",
}
hass.config_entries.async_update_entry(entry, data=data)
entry.version = 2
hass.config_entries.async_update_entry(entry, data=data, version=2)
LOGGER.info("Migration to version %s successful", entry.version)