diff --git a/homeassistant/components/ps4/__init__.py b/homeassistant/components/ps4/__init__.py index 4e7f78c4b18..f68ad6ce896 100644 --- a/homeassistant/components/ps4/__init__.py +++ b/homeassistant/components/ps4/__init__.py @@ -108,8 +108,8 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: if country in COUNTRIES: for device in data["devices"]: device[CONF_REGION] = country - version = entry.version = 2 - config_entries.async_update_entry(entry, data=data) + version = 2 + config_entries.async_update_entry(entry, data=data, version=2) _LOGGER.info( "PlayStation 4 Config Updated: Region changed to: %s", country, @@ -142,12 +142,11 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: config_entry=entry, device_id=e_entry.device_id, ) - entry.version = 3 _LOGGER.info( "PlayStation 4 identifier for entity: %s has changed", entity_id, ) - config_entries.async_update_entry(entry) + config_entries.async_update_entry(entry, version=3) return True msg = f"""{reason[version]} for the PlayStation 4 Integration.