diff --git a/homeassistant/components/alexa_devices/__init__.py b/homeassistant/components/alexa_devices/__init__.py index c08e2f1c010..7a267579f98 100644 --- a/homeassistant/components/alexa_devices/__init__.py +++ b/homeassistant/components/alexa_devices/__init__.py @@ -42,7 +42,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: AmazonConfigEntry) -> bo async def async_migrate_entry(hass: HomeAssistant, entry: AmazonConfigEntry) -> bool: """Migrate old entry.""" - if entry.version == 1 and entry.minor_version == 0: + if entry.version == 1 and entry.minor_version == 1: _LOGGER.debug( "Migrating from version %s.%s", entry.version, entry.minor_version ) @@ -56,12 +56,12 @@ async def async_migrate_entry(hass: HomeAssistant, entry: AmazonConfigEntry) -> new_data.update({"site": f"https://www.amazon.{domain}"}) hass.config_entries.async_update_entry( - entry, data=new_data, version=1, minor_version=1 + entry, data=new_data, version=1, minor_version=2 ) - _LOGGER.info( - "Migration to version %s.%s successful", entry.version, entry.minor_version - ) + _LOGGER.info( + "Migration to version %s.%s successful", entry.version, entry.minor_version + ) return True diff --git a/homeassistant/components/alexa_devices/config_flow.py b/homeassistant/components/alexa_devices/config_flow.py index d75ba39323d..ccf18fd4558 100644 --- a/homeassistant/components/alexa_devices/config_flow.py +++ b/homeassistant/components/alexa_devices/config_flow.py @@ -52,7 +52,7 @@ class AmazonDevicesConfigFlow(ConfigFlow, domain=DOMAIN): """Handle a config flow for Alexa Devices.""" VERSION = 1 - MINOR_VERSION = 1 + MINOR_VERSION = 2 async def async_step_user( self, user_input: dict[str, Any] | None = None diff --git a/tests/components/alexa_devices/conftest.py b/tests/components/alexa_devices/conftest.py index 3c68b7b7626..cb88339fe83 100644 --- a/tests/components/alexa_devices/conftest.py +++ b/tests/components/alexa_devices/conftest.py @@ -85,4 +85,6 @@ def mock_config_entry() -> MockConfigEntry: CONF_LOGIN_DATA: {"session": "test-session"}, }, unique_id=TEST_USERNAME, + version=1, + minor_version=2, ) diff --git a/tests/components/alexa_devices/snapshots/test_diagnostics.ambr b/tests/components/alexa_devices/snapshots/test_diagnostics.ambr index 0f3c3647e90..6f9dc9a5cc3 100644 --- a/tests/components/alexa_devices/snapshots/test_diagnostics.ambr +++ b/tests/components/alexa_devices/snapshots/test_diagnostics.ambr @@ -57,7 +57,7 @@ 'discovery_keys': dict({ }), 'domain': 'alexa_devices', - 'minor_version': 1, + 'minor_version': 2, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/alexa_devices/test_init.py b/tests/components/alexa_devices/test_init.py index c628a5e00e7..e809f002321 100644 --- a/tests/components/alexa_devices/test_init.py +++ b/tests/components/alexa_devices/test_init.py @@ -49,7 +49,7 @@ async def test_migrate_entry( }, unique_id=TEST_USERNAME, version=1, - minor_version=0, + minor_version=1, ) config_entry.add_to_hass(hass) await hass.config_entries.async_setup(config_entry.entry_id) @@ -57,5 +57,5 @@ async def test_migrate_entry( assert len(hass.config_entries.async_entries(DOMAIN)) == 1 assert config_entry.state is ConfigEntryState.LOADED - assert config_entry.minor_version == 1 + assert config_entry.minor_version == 2 assert config_entry.data["site"] == f"https://www.amazon.{TEST_COUNTRY}"