From 02d1acdc43c51d657cad7743b0a179c4afb2a34f Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 11 Dec 2023 10:40:16 +0100 Subject: [PATCH 1/8] Add minor version to config entries --- homeassistant/config_entries.py | 11 ++++++++++- homeassistant/data_entry_flow.py | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/homeassistant/config_entries.py b/homeassistant/config_entries.py index 756b2def5819..3da8b2bcd6f3 100644 --- a/homeassistant/config_entries.py +++ b/homeassistant/config_entries.py @@ -205,6 +205,7 @@ class ConfigEntry: __slots__ = ( "entry_id", "version", + "minor_version", "domain", "title", "data", @@ -233,7 +234,9 @@ class ConfigEntry: def __init__( self, + *, version: int, + minor_version: int, domain: str, title: str, data: Mapping[str, Any], @@ -252,6 +255,7 @@ def __init__( # Version of the configuration. self.version = version + self.minor_version = minor_version # Domain the configuration belongs to self.domain = domain @@ -631,7 +635,8 @@ async def async_migrate(self, hass: HomeAssistant) -> bool: while isinstance(handler, functools.partial): handler = handler.func # type: ignore[unreachable] - if self.version == handler.VERSION: + same_major_version = self.version == handler.VERSION + if same_major_version and self.minor_version == handler.MINOR_VERSION: return True if not (integration := self._integration_for_domain): @@ -639,6 +644,8 @@ async def async_migrate(self, hass: HomeAssistant) -> bool: component = integration.get_component() supports_migrate = hasattr(component, "async_migrate_entry") if not supports_migrate: + if same_major_version: + return True _LOGGER.error( "Migration handler not found for entry %s for %s", self.title, @@ -974,6 +981,7 @@ async def async_finish_flow( entry = ConfigEntry( version=result["version"], + minor_version=result["minor_version"], domain=result["handler"], title=result["title"], data=result["data"], @@ -1196,6 +1204,7 @@ async def async_initialize(self) -> None: config_entry = ConfigEntry( version=entry["version"], + minor_version=entry.get("minor_version", 1), domain=domain, entry_id=entry_id, data=entry["data"], diff --git a/homeassistant/data_entry_flow.py b/homeassistant/data_entry_flow.py index e0ea195a3ffb..b02fcbfcd1f1 100644 --- a/homeassistant/data_entry_flow.py +++ b/homeassistant/data_entry_flow.py @@ -94,6 +94,7 @@ class FlowResult(TypedDict, total=False): handler: Required[str] last_step: bool | None menu_options: list[str] | dict[str, str] + minor_version: int options: Mapping[str, Any] preview: str | None progress_action: str @@ -470,6 +471,7 @@ class FlowHandler: # Set by developer VERSION = 1 + MINOR_VERSION = 1 @property def source(self) -> str | None: @@ -549,6 +551,7 @@ def async_create_entry( """Finish flow.""" flow_result = FlowResult( version=self.VERSION, + minor_version=self.MINOR_VERSION, type=FlowResultType.CREATE_ENTRY, flow_id=self.flow_id, handler=self.handler, From e722ea0ead5f26c0708675348e3351d00db4dfb7 Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 11 Dec 2023 13:22:23 +0100 Subject: [PATCH 2/8] Update tests --- tests/common.py | 2 ++ tests/test_bootstrap.py | 1 + 2 files changed, 3 insertions(+) diff --git a/tests/common.py b/tests/common.py index 15498019b16c..1d0b278a6cb3 100644 --- a/tests/common.py +++ b/tests/common.py @@ -890,6 +890,7 @@ def __init__( domain="test", data=None, version=1, + minor_version=1, entry_id=None, source=config_entries.SOURCE_USER, title="Mock Title", @@ -910,6 +911,7 @@ def __init__( "pref_disable_polling": pref_disable_polling, "options": options, "version": version, + "minor_version": minor_version, "title": title, "unique_id": unique_id, "disabled_by": disabled_by, diff --git a/tests/test_bootstrap.py b/tests/test_bootstrap.py index 42d679d7ce63..4c350168d4e9 100644 --- a/tests/test_bootstrap.py +++ b/tests/test_bootstrap.py @@ -913,6 +913,7 @@ class MockConfigFlow: """Mock the MQTT config flow.""" VERSION = 1 + MINOR_VERSION = 1 entry = MockConfigEntry(domain="mqtt", data={"broker": "test-broker"}) entry.add_to_hass(hass) From a2da8a2637bd20b13d82be482f34f4488a8ab51e Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 11 Dec 2023 13:41:55 +0100 Subject: [PATCH 3/8] Include minor version in dict representation --- homeassistant/config_entries.py | 1 + 1 file changed, 1 insertion(+) diff --git a/homeassistant/config_entries.py b/homeassistant/config_entries.py index 3da8b2bcd6f3..336261c36321 100644 --- a/homeassistant/config_entries.py +++ b/homeassistant/config_entries.py @@ -683,6 +683,7 @@ def as_dict(self) -> dict[str, Any]: return { "entry_id": self.entry_id, "version": self.version, + "minor_version": self.minor_version, "domain": self.domain, "title": self.title, "data": dict(self.data), From 092accb56d83bd03e6ae5839a07295eacc43e015 Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 11 Dec 2023 14:08:30 +0100 Subject: [PATCH 4/8] Add tests for minor version migration --- tests/test_config_entries.py | 61 ++++++++++++++++++++++++++++++------ 1 file changed, 51 insertions(+), 10 deletions(-) diff --git a/tests/test_config_entries.py b/tests/test_config_entries.py index 40e3b3b4c3c1..e9989b6839eb 100644 --- a/tests/test_config_entries.py +++ b/tests/test_config_entries.py @@ -134,11 +134,15 @@ async def test_call_setup_entry_without_reload_support(hass: HomeAssistant) -> N assert not entry.supports_unload -async def test_call_async_migrate_entry(hass: HomeAssistant) -> None: +@pytest.mark.parametrize(("major_version", "minor_version"), [(2, 1), (1, 2), (2, 2)]) +async def test_call_async_migrate_entry( + hass: HomeAssistant, major_version: int, minor_version: int +) -> None: """Test we call .async_migrate_entry when version mismatch.""" entry = MockConfigEntry(domain="comp") assert not entry.supports_unload - entry.version = 2 + entry.version = major_version + entry.minor_version = minor_version entry.add_to_hass(hass) mock_migrate_entry = AsyncMock(return_value=True) @@ -164,10 +168,14 @@ async def test_call_async_migrate_entry(hass: HomeAssistant) -> None: assert entry.supports_unload -async def test_call_async_migrate_entry_failure_false(hass: HomeAssistant) -> None: +@pytest.mark.parametrize(("major_version", "minor_version"), [(2, 1), (1, 2), (2, 2)]) +async def test_call_async_migrate_entry_failure_false( + hass: HomeAssistant, major_version: int, minor_version: int +) -> None: """Test migration fails if returns false.""" entry = MockConfigEntry(domain="comp") - entry.version = 2 + entry.version = major_version + entry.minor_version = minor_version entry.add_to_hass(hass) assert not entry.supports_unload @@ -192,10 +200,14 @@ async def test_call_async_migrate_entry_failure_false(hass: HomeAssistant) -> No assert not entry.supports_unload -async def test_call_async_migrate_entry_failure_exception(hass: HomeAssistant) -> None: +@pytest.mark.parametrize(("major_version", "minor_version"), [(2, 1), (1, 2), (2, 2)]) +async def test_call_async_migrate_entry_failure_exception( + hass: HomeAssistant, major_version: int, minor_version: int +) -> None: """Test migration fails if exception raised.""" entry = MockConfigEntry(domain="comp") - entry.version = 2 + entry.version = major_version + entry.minor_version = minor_version entry.add_to_hass(hass) assert not entry.supports_unload @@ -220,10 +232,14 @@ async def test_call_async_migrate_entry_failure_exception(hass: HomeAssistant) - assert not entry.supports_unload -async def test_call_async_migrate_entry_failure_not_bool(hass: HomeAssistant) -> None: +@pytest.mark.parametrize(("major_version", "minor_version"), [(2, 1), (1, 2), (2, 2)]) +async def test_call_async_migrate_entry_failure_not_bool( + hass: HomeAssistant, major_version: int, minor_version: int +) -> None: """Test migration fails if boolean not returned.""" entry = MockConfigEntry(domain="comp") - entry.version = 2 + entry.version = major_version + entry.minor_version = minor_version entry.add_to_hass(hass) assert not entry.supports_unload @@ -248,12 +264,14 @@ async def test_call_async_migrate_entry_failure_not_bool(hass: HomeAssistant) -> assert not entry.supports_unload +@pytest.mark.parametrize(("major_version", "minor_version"), [(2, 1), (2, 2)]) async def test_call_async_migrate_entry_failure_not_supported( - hass: HomeAssistant, + hass: HomeAssistant, major_version: int, minor_version: int ) -> None: """Test migration fails if async_migrate_entry not implemented.""" entry = MockConfigEntry(domain="comp") - entry.version = 2 + entry.version = major_version + entry.minor_version = minor_version entry.add_to_hass(hass) assert not entry.supports_unload @@ -269,6 +287,29 @@ async def test_call_async_migrate_entry_failure_not_supported( assert not entry.supports_unload +@pytest.mark.parametrize(("major_version", "minor_version"), [(1, 2)]) +async def test_call_async_migrate_entry_not_supported_minor_version( + hass: HomeAssistant, major_version: int, minor_version: int +) -> None: + """Test migration without async_migrate_entry and minor version changed.""" + entry = MockConfigEntry(domain="comp") + entry.version = major_version + entry.minor_version = minor_version + entry.add_to_hass(hass) + assert not entry.supports_unload + + mock_setup_entry = AsyncMock(return_value=True) + + mock_integration(hass, MockModule("comp", async_setup_entry=mock_setup_entry)) + mock_platform(hass, "comp.config_flow", None) + + result = await async_setup_component(hass, "comp", {}) + assert result + assert len(mock_setup_entry.mock_calls) == 1 + assert entry.state is config_entries.ConfigEntryState.LOADED + assert not entry.supports_unload + + async def test_remove_entry( hass: HomeAssistant, manager: config_entries.ConfigEntries, From e72554e75f86f380168ed12457b4ff29dffa5b1b Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 11 Dec 2023 14:32:26 +0100 Subject: [PATCH 5/8] Update tests --- tests/components/cloud/test_repairs.py | 1 + .../components/config/test_config_entries.py | 3 ++ .../elgato/snapshots/test_config_flow.ambr | 6 +++ .../snapshots/test_config_flow.ambr | 2 + .../snapshots/test_config_flow.ambr | 4 ++ tests/components/hassio/test_repairs.py | 6 +++ .../snapshots/test_config_flow.ambr | 8 ++++ tests/components/hue/test_services.py | 44 ++++++++++--------- tests/components/kitchen_sink/test_init.py | 1 + .../components/philips_js/test_config_flow.py | 1 + tests/components/ps4/test_init.py | 1 + .../components/repairs/test_websocket_api.py | 1 + tests/components/subaru/test_config_flow.py | 2 + .../snapshots/test_config_flow.ambr | 4 ++ tests/components/unifi/test_device_tracker.py | 1 + tests/components/unifi/test_diagnostics.py | 1 + tests/components/unifi/test_switch.py | 1 + .../uptime/snapshots/test_config_flow.ambr | 2 + .../whois/snapshots/test_config_flow.ambr | 10 +++++ .../wyoming/snapshots/test_config_flow.ambr | 6 +++ 20 files changed, 85 insertions(+), 20 deletions(-) diff --git a/tests/components/cloud/test_repairs.py b/tests/components/cloud/test_repairs.py index f83de408bcce..8d890a503e14 100644 --- a/tests/components/cloud/test_repairs.py +++ b/tests/components/cloud/test_repairs.py @@ -154,6 +154,7 @@ async def test_legacy_subscription_repair_flow( "handler": DOMAIN, "description": None, "description_placeholders": None, + "minor_version": 1, } assert not issue_registry.async_get_issue( diff --git a/tests/components/config/test_config_entries.py b/tests/components/config/test_config_entries.py index bfee7551cffe..414f4eb39f2f 100644 --- a/tests/components/config/test_config_entries.py +++ b/tests/components/config/test_config_entries.py @@ -532,6 +532,7 @@ async def async_step_user(self, user_input=None): "description": None, "description_placeholders": None, "options": {}, + "minor_version": 1, } @@ -609,6 +610,7 @@ async def async_step_account(self, user_input=None): "description": None, "description_placeholders": None, "options": {}, + "minor_version": 1, } @@ -942,6 +944,7 @@ async def async_step_finish(self, user_input=None): "version": 1, "description": None, "description_placeholders": None, + "minor_version": 1, } diff --git a/tests/components/elgato/snapshots/test_config_flow.ambr b/tests/components/elgato/snapshots/test_config_flow.ambr index 46180994e616..39202d383fa0 100644 --- a/tests/components/elgato/snapshots/test_config_flow.ambr +++ b/tests/components/elgato/snapshots/test_config_flow.ambr @@ -14,6 +14,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'elgato', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -25,6 +26,7 @@ 'disabled_by': None, 'domain': 'elgato', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, @@ -55,6 +57,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'elgato', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -66,6 +69,7 @@ 'disabled_by': None, 'domain': 'elgato', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, @@ -95,6 +99,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'elgato', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -106,6 +111,7 @@ 'disabled_by': None, 'domain': 'elgato', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/energyzero/snapshots/test_config_flow.ambr b/tests/components/energyzero/snapshots/test_config_flow.ambr index 68c46a705d79..9b4b3bfc635d 100644 --- a/tests/components/energyzero/snapshots/test_config_flow.ambr +++ b/tests/components/energyzero/snapshots/test_config_flow.ambr @@ -11,6 +11,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'energyzero', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -19,6 +20,7 @@ 'disabled_by': None, 'domain': 'energyzero', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/gardena_bluetooth/snapshots/test_config_flow.ambr b/tests/components/gardena_bluetooth/snapshots/test_config_flow.ambr index 31925e2d626c..a2fe4b63cf83 100644 --- a/tests/components/gardena_bluetooth/snapshots/test_config_flow.ambr +++ b/tests/components/gardena_bluetooth/snapshots/test_config_flow.ambr @@ -31,6 +31,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'gardena_bluetooth', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -40,6 +41,7 @@ 'disabled_by': None, 'domain': 'gardena_bluetooth', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, @@ -238,6 +240,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'gardena_bluetooth', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -247,6 +250,7 @@ 'disabled_by': None, 'domain': 'gardena_bluetooth', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/hassio/test_repairs.py b/tests/components/hassio/test_repairs.py index 21bf7e5b47a7..5dd73a216153 100644 --- a/tests/components/hassio/test_repairs.py +++ b/tests/components/hassio/test_repairs.py @@ -100,6 +100,7 @@ async def test_supervisor_issue_repair_flow( "handler": "hassio", "description": None, "description_placeholders": None, + "minor_version": 1, } assert not issue_registry.async_get_issue(domain="hassio", issue_id="1234") @@ -195,6 +196,7 @@ async def test_supervisor_issue_repair_flow_with_multiple_suggestions( "handler": "hassio", "description": None, "description_placeholders": None, + "minor_version": 1, } assert not issue_registry.async_get_issue(domain="hassio", issue_id="1234") @@ -309,6 +311,7 @@ async def test_supervisor_issue_repair_flow_with_multiple_suggestions_and_confir "handler": "hassio", "description": None, "description_placeholders": None, + "minor_version": 1, } assert not issue_registry.async_get_issue(domain="hassio", issue_id="1234") @@ -389,6 +392,7 @@ async def test_supervisor_issue_repair_flow_skip_confirmation( "handler": "hassio", "description": None, "description_placeholders": None, + "minor_version": 1, } assert not issue_registry.async_get_issue(domain="hassio", issue_id="1234") @@ -488,6 +492,7 @@ async def test_mount_failed_repair_flow( "handler": "hassio", "description": None, "description_placeholders": None, + "minor_version": 1, } assert not issue_registry.async_get_issue(domain="hassio", issue_id="1234") @@ -599,6 +604,7 @@ async def test_supervisor_issue_docker_config_repair_flow( "handler": "hassio", "description": None, "description_placeholders": None, + "minor_version": 1, } assert not issue_registry.async_get_issue(domain="hassio", issue_id="1234") diff --git a/tests/components/homewizard/snapshots/test_config_flow.ambr b/tests/components/homewizard/snapshots/test_config_flow.ambr index b5b7411532e1..663d91539911 100644 --- a/tests/components/homewizard/snapshots/test_config_flow.ambr +++ b/tests/components/homewizard/snapshots/test_config_flow.ambr @@ -12,6 +12,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'homewizard', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -21,6 +22,7 @@ 'disabled_by': None, 'domain': 'homewizard', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, @@ -52,6 +54,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'homewizard', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -61,6 +64,7 @@ 'disabled_by': None, 'domain': 'homewizard', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, @@ -92,6 +96,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'homewizard', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -101,6 +106,7 @@ 'disabled_by': None, 'domain': 'homewizard', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, @@ -128,6 +134,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'homewizard', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -137,6 +144,7 @@ 'disabled_by': None, 'domain': 'homewizard', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/hue/test_services.py b/tests/components/hue/test_services.py index 01b349c73611..ec1c1154d757 100644 --- a/tests/components/hue/test_services.py +++ b/tests/components/hue/test_services.py @@ -49,11 +49,12 @@ async def test_hue_activate_scene(hass: HomeAssistant, mock_api_v1) -> None: """Test successful hue_activate_scene.""" config_entry = config_entries.ConfigEntry( - 1, - hue.DOMAIN, - "Mock Title", - {"host": "1.2.3.4", "api_key": "mock-api-key", "api_version": 1}, - "test", + version=1, + minor_version=1, + domain=hue.DOMAIN, + title="Mock Title", + data={"host": "1.2.3.4", "api_key": "mock-api-key", "api_version": 1}, + source="test", options={CONF_ALLOW_HUE_GROUPS: True, CONF_ALLOW_UNREACHABLE: False}, ) @@ -85,11 +86,12 @@ async def test_hue_activate_scene(hass: HomeAssistant, mock_api_v1) -> None: async def test_hue_activate_scene_transition(hass: HomeAssistant, mock_api_v1) -> None: """Test successful hue_activate_scene with transition.""" config_entry = config_entries.ConfigEntry( - 1, - hue.DOMAIN, - "Mock Title", - {"host": "1.2.3.4", "api_key": "mock-api-key", "api_version": 1}, - "test", + version=1, + minor_version=1, + domain=hue.DOMAIN, + title="Mock Title", + data={"host": "1.2.3.4", "api_key": "mock-api-key", "api_version": 1}, + source="test", options={CONF_ALLOW_HUE_GROUPS: True, CONF_ALLOW_UNREACHABLE: False}, ) @@ -123,11 +125,12 @@ async def test_hue_activate_scene_group_not_found( ) -> None: """Test failed hue_activate_scene due to missing group.""" config_entry = config_entries.ConfigEntry( - 1, - hue.DOMAIN, - "Mock Title", - {"host": "1.2.3.4", "api_key": "mock-api-key", "api_version": 1}, - "test", + version=1, + minor_version=1, + domain=hue.DOMAIN, + title="Mock Title", + data={"host": "1.2.3.4", "api_key": "mock-api-key", "api_version": 1}, + source="test", options={CONF_ALLOW_HUE_GROUPS: True, CONF_ALLOW_UNREACHABLE: False}, ) @@ -156,11 +159,12 @@ async def test_hue_activate_scene_scene_not_found( ) -> None: """Test failed hue_activate_scene due to missing scene.""" config_entry = config_entries.ConfigEntry( - 1, - hue.DOMAIN, - "Mock Title", - {"host": "1.2.3.4", "api_key": "mock-api-key", "api_version": 1}, - "test", + version=1, + minor_version=1, + domain=hue.DOMAIN, + title="Mock Title", + data={"host": "1.2.3.4", "api_key": "mock-api-key", "api_version": 1}, + source="test", options={CONF_ALLOW_HUE_GROUPS: True, CONF_ALLOW_UNREACHABLE: False}, ) diff --git a/tests/components/kitchen_sink/test_init.py b/tests/components/kitchen_sink/test_init.py index ebd0f781d225..71f3a83c7015 100644 --- a/tests/components/kitchen_sink/test_init.py +++ b/tests/components/kitchen_sink/test_init.py @@ -229,6 +229,7 @@ async def test_issues_created( "description_placeholders": None, "flow_id": flow_id, "handler": DOMAIN, + "minor_version": 1, "type": "create_entry", "version": 1, } diff --git a/tests/components/philips_js/test_config_flow.py b/tests/components/philips_js/test_config_flow.py index 603e278d5924..8229f4e8fa9e 100644 --- a/tests/components/philips_js/test_config_flow.py +++ b/tests/components/philips_js/test_config_flow.py @@ -160,6 +160,7 @@ async def test_pairing(hass: HomeAssistant, mock_tv_pairable, mock_setup_entry) "data": MOCK_CONFIG_PAIRED, "version": 1, "options": {}, + "minor_version": 1, } await hass.async_block_till_done() diff --git a/tests/components/ps4/test_init.py b/tests/components/ps4/test_init.py index 3b8dc5e1e247..1252348b3e00 100644 --- a/tests/components/ps4/test_init.py +++ b/tests/components/ps4/test_init.py @@ -44,6 +44,7 @@ MOCK_FLOW_RESULT = { "version": VERSION, + "minor_version": 1, "handler": DOMAIN, "type": data_entry_flow.FlowResultType.CREATE_ENTRY, "title": "test_ps4", diff --git a/tests/components/repairs/test_websocket_api.py b/tests/components/repairs/test_websocket_api.py index 6c9b51a7cf67..1f68c9a28d3d 100644 --- a/tests/components/repairs/test_websocket_api.py +++ b/tests/components/repairs/test_websocket_api.py @@ -338,6 +338,7 @@ async def test_fix_issue( "description_placeholders": None, "flow_id": flow_id, "handler": domain, + "minor_version": 1, "type": "create_entry", "version": 1, } diff --git a/tests/components/subaru/test_config_flow.py b/tests/components/subaru/test_config_flow.py index c3df10ed6181..7e892d2c99a5 100644 --- a/tests/components/subaru/test_config_flow.py +++ b/tests/components/subaru/test_config_flow.py @@ -130,6 +130,7 @@ async def test_user_form_pin_not_required( "version": 1, "data": deepcopy(TEST_CONFIG), "options": {}, + "minor_version": 1, } expected["data"][CONF_PIN] = None @@ -316,6 +317,7 @@ async def test_pin_form_success(hass: HomeAssistant, pin_form) -> None: "version": 1, "data": TEST_CONFIG, "options": {}, + "minor_version": 1, } result["data"][CONF_DEVICE_ID] = TEST_DEVICE_ID assert result == expected diff --git a/tests/components/twentemilieu/snapshots/test_config_flow.ambr b/tests/components/twentemilieu/snapshots/test_config_flow.ambr index 7acb466d9977..00b960620520 100644 --- a/tests/components/twentemilieu/snapshots/test_config_flow.ambr +++ b/tests/components/twentemilieu/snapshots/test_config_flow.ambr @@ -15,6 +15,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'twentemilieu', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -27,6 +28,7 @@ 'disabled_by': None, 'domain': 'twentemilieu', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, @@ -57,6 +59,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'twentemilieu', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -69,6 +72,7 @@ 'disabled_by': None, 'domain': 'twentemilieu', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/unifi/test_device_tracker.py b/tests/components/unifi/test_device_tracker.py index 5a12b99d10b6..34d43129a947 100644 --- a/tests/components/unifi/test_device_tracker.py +++ b/tests/components/unifi/test_device_tracker.py @@ -930,6 +930,7 @@ async def test_restoring_client( config_entry = config_entries.ConfigEntry( version=1, + minor_version=1, domain=UNIFI_DOMAIN, title="Mock Title", data=ENTRY_CONFIG, diff --git a/tests/components/unifi/test_diagnostics.py b/tests/components/unifi/test_diagnostics.py index 638e79ae6496..127b9b79c2b7 100644 --- a/tests/components/unifi/test_diagnostics.py +++ b/tests/components/unifi/test_diagnostics.py @@ -129,6 +129,7 @@ async def test_entry_diagnostics( "disabled_by": None, "domain": "unifi", "entry_id": "1", + "minor_version": 1, "options": { "allow_bandwidth_sensors": True, "allow_uptime_sensors": True, diff --git a/tests/components/unifi/test_switch.py b/tests/components/unifi/test_switch.py index 00ebcd0e683b..6a9e58b6f760 100644 --- a/tests/components/unifi/test_switch.py +++ b/tests/components/unifi/test_switch.py @@ -1628,6 +1628,7 @@ async def test_updating_unique_id( config_entry = config_entries.ConfigEntry( version=1, + minor_version=1, domain=UNIFI_DOMAIN, title="Mock Title", data=ENTRY_CONFIG, diff --git a/tests/components/uptime/snapshots/test_config_flow.ambr b/tests/components/uptime/snapshots/test_config_flow.ambr index ac4b7396839f..3e5b492f871a 100644 --- a/tests/components/uptime/snapshots/test_config_flow.ambr +++ b/tests/components/uptime/snapshots/test_config_flow.ambr @@ -10,6 +10,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'uptime', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -18,6 +19,7 @@ 'disabled_by': None, 'domain': 'uptime', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/whois/snapshots/test_config_flow.ambr b/tests/components/whois/snapshots/test_config_flow.ambr index 6eec94d42a52..08f3861dcd24 100644 --- a/tests/components/whois/snapshots/test_config_flow.ambr +++ b/tests/components/whois/snapshots/test_config_flow.ambr @@ -12,6 +12,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'whois', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -21,6 +22,7 @@ 'disabled_by': None, 'domain': 'whois', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, @@ -48,6 +50,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'whois', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -57,6 +60,7 @@ 'disabled_by': None, 'domain': 'whois', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, @@ -84,6 +88,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'whois', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -93,6 +98,7 @@ 'disabled_by': None, 'domain': 'whois', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, @@ -120,6 +126,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'whois', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -129,6 +136,7 @@ 'disabled_by': None, 'domain': 'whois', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, @@ -156,6 +164,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'whois', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -165,6 +174,7 @@ 'disabled_by': None, 'domain': 'whois', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/wyoming/snapshots/test_config_flow.ambr b/tests/components/wyoming/snapshots/test_config_flow.ambr index 99f411027f5e..a0e0c7c5011a 100644 --- a/tests/components/wyoming/snapshots/test_config_flow.ambr +++ b/tests/components/wyoming/snapshots/test_config_flow.ambr @@ -55,6 +55,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'wyoming', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -65,6 +66,7 @@ 'disabled_by': None, 'domain': 'wyoming', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, @@ -97,6 +99,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'wyoming', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -107,6 +110,7 @@ 'disabled_by': None, 'domain': 'wyoming', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, @@ -139,6 +143,7 @@ 'description_placeholders': None, 'flow_id': , 'handler': 'wyoming', + 'minor_version': 1, 'options': dict({ }), 'result': ConfigEntrySnapshot({ @@ -149,6 +154,7 @@ 'disabled_by': None, 'domain': 'wyoming', 'entry_id': , + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, From 566d32a5151b4b54ef3fc157593ef74cfda8d507 Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 11 Dec 2023 15:51:58 +0100 Subject: [PATCH 6/8] Update tests --- tests/components/airly/snapshots/test_diagnostics.ambr | 1 + tests/components/airnow/snapshots/test_diagnostics.ambr | 1 + tests/components/airvisual/snapshots/test_diagnostics.ambr | 1 + tests/components/airvisual_pro/snapshots/test_diagnostics.ambr | 1 + tests/components/airzone/snapshots/test_diagnostics.ambr | 1 + tests/components/airzone_cloud/snapshots/test_diagnostics.ambr | 1 + tests/components/ambient_station/snapshots/test_diagnostics.ambr | 1 + tests/components/axis/snapshots/test_diagnostics.ambr | 1 + tests/components/blink/snapshots/test_diagnostics.ambr | 1 + tests/components/co2signal/snapshots/test_diagnostics.ambr | 1 + tests/components/coinbase/snapshots/test_diagnostics.ambr | 1 + tests/components/deconz/snapshots/test_diagnostics.ambr | 1 + .../devolo_home_control/snapshots/test_diagnostics.ambr | 1 + .../devolo_home_network/snapshots/test_diagnostics.ambr | 1 + tests/components/enphase_envoy/snapshots/test_diagnostics.ambr | 1 + tests/components/esphome/snapshots/test_diagnostics.ambr | 1 + tests/components/gios/snapshots/test_diagnostics.ambr | 1 + .../components/google_assistant/snapshots/test_diagnostics.ambr | 1 + tests/components/iqvia/snapshots/test_diagnostics.ambr | 1 + tests/components/lacrosse_view/snapshots/test_diagnostics.ambr | 1 + tests/components/netatmo/snapshots/test_diagnostics.ambr | 1 + tests/components/nextdns/snapshots/test_diagnostics.ambr | 1 + tests/components/onvif/snapshots/test_diagnostics.ambr | 1 + tests/components/pi_hole/snapshots/test_diagnostics.ambr | 1 + tests/components/ridwell/snapshots/test_diagnostics.ambr | 1 + tests/components/screenlogic/snapshots/test_diagnostics.ambr | 1 + tests/components/twinkly/snapshots/test_diagnostics.ambr | 1 + tests/components/vicare/snapshots/test_diagnostics.ambr | 1 + tests/components/watttime/snapshots/test_diagnostics.ambr | 1 + 29 files changed, 29 insertions(+) diff --git a/tests/components/airly/snapshots/test_diagnostics.ambr b/tests/components/airly/snapshots/test_diagnostics.ambr index a224ea07d466..c22e96a2082e 100644 --- a/tests/components/airly/snapshots/test_diagnostics.ambr +++ b/tests/components/airly/snapshots/test_diagnostics.ambr @@ -11,6 +11,7 @@ 'disabled_by': None, 'domain': 'airly', 'entry_id': '3bd2acb0e4f0476d40865546d0d91921', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/airnow/snapshots/test_diagnostics.ambr b/tests/components/airnow/snapshots/test_diagnostics.ambr index 80c6de427ca7..71fda040c1d1 100644 --- a/tests/components/airnow/snapshots/test_diagnostics.ambr +++ b/tests/components/airnow/snapshots/test_diagnostics.ambr @@ -26,6 +26,7 @@ 'disabled_by': None, 'domain': 'airnow', 'entry_id': '3bd2acb0e4f0476d40865546d0d91921', + 'minor_version': 1, 'options': dict({ 'radius': 150, }), diff --git a/tests/components/airvisual/snapshots/test_diagnostics.ambr b/tests/components/airvisual/snapshots/test_diagnostics.ambr index c805c5f9cb7a..cb9d25b8790a 100644 --- a/tests/components/airvisual/snapshots/test_diagnostics.ambr +++ b/tests/components/airvisual/snapshots/test_diagnostics.ambr @@ -38,6 +38,7 @@ 'disabled_by': None, 'domain': 'airvisual', 'entry_id': '3bd2acb0e4f0476d40865546d0d91921', + 'minor_version': 1, 'options': dict({ 'show_on_map': True, }), diff --git a/tests/components/airvisual_pro/snapshots/test_diagnostics.ambr b/tests/components/airvisual_pro/snapshots/test_diagnostics.ambr index 96cda8e012fb..be709621e31e 100644 --- a/tests/components/airvisual_pro/snapshots/test_diagnostics.ambr +++ b/tests/components/airvisual_pro/snapshots/test_diagnostics.ambr @@ -93,6 +93,7 @@ 'disabled_by': None, 'domain': 'airvisual_pro', 'entry_id': '6a2b3770e53c28dc1eeb2515e906b0ce', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/airzone/snapshots/test_diagnostics.ambr b/tests/components/airzone/snapshots/test_diagnostics.ambr index 9cb6e5507119..8a8573689fa4 100644 --- a/tests/components/airzone/snapshots/test_diagnostics.ambr +++ b/tests/components/airzone/snapshots/test_diagnostics.ambr @@ -240,6 +240,7 @@ 'disabled_by': None, 'domain': 'airzone', 'entry_id': '6e7a0798c1734ba81d26ced0e690eaec', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/airzone_cloud/snapshots/test_diagnostics.ambr b/tests/components/airzone_cloud/snapshots/test_diagnostics.ambr index 594a5e6765a4..4a7217a08c5e 100644 --- a/tests/components/airzone_cloud/snapshots/test_diagnostics.ambr +++ b/tests/components/airzone_cloud/snapshots/test_diagnostics.ambr @@ -93,6 +93,7 @@ 'disabled_by': None, 'domain': 'airzone_cloud', 'entry_id': 'd186e31edb46d64d14b9b2f11f1ebd9f', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/ambient_station/snapshots/test_diagnostics.ambr b/tests/components/ambient_station/snapshots/test_diagnostics.ambr index 4b231660c4b8..b4aede7948c7 100644 --- a/tests/components/ambient_station/snapshots/test_diagnostics.ambr +++ b/tests/components/ambient_station/snapshots/test_diagnostics.ambr @@ -9,6 +9,7 @@ 'disabled_by': None, 'domain': 'ambient_station', 'entry_id': '382cf7643f016fd48b3fe52163fe8877', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/axis/snapshots/test_diagnostics.ambr b/tests/components/axis/snapshots/test_diagnostics.ambr index 74a1f110c142..9960fc9bfd2d 100644 --- a/tests/components/axis/snapshots/test_diagnostics.ambr +++ b/tests/components/axis/snapshots/test_diagnostics.ambr @@ -41,6 +41,7 @@ 'disabled_by': None, 'domain': 'axis', 'entry_id': '676abe5b73621446e6550a2e86ffe3dd', + 'minor_version': 1, 'options': dict({ 'events': True, }), diff --git a/tests/components/blink/snapshots/test_diagnostics.ambr b/tests/components/blink/snapshots/test_diagnostics.ambr index 7fb13c975487..a1c18223c115 100644 --- a/tests/components/blink/snapshots/test_diagnostics.ambr +++ b/tests/components/blink/snapshots/test_diagnostics.ambr @@ -38,6 +38,7 @@ }), 'disabled_by': None, 'domain': 'blink', + 'minor_version': 1, 'options': dict({ 'scan_interval': 300, }), diff --git a/tests/components/co2signal/snapshots/test_diagnostics.ambr b/tests/components/co2signal/snapshots/test_diagnostics.ambr index 53a0f000f280..645e0bd87e98 100644 --- a/tests/components/co2signal/snapshots/test_diagnostics.ambr +++ b/tests/components/co2signal/snapshots/test_diagnostics.ambr @@ -9,6 +9,7 @@ 'disabled_by': None, 'domain': 'co2signal', 'entry_id': '904a74160aa6f335526706bee85dfb83', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/coinbase/snapshots/test_diagnostics.ambr b/tests/components/coinbase/snapshots/test_diagnostics.ambr index 38224a9992f6..9079a7682c80 100644 --- a/tests/components/coinbase/snapshots/test_diagnostics.ambr +++ b/tests/components/coinbase/snapshots/test_diagnostics.ambr @@ -47,6 +47,7 @@ 'disabled_by': None, 'domain': 'coinbase', 'entry_id': '080272b77a4f80c41b94d7cdc86fd826', + 'minor_version': 1, 'options': dict({ 'account_balance_currencies': list([ ]), diff --git a/tests/components/deconz/snapshots/test_diagnostics.ambr b/tests/components/deconz/snapshots/test_diagnostics.ambr index bbd96f1751cf..911f2e134f26 100644 --- a/tests/components/deconz/snapshots/test_diagnostics.ambr +++ b/tests/components/deconz/snapshots/test_diagnostics.ambr @@ -12,6 +12,7 @@ 'disabled_by': None, 'domain': 'deconz', 'entry_id': '1', + 'minor_version': 1, 'options': dict({ 'master': True, }), diff --git a/tests/components/devolo_home_control/snapshots/test_diagnostics.ambr b/tests/components/devolo_home_control/snapshots/test_diagnostics.ambr index d2ff64ad5965..8c069de8f62a 100644 --- a/tests/components/devolo_home_control/snapshots/test_diagnostics.ambr +++ b/tests/components/devolo_home_control/snapshots/test_diagnostics.ambr @@ -40,6 +40,7 @@ 'disabled_by': None, 'domain': 'devolo_home_control', 'entry_id': '123456', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/devolo_home_network/snapshots/test_diagnostics.ambr b/tests/components/devolo_home_network/snapshots/test_diagnostics.ambr index 236588b87ada..317aaac0116b 100644 --- a/tests/components/devolo_home_network/snapshots/test_diagnostics.ambr +++ b/tests/components/devolo_home_network/snapshots/test_diagnostics.ambr @@ -24,6 +24,7 @@ 'disabled_by': None, 'domain': 'devolo_home_network', 'entry_id': '123456', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/enphase_envoy/snapshots/test_diagnostics.ambr b/tests/components/enphase_envoy/snapshots/test_diagnostics.ambr index 098fc4ee37e9..f0021e1934a8 100644 --- a/tests/components/enphase_envoy/snapshots/test_diagnostics.ambr +++ b/tests/components/enphase_envoy/snapshots/test_diagnostics.ambr @@ -15,6 +15,7 @@ 'disabled_by': None, 'domain': 'enphase_envoy', 'entry_id': '45a36e55aaddb2007c5f6602e0c38e72', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/esphome/snapshots/test_diagnostics.ambr b/tests/components/esphome/snapshots/test_diagnostics.ambr index d8de8f06bc63..0d2f0e60b82d 100644 --- a/tests/components/esphome/snapshots/test_diagnostics.ambr +++ b/tests/components/esphome/snapshots/test_diagnostics.ambr @@ -12,6 +12,7 @@ 'disabled_by': None, 'domain': 'esphome', 'entry_id': '08d821dc059cf4f645cb024d32c8e708', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/gios/snapshots/test_diagnostics.ambr b/tests/components/gios/snapshots/test_diagnostics.ambr index 67691602fcf2..1401b1e22a08 100644 --- a/tests/components/gios/snapshots/test_diagnostics.ambr +++ b/tests/components/gios/snapshots/test_diagnostics.ambr @@ -9,6 +9,7 @@ 'disabled_by': None, 'domain': 'gios', 'entry_id': '86129426118ae32020417a53712d6eef', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/google_assistant/snapshots/test_diagnostics.ambr b/tests/components/google_assistant/snapshots/test_diagnostics.ambr index dffcddf5de51..663979eda771 100644 --- a/tests/components/google_assistant/snapshots/test_diagnostics.ambr +++ b/tests/components/google_assistant/snapshots/test_diagnostics.ambr @@ -7,6 +7,7 @@ }), 'disabled_by': None, 'domain': 'google_assistant', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/iqvia/snapshots/test_diagnostics.ambr b/tests/components/iqvia/snapshots/test_diagnostics.ambr index 49006716fb3c..c46a2cc15e39 100644 --- a/tests/components/iqvia/snapshots/test_diagnostics.ambr +++ b/tests/components/iqvia/snapshots/test_diagnostics.ambr @@ -350,6 +350,7 @@ 'disabled_by': None, 'domain': 'iqvia', 'entry_id': '690ac4b7e99855fc5ee7b987a758d5cb', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/lacrosse_view/snapshots/test_diagnostics.ambr b/tests/components/lacrosse_view/snapshots/test_diagnostics.ambr index 30094f97cd35..9d880746ff9d 100644 --- a/tests/components/lacrosse_view/snapshots/test_diagnostics.ambr +++ b/tests/components/lacrosse_view/snapshots/test_diagnostics.ambr @@ -17,6 +17,7 @@ 'disabled_by': None, 'domain': 'lacrosse_view', 'entry_id': 'lacrosse_view_test_entry_id', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/netatmo/snapshots/test_diagnostics.ambr b/tests/components/netatmo/snapshots/test_diagnostics.ambr index bd9005bd3890..cd547481de96 100644 --- a/tests/components/netatmo/snapshots/test_diagnostics.ambr +++ b/tests/components/netatmo/snapshots/test_diagnostics.ambr @@ -588,6 +588,7 @@ }), 'disabled_by': None, 'domain': 'netatmo', + 'minor_version': 1, 'options': dict({ 'weather_areas': dict({ 'Home avg': dict({ diff --git a/tests/components/nextdns/snapshots/test_diagnostics.ambr b/tests/components/nextdns/snapshots/test_diagnostics.ambr index 071d14f183b9..5040c6e052e3 100644 --- a/tests/components/nextdns/snapshots/test_diagnostics.ambr +++ b/tests/components/nextdns/snapshots/test_diagnostics.ambr @@ -9,6 +9,7 @@ 'disabled_by': None, 'domain': 'nextdns', 'entry_id': 'd9aa37407ddac7b964a99e86312288d6', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/onvif/snapshots/test_diagnostics.ambr b/tests/components/onvif/snapshots/test_diagnostics.ambr index e10c8791ba92..c4f692a4e611 100644 --- a/tests/components/onvif/snapshots/test_diagnostics.ambr +++ b/tests/components/onvif/snapshots/test_diagnostics.ambr @@ -13,6 +13,7 @@ 'disabled_by': None, 'domain': 'onvif', 'entry_id': '1', + 'minor_version': 1, 'options': dict({ 'enable_webhooks': True, 'extra_arguments': '-pred 1', diff --git a/tests/components/pi_hole/snapshots/test_diagnostics.ambr b/tests/components/pi_hole/snapshots/test_diagnostics.ambr index 69c77acc64ae..865494b5e9fe 100644 --- a/tests/components/pi_hole/snapshots/test_diagnostics.ambr +++ b/tests/components/pi_hole/snapshots/test_diagnostics.ambr @@ -25,6 +25,7 @@ 'disabled_by': None, 'domain': 'pi_hole', 'entry_id': 'pi_hole_mock_entry', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/ridwell/snapshots/test_diagnostics.ambr b/tests/components/ridwell/snapshots/test_diagnostics.ambr index a98374d2941c..d32b1d3f4460 100644 --- a/tests/components/ridwell/snapshots/test_diagnostics.ambr +++ b/tests/components/ridwell/snapshots/test_diagnostics.ambr @@ -36,6 +36,7 @@ 'disabled_by': None, 'domain': 'ridwell', 'entry_id': '11554ec901379b9cc8f5a6c1d11ce978', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/screenlogic/snapshots/test_diagnostics.ambr b/tests/components/screenlogic/snapshots/test_diagnostics.ambr index 05320c147e5a..0efd10fb9143 100644 --- a/tests/components/screenlogic/snapshots/test_diagnostics.ambr +++ b/tests/components/screenlogic/snapshots/test_diagnostics.ambr @@ -9,6 +9,7 @@ 'disabled_by': None, 'domain': 'screenlogic', 'entry_id': 'screenlogictest', + 'minor_version': 1, 'options': dict({ 'scan_interval': 30, }), diff --git a/tests/components/twinkly/snapshots/test_diagnostics.ambr b/tests/components/twinkly/snapshots/test_diagnostics.ambr index 7a7dc2557ef4..2a10154c3dac 100644 --- a/tests/components/twinkly/snapshots/test_diagnostics.ambr +++ b/tests/components/twinkly/snapshots/test_diagnostics.ambr @@ -30,6 +30,7 @@ 'disabled_by': None, 'domain': 'twinkly', 'entry_id': '4c8fccf5-e08a-4173-92d5-49bf479252a2', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/vicare/snapshots/test_diagnostics.ambr b/tests/components/vicare/snapshots/test_diagnostics.ambr index dc1b217948fd..dfc29d46cc24 100644 --- a/tests/components/vicare/snapshots/test_diagnostics.ambr +++ b/tests/components/vicare/snapshots/test_diagnostics.ambr @@ -4705,6 +4705,7 @@ 'disabled_by': None, 'domain': 'vicare', 'entry_id': '1234', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, diff --git a/tests/components/watttime/snapshots/test_diagnostics.ambr b/tests/components/watttime/snapshots/test_diagnostics.ambr index e1cf4a8a42f5..2ed35c19ad17 100644 --- a/tests/components/watttime/snapshots/test_diagnostics.ambr +++ b/tests/components/watttime/snapshots/test_diagnostics.ambr @@ -19,6 +19,7 @@ }), 'disabled_by': None, 'domain': 'watttime', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, From 22e51b0e1d160006866bbe4b6f754a326d4a22ee Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 11 Dec 2023 18:19:38 +0100 Subject: [PATCH 7/8] Update tests --- tests/snapshots/test_config_entries.ambr | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/snapshots/test_config_entries.ambr b/tests/snapshots/test_config_entries.ambr index beaa60cf7628..bfb583ba8db3 100644 --- a/tests/snapshots/test_config_entries.ambr +++ b/tests/snapshots/test_config_entries.ambr @@ -6,6 +6,7 @@ 'disabled_by': None, 'domain': 'test', 'entry_id': 'mock-entry', + 'minor_version': 1, 'options': dict({ }), 'pref_disable_new_entities': False, From 08e2dadaf76e18196baccc342c5ea28a0dae7e5a Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 11 Dec 2023 18:37:48 +0100 Subject: [PATCH 8/8] Update tests --- tests/components/forecast_solar/snapshots/test_init.ambr | 1 + tests/components/guardian/test_diagnostics.py | 1 + tests/components/kostal_plenticore/test_diagnostics.py | 1 + tests/components/notion/test_diagnostics.py | 1 + tests/components/openuv/test_diagnostics.py | 1 + tests/components/purpleair/test_diagnostics.py | 1 + tests/components/rainmachine/test_diagnostics.py | 2 ++ tests/components/recollect_waste/test_diagnostics.py | 1 + tests/components/samsungtv/test_diagnostics.py | 3 +++ tests/components/simplisafe/test_diagnostics.py | 1 + tests/components/switcher_kis/test_diagnostics.py | 1 + tests/components/webostv/test_diagnostics.py | 1 + 12 files changed, 15 insertions(+) diff --git a/tests/components/forecast_solar/snapshots/test_init.ambr b/tests/components/forecast_solar/snapshots/test_init.ambr index a009105e2e6b..43145bcef9e9 100644 --- a/tests/components/forecast_solar/snapshots/test_init.ambr +++ b/tests/components/forecast_solar/snapshots/test_init.ambr @@ -8,6 +8,7 @@ 'disabled_by': None, 'domain': 'forecast_solar', 'entry_id': , + 'minor_version': 1, 'options': dict({ 'api_key': 'abcdef12345', 'azimuth': 190, diff --git a/tests/components/guardian/test_diagnostics.py b/tests/components/guardian/test_diagnostics.py index b58b2ccdba3a..ec2884616616 100644 --- a/tests/components/guardian/test_diagnostics.py +++ b/tests/components/guardian/test_diagnostics.py @@ -23,6 +23,7 @@ async def test_entry_diagnostics( "entry": { "entry_id": config_entry.entry_id, "version": 1, + "minor_version": 1, "domain": "guardian", "title": REDACTED, "data": { diff --git a/tests/components/kostal_plenticore/test_diagnostics.py b/tests/components/kostal_plenticore/test_diagnostics.py index 87c8c0e26a88..d509a323e6a4 100644 --- a/tests/components/kostal_plenticore/test_diagnostics.py +++ b/tests/components/kostal_plenticore/test_diagnostics.py @@ -43,6 +43,7 @@ async def test_entry_diagnostics( "config_entry": { "entry_id": "2ab8dd92a62787ddfe213a67e09406bd", "version": 1, + "minor_version": 1, "domain": "kostal_plenticore", "title": "scb", "data": {"host": "192.168.1.2", "password": REDACTED}, diff --git a/tests/components/notion/test_diagnostics.py b/tests/components/notion/test_diagnostics.py index 14a1a0e17685..07a67cb14295 100644 --- a/tests/components/notion/test_diagnostics.py +++ b/tests/components/notion/test_diagnostics.py @@ -18,6 +18,7 @@ async def test_entry_diagnostics( "entry": { "entry_id": config_entry.entry_id, "version": 1, + "minor_version": 1, "domain": DOMAIN, "title": REDACTED, "data": {"username": REDACTED, "password": REDACTED}, diff --git a/tests/components/openuv/test_diagnostics.py b/tests/components/openuv/test_diagnostics.py index fa7c78980373..e7efc4596309 100644 --- a/tests/components/openuv/test_diagnostics.py +++ b/tests/components/openuv/test_diagnostics.py @@ -19,6 +19,7 @@ async def test_entry_diagnostics( "entry": { "entry_id": config_entry.entry_id, "version": 2, + "minor_version": 1, "domain": "openuv", "title": REDACTED, "data": { diff --git a/tests/components/purpleair/test_diagnostics.py b/tests/components/purpleair/test_diagnostics.py index 35dc515241c0..85b078d0765c 100644 --- a/tests/components/purpleair/test_diagnostics.py +++ b/tests/components/purpleair/test_diagnostics.py @@ -17,6 +17,7 @@ async def test_entry_diagnostics( "entry": { "entry_id": config_entry.entry_id, "version": 1, + "minor_version": 1, "domain": "purpleair", "title": REDACTED, "data": { diff --git a/tests/components/rainmachine/test_diagnostics.py b/tests/components/rainmachine/test_diagnostics.py index 9c3aa6cd7ded..47cb32020262 100644 --- a/tests/components/rainmachine/test_diagnostics.py +++ b/tests/components/rainmachine/test_diagnostics.py @@ -19,6 +19,7 @@ async def test_entry_diagnostics( "entry": { "entry_id": config_entry.entry_id, "version": 2, + "minor_version": 1, "domain": "rainmachine", "title": "Mock Title", "data": { @@ -645,6 +646,7 @@ async def test_entry_diagnostics_failed_controller_diagnostics( "entry": { "entry_id": config_entry.entry_id, "version": 2, + "minor_version": 1, "domain": "rainmachine", "title": "Mock Title", "data": { diff --git a/tests/components/recollect_waste/test_diagnostics.py b/tests/components/recollect_waste/test_diagnostics.py index e905f4a56065..69ff1596d7cc 100644 --- a/tests/components/recollect_waste/test_diagnostics.py +++ b/tests/components/recollect_waste/test_diagnostics.py @@ -19,6 +19,7 @@ async def test_entry_diagnostics( "entry": { "entry_id": config_entry.entry_id, "version": 2, + "minor_version": 1, "domain": "recollect_waste", "title": REDACTED, "data": {"place_id": REDACTED, "service_id": TEST_SERVICE_ID}, diff --git a/tests/components/samsungtv/test_diagnostics.py b/tests/components/samsungtv/test_diagnostics.py index 231880a009b9..651b6f27a44c 100644 --- a/tests/components/samsungtv/test_diagnostics.py +++ b/tests/components/samsungtv/test_diagnostics.py @@ -41,6 +41,7 @@ async def test_entry_diagnostics( "disabled_by": None, "domain": "samsungtv", "entry_id": "123456", + "minor_version": 1, "options": {}, "pref_disable_new_entities": False, "pref_disable_polling": False, @@ -77,6 +78,7 @@ async def test_entry_diagnostics_encrypted( "disabled_by": None, "domain": "samsungtv", "entry_id": "123456", + "minor_version": 1, "options": {}, "pref_disable_new_entities": False, "pref_disable_polling": False, @@ -112,6 +114,7 @@ async def test_entry_diagnostics_encrypte_offline( "disabled_by": None, "domain": "samsungtv", "entry_id": "123456", + "minor_version": 1, "options": {}, "pref_disable_new_entities": False, "pref_disable_polling": False, diff --git a/tests/components/simplisafe/test_diagnostics.py b/tests/components/simplisafe/test_diagnostics.py index 3153674ce576..538165bd769f 100644 --- a/tests/components/simplisafe/test_diagnostics.py +++ b/tests/components/simplisafe/test_diagnostics.py @@ -17,6 +17,7 @@ async def test_entry_diagnostics( "entry": { "entry_id": config_entry.entry_id, "version": 1, + "minor_version": 1, "domain": "simplisafe", "title": REDACTED, "data": {"token": REDACTED, "username": REDACTED}, diff --git a/tests/components/switcher_kis/test_diagnostics.py b/tests/components/switcher_kis/test_diagnostics.py index 0af89cd238c3..f238bceb39ef 100644 --- a/tests/components/switcher_kis/test_diagnostics.py +++ b/tests/components/switcher_kis/test_diagnostics.py @@ -48,6 +48,7 @@ async def test_diagnostics( "entry": { "entry_id": entry.entry_id, "version": 1, + "minor_version": 1, "domain": "switcher_kis", "title": "Mock Title", "data": {}, diff --git a/tests/components/webostv/test_diagnostics.py b/tests/components/webostv/test_diagnostics.py index f0f411fb2789..b7d1646c6b68 100644 --- a/tests/components/webostv/test_diagnostics.py +++ b/tests/components/webostv/test_diagnostics.py @@ -44,6 +44,7 @@ async def test_diagnostics( "entry": { "entry_id": entry.entry_id, "version": 1, + "minor_version": 1, "domain": "webostv", "title": "fake_webos", "data": {