Update systemmonitor to set config entry version using async_update_entry (#110192)

This commit is contained in:
J. Nick Koston 2024-02-10 09:20:16 -06:00 committed by GitHub
parent 845071f8f0
commit 3441b93c5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -41,9 +41,9 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
# Repair will remove sensors when user submit the fix
if processes := entry.options.get(SENSOR_DOMAIN):
new_options[BINARY_SENSOR_DOMAIN] = processes
entry.version = 1
entry.minor_version = 2
hass.config_entries.async_update_entry(entry, options=new_options)
hass.config_entries.async_update_entry(
entry, options=new_options, version=1, minor_version=2
)
_LOGGER.debug(
"Migration to version %s.%s successful", entry.version, entry.minor_version