mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +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}
|
options = {**config_entry.options}
|
||||||
if config_entry.minor_version < 2:
|
if config_entry.minor_version < 2:
|
||||||
options.setdefault(CONF_INVERT, False)
|
options.setdefault(CONF_INVERT, False)
|
||||||
config_entry.minor_version = 2
|
hass.config_entries.async_update_entry(
|
||||||
hass.config_entries.async_update_entry(config_entry, options=options)
|
config_entry, options=options, minor_version=2
|
||||||
|
)
|
||||||
|
|
||||||
_LOGGER.debug(
|
_LOGGER.debug(
|
||||||
"Migration to version %s.%s successful",
|
"Migration to version %s.%s successful",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user