diff --git a/homeassistant/components/openuv/__init__.py b/homeassistant/components/openuv/__init__.py index 048ffdd237b..a9ea1946f91 100644 --- a/homeassistant/components/openuv/__init__.py +++ b/homeassistant/components/openuv/__init__.py @@ -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