From 02c012ba6fd3936c4ff169edb07ba6bfe01560c5 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Tue, 10 Nov 2026 20:41:19 +0100 Subject: [PATCH] Remove unreachable domain check from Tesla Fleet registration step (#191895) Co-authored-by: Claude --- .../components/tesla_fleet/config_flow.py | 3 +-- tests/components/tesla_fleet/test_config_flow.py | 16 ---------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/homeassistant/components/tesla_fleet/config_flow.py b/homeassistant/components/tesla_fleet/config_flow.py index 46db9f0d3c77..e0b047f9dcbd 100644 --- a/homeassistant/components/tesla_fleet/config_flow.py +++ b/homeassistant/components/tesla_fleet/config_flow.py @@ -230,8 +230,7 @@ class OAuth2FlowHandler( if user_input is not None and self.uid and self.data: return self.async_create_entry(title=self.uid, data=self.data) - if not self.domain: - return await self.async_step_domain_input() + assert self.domain virtual_key_url = f"https://www.tesla.com/_ak/{self.domain}" data_schema = probatio.Schema({}).extend( diff --git a/tests/components/tesla_fleet/test_config_flow.py b/tests/components/tesla_fleet/test_config_flow.py index 27c7273f300b..3d80cc06c7da 100644 --- a/tests/components/tesla_fleet/test_config_flow.py +++ b/tests/components/tesla_fleet/test_config_flow.py @@ -21,7 +21,6 @@ from homeassistant.components.application_credentials import ( ClientCredential, async_import_client_credential, ) -from homeassistant.components.tesla_fleet.config_flow import OAuth2FlowHandler from homeassistant.components.tesla_fleet.const import ( AUTHORIZE_URL, DOMAIN, @@ -917,21 +916,6 @@ async def test_region_default_fallback( assert region_key.default() == "na" -@pytest.mark.usefixtures("current_request_with_host") -async def test_registration_complete_no_domain( - hass: HomeAssistant, -) -> None: - """Test registration complete step without domain.""" - - flow_instance = OAuth2FlowHandler() - flow_instance.hass = hass - flow_instance.domain = None - - result = await flow_instance.async_step_registration_complete({}) - assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "domain_input" - - @pytest.mark.usefixtures("current_request_with_host") async def test_reauthentication( hass: HomeAssistant,