diff --git a/homeassistant/components/openweathermap/__init__.py b/homeassistant/components/openweathermap/__init__.py index cfe28e2eacc..22c97d72fa5 100644 --- a/homeassistant/components/openweathermap/__init__.py +++ b/homeassistant/components/openweathermap/__init__.py @@ -78,10 +78,11 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: mode = FORECAST_MODE_ONECALL_DAILY new_data = {**data, CONF_MODE: mode} - version = entry.version = CONFIG_FLOW_VERSION - config_entries.async_update_entry(entry, data=new_data) + config_entries.async_update_entry( + entry, data=new_data, version=CONFIG_FLOW_VERSION + ) - _LOGGER.info("Migration to version %s successful", version) + _LOGGER.info("Migration to version %s successful", CONFIG_FLOW_VERSION) return True