From 4bcfa9e315c49ff0a1cff97ecbe2575891a700bf Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 12 Feb 2024 12:46:48 -0600 Subject: [PATCH] Migrate sonarr to use async_update_entry to alter config entries (#110364) --- homeassistant/components/sonarr/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/homeassistant/components/sonarr/__init__.py b/homeassistant/components/sonarr/__init__.py index c592e8435c2..69d2ba76e22 100644 --- a/homeassistant/components/sonarr/__init__.py +++ b/homeassistant/components/sonarr/__init__.py @@ -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)