From d279383a3357e524e27fde3ffeaa97fc790a4978 Mon Sep 17 00:00:00 2001 From: Mick Vleeshouwer Date: Tue, 18 Aug 2026 14:32:50 +0200 Subject: [PATCH] Revert host update on Overkiz local gateway rediscovery (#179422) --- .../components/overkiz/config_flow.py | 9 ++----- .../components/overkiz/quality_scale.yaml | 2 +- tests/components/overkiz/test_config_flow.py | 26 ------------------- 3 files changed, 3 insertions(+), 34 deletions(-) diff --git a/homeassistant/components/overkiz/config_flow.py b/homeassistant/components/overkiz/config_flow.py index 7b100bef1194..6c11e9ea4017 100644 --- a/homeassistant/components/overkiz/config_flow.py +++ b/homeassistant/components/overkiz/config_flow.py @@ -476,18 +476,13 @@ class OverkizConfigFlow( if discovery_info.type == "_kizboxdev._tcp.local.": self._host = f"{discovery_info.hostname[:-1]}:{discovery_info.port}" self._api_type = APIType.LOCAL - return await self._process_discovery( - gateway_id, updates={CONF_HOST: self._host} - ) return await self._process_discovery(gateway_id) - async def _process_discovery( - self, gateway_id: str, *, updates: dict[str, Any] | None = None - ) -> ConfigFlowResult: + async def _process_discovery(self, gateway_id: str) -> ConfigFlowResult: """Handle discovery of a gateway.""" await self.async_set_unique_id(gateway_id) - self._abort_if_unique_id_configured(updates=updates) + self._abort_if_unique_id_configured() self.context["title_placeholders"] = {"gateway_id": gateway_id} return await self.async_step_user() diff --git a/homeassistant/components/overkiz/quality_scale.yaml b/homeassistant/components/overkiz/quality_scale.yaml index 2a93686cf5fc..ca6dd1b31178 100644 --- a/homeassistant/components/overkiz/quality_scale.yaml +++ b/homeassistant/components/overkiz/quality_scale.yaml @@ -41,7 +41,7 @@ rules: # Gold docs-examples: todo - discovery-update-info: done + discovery-update-info: todo entity-device-class: done entity-translations: todo docs-data-update: done diff --git a/tests/components/overkiz/test_config_flow.py b/tests/components/overkiz/test_config_flow.py index 18460ff1d545..44614e5303eb 100644 --- a/tests/components/overkiz/test_config_flow.py +++ b/tests/components/overkiz/test_config_flow.py @@ -1322,32 +1322,6 @@ async def test_zeroconf_flow_already_configured(hass: HomeAssistant) -> None: assert result["reason"] == "already_configured" -async def test_local_zeroconf_flow_updates_host(hass: HomeAssistant) -> None: - """Test that rediscovery of a local gateway refreshes the stored host.""" - config_entry = MockConfigEntry( - domain=DOMAIN, - unique_id=TEST_GATEWAY_ID, - data={ - "host": "gateway-1234-5678-9123.local:9999", - "token": TEST_TOKEN, - "verify_ssl": False, - "hub": TEST_SERVER, - "api_type": "local", - }, - ) - config_entry.add_to_hass(hass) - - result = await hass.config_entries.flow.async_init( - DOMAIN, - data=FAKE_ZERO_CONF_INFO_LOCAL, - context={"source": config_entries.SOURCE_ZEROCONF}, - ) - - assert result["type"] is FlowResultType.ABORT - assert result["reason"] == "already_configured" - assert config_entry.data["host"] == "gateway-1234-5678-9123.local:8443" - - @pytest.fixture async def setup_rexel_credentials(hass: HomeAssistant) -> None: """Set up the application credential used by the Rexel OAuth2 flow."""