diff --git a/homeassistant/components/cast/config_flow.py b/homeassistant/components/cast/config_flow.py index 1c983d6f67a9..a5fc43600970 100644 --- a/homeassistant/components/cast/config_flow.py +++ b/homeassistant/components/cast/config_flow.py @@ -7,11 +7,12 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.components import onboarding, zeroconf +from homeassistant.const import CONF_UUID from homeassistant.core import callback from homeassistant.data_entry_flow import FlowResult from homeassistant.helpers import config_validation as cv -from .const import CONF_IGNORE_CEC, CONF_KNOWN_HOSTS, CONF_UUID, DOMAIN +from .const import CONF_IGNORE_CEC, CONF_KNOWN_HOSTS, DOMAIN IGNORE_CEC_SCHEMA = vol.Schema(vol.All(cv.ensure_list, [cv.string])) KNOWN_HOSTS_SCHEMA = vol.Schema(vol.All(cv.ensure_list, [cv.string])) diff --git a/homeassistant/components/cast/const.py b/homeassistant/components/cast/const.py index 06db70b830ab..e8e38a6e72be 100644 --- a/homeassistant/components/cast/const.py +++ b/homeassistant/components/cast/const.py @@ -25,4 +25,3 @@ SIGNAL_HASS_CAST_SHOW_VIEW = "cast_show_view" CONF_IGNORE_CEC = "ignore_cec" CONF_KNOWN_HOSTS = "known_hosts" -CONF_UUID = "uuid" diff --git a/homeassistant/components/cast/media_player.py b/homeassistant/components/cast/media_player.py index 786a530e36c4..ee39cbd2868c 100644 --- a/homeassistant/components/cast/media_player.py +++ b/homeassistant/components/cast/media_player.py @@ -43,6 +43,7 @@ from homeassistant.components.media_player import ( from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( CAST_APP_ID_HOMEASSISTANT_LOVELACE, + CONF_UUID, EVENT_HOMEASSISTANT_STOP, ) from homeassistant.core import CALLBACK_TYPE, Event, HomeAssistant, callback @@ -59,7 +60,6 @@ from .const import ( ADDED_CAST_DEVICES_KEY, CAST_MULTIZONE_MANAGER_KEY, CONF_IGNORE_CEC, - CONF_UUID, DOMAIN as CAST_DOMAIN, SIGNAL_CAST_DISCOVERED, SIGNAL_CAST_REMOVED, diff --git a/homeassistant/components/daikin/__init__.py b/homeassistant/components/daikin/__init__.py index 536e2fa48d1b..481a072bdb3c 100644 --- a/homeassistant/components/daikin/__init__.py +++ b/homeassistant/components/daikin/__init__.py @@ -8,7 +8,13 @@ from async_timeout import timeout from pydaikin.daikin_base import Appliance from homeassistant.config_entries import ConfigEntry -from homeassistant.const import CONF_API_KEY, CONF_HOST, CONF_PASSWORD, Platform +from homeassistant.const import ( + CONF_API_KEY, + CONF_HOST, + CONF_PASSWORD, + CONF_UUID, + Platform, +) from homeassistant.core import HomeAssistant from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers.aiohttp_client import async_get_clientsession @@ -17,7 +23,7 @@ from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC from homeassistant.helpers.entity import DeviceInfo from homeassistant.util import Throttle -from .const import CONF_UUID, DOMAIN, KEY_MAC, TIMEOUT +from .const import DOMAIN, KEY_MAC, TIMEOUT _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/daikin/config_flow.py b/homeassistant/components/daikin/config_flow.py index fb34c947fa72..e8ac9950a51e 100644 --- a/homeassistant/components/daikin/config_flow.py +++ b/homeassistant/components/daikin/config_flow.py @@ -11,11 +11,11 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.components import zeroconf -from homeassistant.const import CONF_API_KEY, CONF_HOST, CONF_PASSWORD +from homeassistant.const import CONF_API_KEY, CONF_HOST, CONF_PASSWORD, CONF_UUID from homeassistant.data_entry_flow import FlowResult from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import CONF_UUID, DOMAIN, KEY_MAC, TIMEOUT +from .const import DOMAIN, KEY_MAC, TIMEOUT _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/daikin/const.py b/homeassistant/components/daikin/const.py index a978e96178d7..67d014ecdb3e 100644 --- a/homeassistant/components/daikin/const.py +++ b/homeassistant/components/daikin/const.py @@ -20,8 +20,6 @@ ATTR_TOTAL_ENERGY_TODAY = "total_energy_today" ATTR_STATE_ON = "on" ATTR_STATE_OFF = "off" -CONF_UUID = "uuid" - KEY_MAC = "mac" KEY_IP = "ip" diff --git a/homeassistant/components/ipp/config_flow.py b/homeassistant/components/ipp/config_flow.py index 7f953c4cd9af..fa5e23063b4c 100644 --- a/homeassistant/components/ipp/config_flow.py +++ b/homeassistant/components/ipp/config_flow.py @@ -22,13 +22,14 @@ from homeassistant.const import ( CONF_NAME, CONF_PORT, CONF_SSL, + CONF_UUID, CONF_VERIFY_SSL, ) from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import FlowResult from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import CONF_BASE_PATH, CONF_SERIAL, CONF_UUID, DOMAIN +from .const import CONF_BASE_PATH, CONF_SERIAL, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/ipp/const.py b/homeassistant/components/ipp/const.py index 3501759074f9..642898385430 100644 --- a/homeassistant/components/ipp/const.py +++ b/homeassistant/components/ipp/const.py @@ -18,4 +18,3 @@ ATTR_URI_SUPPORTED = "uri_supported" CONF_BASE_PATH = "base_path" CONF_SERIAL = "serial" CONF_TLS = "tls" -CONF_UUID = "uuid" diff --git a/homeassistant/components/netatmo/config_flow.py b/homeassistant/components/netatmo/config_flow.py index acd8965d0138..b4e6d8385375 100644 --- a/homeassistant/components/netatmo/config_flow.py +++ b/homeassistant/components/netatmo/config_flow.py @@ -10,7 +10,7 @@ from pyatmo.const import ALL_SCOPES import voluptuous as vol from homeassistant import config_entries -from homeassistant.const import CONF_SHOW_ON_MAP +from homeassistant.const import CONF_SHOW_ON_MAP, CONF_UUID from homeassistant.core import callback from homeassistant.data_entry_flow import FlowResult from homeassistant.helpers import config_entry_oauth2_flow, config_validation as cv @@ -23,7 +23,6 @@ from .const import ( CONF_LON_SW, CONF_NEW_AREA, CONF_PUBLIC_MODE, - CONF_UUID, CONF_WEATHER_AREAS, DOMAIN, ) diff --git a/homeassistant/components/netatmo/const.py b/homeassistant/components/netatmo/const.py index 21f821040dd3..50578eb82232 100644 --- a/homeassistant/components/netatmo/const.py +++ b/homeassistant/components/netatmo/const.py @@ -50,7 +50,6 @@ CONF_LON_NE = "lon_ne" CONF_LON_SW = "lon_sw" CONF_NEW_AREA = "new_area" CONF_PUBLIC_MODE = "mode" -CONF_UUID = "uuid" CONF_WEATHER_AREAS = "weather_areas" OAUTH2_AUTHORIZE = "https://api.netatmo.com/oauth2/authorize" diff --git a/homeassistant/components/tile/diagnostics.py b/homeassistant/components/tile/diagnostics.py index 8654bf446805..dda2c3367e3c 100644 --- a/homeassistant/components/tile/diagnostics.py +++ b/homeassistant/components/tile/diagnostics.py @@ -5,14 +5,13 @@ from typing import Any from homeassistant.components.diagnostics import async_redact_data from homeassistant.config_entries import ConfigEntry -from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE +from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE, CONF_UUID from homeassistant.core import HomeAssistant from . import TileData from .const import DOMAIN CONF_ALTITUDE = "altitude" -CONF_UUID = "uuid" TO_REDACT = { CONF_ALTITUDE, diff --git a/homeassistant/components/volkszaehler/sensor.py b/homeassistant/components/volkszaehler/sensor.py index 1a62fcbc36a0..83b242d0bc00 100644 --- a/homeassistant/components/volkszaehler/sensor.py +++ b/homeassistant/components/volkszaehler/sensor.py @@ -19,6 +19,7 @@ from homeassistant.const import ( CONF_MONITORED_CONDITIONS, CONF_NAME, CONF_PORT, + CONF_UUID, UnitOfEnergy, UnitOfPower, ) @@ -32,8 +33,6 @@ from homeassistant.util import Throttle _LOGGER = logging.getLogger(__name__) -CONF_UUID = "uuid" - DEFAULT_HOST = "localhost" DEFAULT_NAME = "Volkszaehler" DEFAULT_PORT = 80 diff --git a/homeassistant/const.py b/homeassistant/const.py index dfdab178d764..4e35a677f2ad 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -256,6 +256,7 @@ CONF_UNIT_SYSTEM: Final = "unit_system" CONF_UNTIL: Final = "until" CONF_URL: Final = "url" CONF_USERNAME: Final = "username" +CONF_UUID: Final = "uuid" CONF_VALUE_TEMPLATE: Final = "value_template" CONF_VARIABLES: Final = "variables" CONF_VERIFY_SSL: Final = "verify_ssl" diff --git a/tests/components/ipp/__init__.py b/tests/components/ipp/__init__.py index 26e2c9b338e0..feda65542109 100644 --- a/tests/components/ipp/__init__.py +++ b/tests/components/ipp/__init__.py @@ -3,8 +3,14 @@ import aiohttp from pyipp import IPPConnectionUpgradeRequired, IPPError from homeassistant.components import zeroconf -from homeassistant.components.ipp.const import CONF_BASE_PATH, CONF_UUID, DOMAIN -from homeassistant.const import CONF_HOST, CONF_PORT, CONF_SSL, CONF_VERIFY_SSL +from homeassistant.components.ipp.const import CONF_BASE_PATH, DOMAIN +from homeassistant.const import ( + CONF_HOST, + CONF_PORT, + CONF_SSL, + CONF_UUID, + CONF_VERIFY_SSL, +) from homeassistant.core import HomeAssistant from tests.common import MockConfigEntry, get_fixture_path diff --git a/tests/components/ipp/test_config_flow.py b/tests/components/ipp/test_config_flow.py index a37fdc9de523..4613c0690caf 100644 --- a/tests/components/ipp/test_config_flow.py +++ b/tests/components/ipp/test_config_flow.py @@ -2,9 +2,9 @@ import dataclasses from unittest.mock import patch -from homeassistant.components.ipp.const import CONF_BASE_PATH, CONF_UUID, DOMAIN +from homeassistant.components.ipp.const import CONF_BASE_PATH, DOMAIN from homeassistant.config_entries import SOURCE_USER, SOURCE_ZEROCONF -from homeassistant.const import CONF_HOST, CONF_NAME, CONF_SSL +from homeassistant.const import CONF_HOST, CONF_NAME, CONF_SSL, CONF_UUID from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import FlowResultType