Update switch_as_x to set ConfigEntry version with async_update_entry (#110193)

* Update switch_as_x to set ConfigEntry version with async_update_entry

* lint
This commit is contained in:
J. Nick Koston 2024-02-10 12:51:47 -06:00 committed by GitHub
parent a48c1ac57e
commit 087e52af6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -114,8 +114,9 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
options = {**config_entry.options}
if config_entry.minor_version < 2:
options.setdefault(CONF_INVERT, False)
config_entry.minor_version = 2
hass.config_entries.async_update_entry(config_entry, options=options)
hass.config_entries.async_update_entry(
config_entry, options=options, minor_version=2
)
_LOGGER.debug(
"Migration to version %s.%s successful",