From a8381e923a75f3cd422bc6dff2afaabe7555ff34 Mon Sep 17 00:00:00 2001 From: Max Michels <6703026+maxmichels@users.noreply.github.com> Date: Thu, 21 May 2026 17:13:31 +0200 Subject: [PATCH] Replace duplicate constants with homeassistant.const imports (#171675) --- homeassistant/components/tesla_fleet/config_flow.py | 3 ++- homeassistant/components/tesla_fleet/const.py | 2 -- tests/components/tesla_fleet/test_config_flow.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/tesla_fleet/config_flow.py b/homeassistant/components/tesla_fleet/config_flow.py index 1830fc59db9..37434022467 100644 --- a/homeassistant/components/tesla_fleet/config_flow.py +++ b/homeassistant/components/tesla_fleet/config_flow.py @@ -18,6 +18,7 @@ from tesla_fleet_api.exceptions import ( import voluptuous as vol from homeassistant.config_entries import SOURCE_REAUTH, ConfigFlowResult +from homeassistant.const import CONF_DOMAIN from homeassistant.helpers import config_entry_oauth2_flow from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.selector import ( @@ -26,7 +27,7 @@ from homeassistant.helpers.selector import ( QrErrorCorrectionLevel, ) -from .const import CONF_DOMAIN, DOMAIN, LOGGER +from .const import DOMAIN, LOGGER from .oauth import TeslaUserImplementation diff --git a/homeassistant/components/tesla_fleet/const.py b/homeassistant/components/tesla_fleet/const.py index 4f962995409..aa83a77f5c6 100644 --- a/homeassistant/components/tesla_fleet/const.py +++ b/homeassistant/components/tesla_fleet/const.py @@ -7,8 +7,6 @@ from tesla_fleet_api.const import Scope DOMAIN = "tesla_fleet" -# pylint: disable-next=home-assistant-duplicate-const -CONF_DOMAIN = "domain" CONF_REFRESH_TOKEN = "refresh_token" LOGGER = logging.getLogger(__package__) diff --git a/tests/components/tesla_fleet/test_config_flow.py b/tests/components/tesla_fleet/test_config_flow.py index aca702a8903..07829d7740d 100644 --- a/tests/components/tesla_fleet/test_config_flow.py +++ b/tests/components/tesla_fleet/test_config_flow.py @@ -19,12 +19,12 @@ from homeassistant.components.application_credentials import ( from homeassistant.components.tesla_fleet.config_flow import OAuth2FlowHandler from homeassistant.components.tesla_fleet.const import ( AUTHORIZE_URL, - CONF_DOMAIN, DOMAIN, SCOPES, TOKEN_URL, ) from homeassistant.config_entries import SOURCE_USER +from homeassistant.const import CONF_DOMAIN from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import FlowResultType from homeassistant.helpers import config_entry_oauth2_flow