mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
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:
parent
a48c1ac57e
commit
087e52af6e
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user