From 087e52af6eeab2b4f8143679132fb11920dbccd2 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 10 Feb 2024 12:51:47 -0600 Subject: [PATCH] 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 --- homeassistant/components/switch_as_x/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/switch_as_x/__init__.py b/homeassistant/components/switch_as_x/__init__.py index 3fe2ff7bc7d..d94c7c9f098 100644 --- a/homeassistant/components/switch_as_x/__init__.py +++ b/homeassistant/components/switch_as_x/__init__.py @@ -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",