diff --git a/homeassistant/components/energyid/__init__.py b/homeassistant/components/energyid/__init__.py index 99ef8ed76def..94d13bb5665c 100644 --- a/homeassistant/components/energyid/__init__.py +++ b/homeassistant/components/energyid/__init__.py @@ -10,7 +10,7 @@ from aiohttp import ClientError, ClientResponseError from energyid_webhooks.client_v2 import WebhookClient from homeassistant.config_entries import ConfigEntry -from homeassistant.const import STATE_UNAVAILABLE, STATE_UNKNOWN +from homeassistant.const import CONF_DEVICE_ID, STATE_UNAVAILABLE, STATE_UNKNOWN from homeassistant.core import ( CALLBACK_TYPE, Event, @@ -28,7 +28,6 @@ from homeassistant.helpers.event import ( ) from .const import ( - CONF_DEVICE_ID, CONF_DEVICE_NAME, CONF_ENERGYID_KEY, CONF_HA_ENTITY_UUID, diff --git a/homeassistant/components/energyid/config_flow.py b/homeassistant/components/energyid/config_flow.py index a3760cc4cd65..15cd8ed5c6fb 100644 --- a/homeassistant/components/energyid/config_flow.py +++ b/homeassistant/components/energyid/config_flow.py @@ -15,13 +15,13 @@ from homeassistant.config_entries import ( ConfigFlowResult, ConfigSubentryFlow, ) +from homeassistant.const import CONF_DEVICE_ID from homeassistant.core import callback from homeassistant.helpers.aiohttp_client import async_get_clientsession import homeassistant.helpers.config_validation as cv from homeassistant.helpers.instance_id import async_get as async_get_instance_id from .const import ( - CONF_DEVICE_ID, CONF_DEVICE_NAME, CONF_PROVISIONING_KEY, CONF_PROVISIONING_SECRET, diff --git a/homeassistant/components/energyid/const.py b/homeassistant/components/energyid/const.py index e8b25e5ec1b9..dd272bf48b60 100644 --- a/homeassistant/components/energyid/const.py +++ b/homeassistant/components/energyid/const.py @@ -8,8 +8,6 @@ NAME: Final = "EnergyID" # --- Config Flow and Entry Data --- CONF_PROVISIONING_KEY: Final = "provisioning_key" CONF_PROVISIONING_SECRET: Final = "provisioning_secret" -# pylint: disable-next=home-assistant-duplicate-const -CONF_DEVICE_ID: Final = "device_id" CONF_DEVICE_NAME: Final = "device_name" # --- Subentry (Mapping) Data --- diff --git a/tests/components/energyid/conftest.py b/tests/components/energyid/conftest.py index 2add7467bac4..fb015973f2b8 100644 --- a/tests/components/energyid/conftest.py +++ b/tests/components/energyid/conftest.py @@ -6,12 +6,12 @@ from unittest.mock import AsyncMock, MagicMock, patch import pytest from homeassistant.components.energyid.const import ( - CONF_DEVICE_ID, CONF_DEVICE_NAME, CONF_PROVISIONING_KEY, CONF_PROVISIONING_SECRET, DOMAIN, ) +from homeassistant.const import CONF_DEVICE_ID from homeassistant.core import HomeAssistant from tests.common import MockConfigEntry diff --git a/tests/components/energyid/test_config_flow.py b/tests/components/energyid/test_config_flow.py index a4401751018c..9bbbb3622573 100644 --- a/tests/components/energyid/test_config_flow.py +++ b/tests/components/energyid/test_config_flow.py @@ -9,7 +9,6 @@ import pytest from homeassistant import config_entries from homeassistant.components.energyid.config_flow import EnergyIDConfigFlow from homeassistant.components.energyid.const import ( - CONF_DEVICE_ID, CONF_DEVICE_NAME, CONF_PROVISIONING_KEY, CONF_PROVISIONING_SECRET, @@ -18,6 +17,7 @@ from homeassistant.components.energyid.const import ( from homeassistant.components.energyid.energyid_sensor_mapping_flow import ( EnergyIDSensorMappingFlowHandler, ) +from homeassistant.const import CONF_DEVICE_ID from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import FlowResultType diff --git a/tests/components/energyid/test_energyid_sensor_mapping_flow.py b/tests/components/energyid/test_energyid_sensor_mapping_flow.py index 4abb6efb7c47..aa0d2511b501 100644 --- a/tests/components/energyid/test_energyid_sensor_mapping_flow.py +++ b/tests/components/energyid/test_energyid_sensor_mapping_flow.py @@ -6,7 +6,6 @@ from unittest.mock import patch import pytest from homeassistant.components.energyid.const import ( - CONF_DEVICE_ID, CONF_ENERGYID_KEY, CONF_HA_ENTITY_UUID, CONF_PROVISIONING_KEY, @@ -19,6 +18,7 @@ from homeassistant.components.energyid.energyid_sensor_mapping_flow import ( _validate_mapping_input, ) from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass +from homeassistant.const import CONF_DEVICE_ID from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import InvalidData from homeassistant.helpers import entity_registry as er diff --git a/tests/components/energyid/test_init.py b/tests/components/energyid/test_init.py index a18ce940b017..8a9037d04e99 100644 --- a/tests/components/energyid/test_init.py +++ b/tests/components/energyid/test_init.py @@ -11,7 +11,6 @@ from homeassistant.components.energyid import ( async_unload_entry, ) from homeassistant.components.energyid.const import ( - CONF_DEVICE_ID, CONF_DEVICE_NAME, CONF_ENERGYID_KEY, CONF_HA_ENTITY_UUID, @@ -19,7 +18,7 @@ from homeassistant.components.energyid.const import ( CONF_PROVISIONING_SECRET, ) from homeassistant.config_entries import ConfigEntryState -from homeassistant.const import STATE_UNAVAILABLE, STATE_UNKNOWN +from homeassistant.const import CONF_DEVICE_ID, STATE_UNAVAILABLE, STATE_UNKNOWN from homeassistant.core import Event, EventStateChangedData, HomeAssistant from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers import entity_registry as er