Deduplicate constants A-D (#105638)

This commit is contained in:
Joost Lekkerkerker 2023-12-13 14:21:44 +01:00 committed by GitHub
parent 02853a62f0
commit ac53b78a0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
61 changed files with 91 additions and 101 deletions

View file

@ -19,6 +19,7 @@ from homeassistant.components import automation
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
from homeassistant.const import ( from homeassistant.const import (
CONF_API_KEY, CONF_API_KEY,
CONF_COUNTRY,
CONF_IP_ADDRESS, CONF_IP_ADDRESS,
CONF_LATITUDE, CONF_LATITUDE,
CONF_LONGITUDE, CONF_LONGITUDE,
@ -44,7 +45,6 @@ from homeassistant.helpers.update_coordinator import (
from .const import ( from .const import (
CONF_CITY, CONF_CITY,
CONF_COUNTRY,
CONF_GEOGRAPHIES, CONF_GEOGRAPHIES,
CONF_INTEGRATION_TYPE, CONF_INTEGRATION_TYPE,
DOMAIN, DOMAIN,

View file

@ -19,6 +19,7 @@ from homeassistant import config_entries
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ( from homeassistant.const import (
CONF_API_KEY, CONF_API_KEY,
CONF_COUNTRY,
CONF_LATITUDE, CONF_LATITUDE,
CONF_LONGITUDE, CONF_LONGITUDE,
CONF_SHOW_ON_MAP, CONF_SHOW_ON_MAP,
@ -35,7 +36,6 @@ from homeassistant.helpers.schema_config_entry_flow import (
from . import async_get_geography_id from . import async_get_geography_id
from .const import ( from .const import (
CONF_CITY, CONF_CITY,
CONF_COUNTRY,
CONF_INTEGRATION_TYPE, CONF_INTEGRATION_TYPE,
DOMAIN, DOMAIN,
INTEGRATION_TYPE_GEOGRAPHY_COORDS, INTEGRATION_TYPE_GEOGRAPHY_COORDS,

View file

@ -9,6 +9,5 @@ INTEGRATION_TYPE_GEOGRAPHY_NAME = "Geographical Location by Name"
INTEGRATION_TYPE_NODE_PRO = "AirVisual Node/Pro" INTEGRATION_TYPE_NODE_PRO = "AirVisual Node/Pro"
CONF_CITY = "city" CONF_CITY = "city"
CONF_COUNTRY = "country"
CONF_GEOGRAPHIES = "geographies" CONF_GEOGRAPHIES = "geographies"
CONF_INTEGRATION_TYPE = "integration_type" CONF_INTEGRATION_TYPE = "integration_type"

View file

@ -7,6 +7,7 @@ from homeassistant.components.diagnostics import async_redact_data
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ( from homeassistant.const import (
CONF_API_KEY, CONF_API_KEY,
CONF_COUNTRY,
CONF_LATITUDE, CONF_LATITUDE,
CONF_LONGITUDE, CONF_LONGITUDE,
CONF_STATE, CONF_STATE,
@ -15,7 +16,7 @@ from homeassistant.const import (
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
from .const import CONF_CITY, CONF_COUNTRY, DOMAIN from .const import CONF_CITY, DOMAIN
CONF_COORDINATES = "coordinates" CONF_COORDINATES = "coordinates"
CONF_TITLE = "title" CONF_TITLE = "title"

View file

@ -15,6 +15,7 @@ from homeassistant.const import (
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
CONCENTRATION_PARTS_PER_BILLION, CONCENTRATION_PARTS_PER_BILLION,
CONCENTRATION_PARTS_PER_MILLION, CONCENTRATION_PARTS_PER_MILLION,
CONF_COUNTRY,
CONF_LATITUDE, CONF_LATITUDE,
CONF_LONGITUDE, CONF_LONGITUDE,
CONF_SHOW_ON_MAP, CONF_SHOW_ON_MAP,
@ -25,7 +26,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
from . import AirVisualEntity from . import AirVisualEntity
from .const import CONF_CITY, CONF_COUNTRY, DOMAIN from .const import CONF_CITY, DOMAIN
ATTR_CITY = "city" ATTR_CITY = "city"
ATTR_COUNTRY = "country" ATTR_COUNTRY = "country"

View file

@ -4,7 +4,6 @@ import logging
from homeassistant.const import Platform from homeassistant.const import Platform
DOMAIN = "amberelectric" DOMAIN = "amberelectric"
CONF_API_TOKEN = "api_token"
CONF_SITE_NAME = "site_name" CONF_SITE_NAME = "site_name"
CONF_SITE_ID = "site_id" CONF_SITE_ID = "site_id"
CONF_SITE_NMI = "site_nmi" CONF_SITE_NMI = "site_nmi"

View file

@ -7,7 +7,6 @@ DEVICE_ID = "Home Assistant"
CONF_MIGRATE = "migrate" CONF_MIGRATE = "migrate"
CONF_CAMERA = "camera" CONF_CAMERA = "camera"
CONF_ALARM_CONTROL_PANEL = "alarm_control_panel" CONF_ALARM_CONTROL_PANEL = "alarm_control_panel"
CONF_DEVICE_ID = "device_id"
DEFAULT_BRAND = "Blink" DEFAULT_BRAND = "Blink"
DEFAULT_ATTRIBUTION = "Data provided by immedia-semi.com" DEFAULT_ATTRIBUTION = "Data provided by immedia-semi.com"
DEFAULT_SCAN_INTERVAL = 300 DEFAULT_SCAN_INTERVAL = 300

View file

@ -12,7 +12,7 @@ import voluptuous as vol
from homeassistant import config_entries from homeassistant import config_entries
from homeassistant.components import ssdp from homeassistant.components import ssdp
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_HOST, CONF_MAC, CONF_NAME, CONF_PIN from homeassistant.const import CONF_CLIENT_ID, CONF_HOST, CONF_MAC, CONF_NAME, CONF_PIN
from homeassistant.data_entry_flow import FlowResult from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers import instance_id from homeassistant.helpers import instance_id
from homeassistant.helpers.aiohttp_client import async_create_clientsession from homeassistant.helpers.aiohttp_client import async_create_clientsession
@ -22,7 +22,6 @@ from .const import (
ATTR_CID, ATTR_CID,
ATTR_MAC, ATTR_MAC,
ATTR_MODEL, ATTR_MODEL,
CONF_CLIENT_ID,
CONF_NICKNAME, CONF_NICKNAME,
CONF_USE_PSK, CONF_USE_PSK,
DOMAIN, DOMAIN,

View file

@ -9,7 +9,6 @@ ATTR_MAC: Final = "macAddr"
ATTR_MANUFACTURER: Final = "Sony" ATTR_MANUFACTURER: Final = "Sony"
ATTR_MODEL: Final = "model" ATTR_MODEL: Final = "model"
CONF_CLIENT_ID: Final = "client_id"
CONF_NICKNAME: Final = "nickname" CONF_NICKNAME: Final = "nickname"
CONF_USE_PSK: Final = "use_psk" CONF_USE_PSK: Final = "use_psk"

View file

@ -19,14 +19,13 @@ from pybravia import (
) )
from homeassistant.components.media_player import MediaType from homeassistant.components.media_player import MediaType
from homeassistant.const import CONF_PIN from homeassistant.const import CONF_CLIENT_ID, CONF_PIN
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryAuthFailed from homeassistant.exceptions import ConfigEntryAuthFailed
from homeassistant.helpers.debounce import Debouncer from homeassistant.helpers.debounce import Debouncer
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
from .const import ( from .const import (
CONF_CLIENT_ID,
CONF_NICKNAME, CONF_NICKNAME,
CONF_USE_PSK, CONF_USE_PSK,
DOMAIN, DOMAIN,

View file

@ -17,6 +17,7 @@ import voluptuous as vol
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
from homeassistant.const import ( from homeassistant.const import (
ATTR_CONNECTIONS, ATTR_CONNECTIONS,
CONF_ENABLED,
CONF_EXCLUDE, CONF_EXCLUDE,
CONF_HOST, CONF_HOST,
CONF_INCLUDE, CONF_INCLUDE,
@ -46,7 +47,6 @@ from .const import (
CONF_AREA, CONF_AREA,
CONF_AUTO_CONFIGURE, CONF_AUTO_CONFIGURE,
CONF_COUNTER, CONF_COUNTER,
CONF_ENABLED,
CONF_KEYPAD, CONF_KEYPAD,
CONF_OUTPUT, CONF_OUTPUT,
CONF_PLC, CONF_PLC,

View file

@ -14,7 +14,6 @@ LOGIN_TIMEOUT = 20
CONF_AUTO_CONFIGURE = "auto_configure" CONF_AUTO_CONFIGURE = "auto_configure"
CONF_AREA = "area" CONF_AREA = "area"
CONF_COUNTER = "counter" CONF_COUNTER = "counter"
CONF_ENABLED = "enabled"
CONF_KEYPAD = "keypad" CONF_KEYPAD = "keypad"
CONF_OUTPUT = "output" CONF_OUTPUT = "output"
CONF_PLC = "plc" CONF_PLC = "plc"

View file

@ -15,6 +15,7 @@ from aiogithubapi.const import OAUTH_USER_LOGIN
import voluptuous as vol import voluptuous as vol
from homeassistant import config_entries from homeassistant import config_entries
from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.core import HomeAssistant, callback from homeassistant.core import HomeAssistant, callback
from homeassistant.data_entry_flow import FlowResult from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers.aiohttp_client import ( from homeassistant.helpers.aiohttp_client import (
@ -23,14 +24,7 @@ from homeassistant.helpers.aiohttp_client import (
) )
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from .const import ( from .const import CLIENT_ID, CONF_REPOSITORIES, DEFAULT_REPOSITORIES, DOMAIN, LOGGER
CLIENT_ID,
CONF_ACCESS_TOKEN,
CONF_REPOSITORIES,
DEFAULT_REPOSITORIES,
DOMAIN,
LOGGER,
)
async def get_repositories(hass: HomeAssistant, access_token: str) -> list[str]: async def get_repositories(hass: HomeAssistant, access_token: str) -> list[str]:

View file

@ -13,7 +13,6 @@ CLIENT_ID = "1440cafcc86e3ea5d6a2"
DEFAULT_REPOSITORIES = ["home-assistant/core", "esphome/esphome"] DEFAULT_REPOSITORIES = ["home-assistant/core", "esphome/esphome"]
FALLBACK_UPDATE_INTERVAL = timedelta(hours=1, minutes=30) FALLBACK_UPDATE_INTERVAL = timedelta(hours=1, minutes=30)
CONF_ACCESS_TOKEN = "access_token"
CONF_REPOSITORIES = "repositories" CONF_REPOSITORIES = "repositories"

View file

@ -6,13 +6,14 @@ from typing import Any
from aiogithubapi import GitHubAPI, GitHubException from aiogithubapi import GitHubAPI, GitHubException
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers.aiohttp_client import ( from homeassistant.helpers.aiohttp_client import (
SERVER_SOFTWARE, SERVER_SOFTWARE,
async_get_clientsession, async_get_clientsession,
) )
from .const import CONF_ACCESS_TOKEN, DOMAIN from .const import DOMAIN
from .coordinator import GitHubDataUpdateCoordinator from .coordinator import GitHubDataUpdateCoordinator

View file

@ -17,7 +17,6 @@ LOGGER = logging.getLogger(__package__)
# Platform config. # Platform config.
CONF_API_ENABLED = "api_enabled" CONF_API_ENABLED = "api_enabled"
CONF_DATA = "data" CONF_DATA = "data"
CONF_DEVICE = "device"
CONF_PATH = "path" CONF_PATH = "path"
CONF_PRODUCT_NAME = "product_name" CONF_PRODUCT_NAME = "product_name"
CONF_PRODUCT_TYPE = "product_type" CONF_PRODUCT_TYPE = "product_type"

View file

@ -13,11 +13,11 @@ from aiohue.errors import AiohueException, BridgeBusy
from homeassistant import core from homeassistant import core
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
from homeassistant.const import CONF_API_KEY, CONF_HOST, Platform from homeassistant.const import CONF_API_KEY, CONF_API_VERSION, CONF_HOST, Platform
from homeassistant.exceptions import ConfigEntryNotReady, HomeAssistantError from homeassistant.exceptions import ConfigEntryNotReady, HomeAssistantError
from homeassistant.helpers import aiohttp_client from homeassistant.helpers import aiohttp_client
from .const import CONF_API_VERSION, DOMAIN from .const import DOMAIN
from .v1.sensor_base import SensorManager from .v1.sensor_base import SensorManager
from .v2.device import async_setup_devices from .v2.device import async_setup_devices
from .v2.hue_event import async_setup_hue_events from .v2.hue_event import async_setup_hue_events

View file

@ -14,7 +14,7 @@ import voluptuous as vol
from homeassistant import config_entries from homeassistant import config_entries
from homeassistant.components import zeroconf from homeassistant.components import zeroconf
from homeassistant.const import CONF_API_KEY, CONF_HOST from homeassistant.const import CONF_API_KEY, CONF_API_VERSION, CONF_HOST
from homeassistant.core import callback from homeassistant.core import callback
from homeassistant.data_entry_flow import FlowResult from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers import ( from homeassistant.helpers import (
@ -26,7 +26,6 @@ from homeassistant.helpers import (
from .const import ( from .const import (
CONF_ALLOW_HUE_GROUPS, CONF_ALLOW_HUE_GROUPS,
CONF_ALLOW_UNREACHABLE, CONF_ALLOW_UNREACHABLE,
CONF_API_VERSION,
CONF_IGNORE_AVAILABILITY, CONF_IGNORE_AVAILABILITY,
DEFAULT_ALLOW_HUE_GROUPS, DEFAULT_ALLOW_HUE_GROUPS,
DEFAULT_ALLOW_UNREACHABLE, DEFAULT_ALLOW_UNREACHABLE,

View file

@ -7,7 +7,6 @@ from aiohue.v2.models.relative_rotary import (
DOMAIN = "hue" DOMAIN = "hue"
CONF_API_VERSION = "api_version"
CONF_IGNORE_AVAILABILITY = "ignore_availability" CONF_IGNORE_AVAILABILITY = "ignore_availability"
CONF_SUBTYPE = "subtype" CONF_SUBTYPE = "subtype"

View file

@ -11,7 +11,7 @@ from homeassistant import core
from homeassistant.components.binary_sensor import BinarySensorDeviceClass from homeassistant.components.binary_sensor import BinarySensorDeviceClass
from homeassistant.components.sensor import SensorDeviceClass from homeassistant.components.sensor import SensorDeviceClass
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_API_KEY, CONF_HOST, CONF_USERNAME from homeassistant.const import CONF_API_KEY, CONF_API_VERSION, CONF_HOST, CONF_USERNAME
from homeassistant.helpers import aiohttp_client from homeassistant.helpers import aiohttp_client
from homeassistant.helpers.device_registry import ( from homeassistant.helpers.device_registry import (
async_entries_for_config_entry as devices_for_config_entries, async_entries_for_config_entry as devices_for_config_entries,
@ -23,7 +23,7 @@ from homeassistant.helpers.entity_registry import (
async_get as async_get_entity_registry, async_get as async_get_entity_registry,
) )
from .const import CONF_API_VERSION, DOMAIN from .const import DOMAIN
LOGGER = logging.getLogger(__name__) LOGGER = logging.getLogger(__name__)

View file

@ -18,6 +18,7 @@ from homeassistant.components.mqtt import (
valid_subscribe_topic, valid_subscribe_topic,
) )
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_DEVICE
from homeassistant.core import callback from homeassistant.core import callback
from homeassistant.data_entry_flow import FlowResult from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers import selector from homeassistant.helpers import selector
@ -25,7 +26,6 @@ import homeassistant.helpers.config_validation as cv
from .const import ( from .const import (
CONF_BAUD_RATE, CONF_BAUD_RATE,
CONF_DEVICE,
CONF_GATEWAY_TYPE, CONF_GATEWAY_TYPE,
CONF_GATEWAY_TYPE_MQTT, CONF_GATEWAY_TYPE_MQTT,
CONF_GATEWAY_TYPE_SERIAL, CONF_GATEWAY_TYPE_SERIAL,

View file

@ -11,7 +11,6 @@ ATTR_GATEWAY_ID: Final = "gateway_id"
ATTR_NODE_ID: Final = "node_id" ATTR_NODE_ID: Final = "node_id"
CONF_BAUD_RATE: Final = "baud_rate" CONF_BAUD_RATE: Final = "baud_rate"
CONF_DEVICE: Final = "device"
CONF_PERSISTENCE_FILE: Final = "persistence_file" CONF_PERSISTENCE_FILE: Final = "persistence_file"
CONF_RETAIN: Final = "retain" CONF_RETAIN: Final = "retain"
CONF_TCP_PORT: Final = "tcp_port" CONF_TCP_PORT: Final = "tcp_port"

View file

@ -8,7 +8,13 @@ from typing import Any
from mysensors import BaseAsyncGateway, Sensor from mysensors import BaseAsyncGateway, Sensor
from mysensors.sensor import ChildSensor from mysensors.sensor import ChildSensor
from homeassistant.const import ATTR_BATTERY_LEVEL, STATE_OFF, STATE_ON, Platform from homeassistant.const import (
ATTR_BATTERY_LEVEL,
CONF_DEVICE,
STATE_OFF,
STATE_ON,
Platform,
)
from homeassistant.core import HomeAssistant, callback from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.debounce import Debouncer from homeassistant.helpers.debounce import Debouncer
from homeassistant.helpers.device_registry import DeviceInfo from homeassistant.helpers.device_registry import DeviceInfo
@ -17,7 +23,6 @@ from homeassistant.helpers.entity import Entity
from .const import ( from .const import (
CHILD_CALLBACK, CHILD_CALLBACK,
CONF_DEVICE,
DOMAIN, DOMAIN,
NODE_CALLBACK, NODE_CALLBACK,
PLATFORM_TYPES, PLATFORM_TYPES,

View file

@ -18,14 +18,13 @@ from homeassistant.components.mqtt import (
ReceivePayloadType, ReceivePayloadType,
) )
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import EVENT_HOMEASSISTANT_STOP from homeassistant.const import CONF_DEVICE, EVENT_HOMEASSISTANT_STOP
from homeassistant.core import Event, HomeAssistant, callback from homeassistant.core import Event, HomeAssistant, callback
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.util.unit_system import METRIC_SYSTEM from homeassistant.util.unit_system import METRIC_SYSTEM
from .const import ( from .const import (
CONF_BAUD_RATE, CONF_BAUD_RATE,
CONF_DEVICE,
CONF_GATEWAY_TYPE, CONF_GATEWAY_TYPE,
CONF_GATEWAY_TYPE_MQTT, CONF_GATEWAY_TYPE_MQTT,
CONF_GATEWAY_TYPE_SERIAL, CONF_GATEWAY_TYPE_SERIAL,

View file

@ -4,12 +4,12 @@ import logging
from pyprosegur.auth import Auth from pyprosegur.auth import Auth
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME, Platform from homeassistant.const import CONF_COUNTRY, CONF_PASSWORD, CONF_USERNAME, Platform
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
from homeassistant.helpers import aiohttp_client from homeassistant.helpers import aiohttp_client
from .const import CONF_COUNTRY, DOMAIN from .const import DOMAIN
PLATFORMS = [Platform.ALARM_CONTROL_PANEL, Platform.CAMERA] PLATFORMS = [Platform.ALARM_CONTROL_PANEL, Platform.CAMERA]

View file

@ -9,11 +9,11 @@ import voluptuous as vol
from homeassistant import config_entries, core, exceptions from homeassistant import config_entries, core, exceptions
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.const import CONF_COUNTRY, CONF_PASSWORD, CONF_USERNAME
from homeassistant.data_entry_flow import FlowResult from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers import aiohttp_client, selector from homeassistant.helpers import aiohttp_client, selector
from .const import CONF_CONTRACT, CONF_COUNTRY, DOMAIN from .const import CONF_CONTRACT, DOMAIN
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)

View file

@ -2,7 +2,6 @@
DOMAIN = "prosegur" DOMAIN = "prosegur"
CONF_COUNTRY = "country"
CONF_CONTRACT = "contract" CONF_CONTRACT = "contract"
SERVICE_REQUEST_IMAGE = "request_image" SERVICE_REQUEST_IMAGE = "request_image"

View file

@ -34,6 +34,7 @@ from samsungtvws.remote import ChannelEmitCommand, SendRemoteKey
from websockets.exceptions import ConnectionClosedError, WebSocketException from websockets.exceptions import ConnectionClosedError, WebSocketException
from homeassistant.const import ( from homeassistant.const import (
CONF_DESCRIPTION,
CONF_HOST, CONF_HOST,
CONF_ID, CONF_ID,
CONF_METHOD, CONF_METHOD,
@ -50,7 +51,6 @@ from homeassistant.helpers.device_registry import format_mac
from homeassistant.util import dt as dt_util from homeassistant.util import dt as dt_util
from .const import ( from .const import (
CONF_DESCRIPTION,
CONF_SESSION_ID, CONF_SESSION_ID,
ENCRYPTED_WEBSOCKET_PORT, ENCRYPTED_WEBSOCKET_PORT,
LEGACY_PORT, LEGACY_PORT,

View file

@ -11,7 +11,6 @@ DEFAULT_MANUFACTURER = "Samsung"
VALUE_CONF_NAME = "HomeAssistant" VALUE_CONF_NAME = "HomeAssistant"
VALUE_CONF_ID = "ha.component.samsung" VALUE_CONF_ID = "ha.component.samsung"
CONF_DESCRIPTION = "description"
CONF_MANUFACTURER = "manufacturer" CONF_MANUFACTURER = "manufacturer"
CONF_SSDP_RENDERING_CONTROL_LOCATION = "ssdp_rendering_control_location" CONF_SSDP_RENDERING_CONTROL_LOCATION = "ssdp_rendering_control_location"
CONF_SSDP_MAIN_TV_AGENT_LOCATION = "ssdp_main_tv_agent_location" CONF_SSDP_MAIN_TV_AGENT_LOCATION = "ssdp_main_tv_agent_location"

View file

@ -6,7 +6,13 @@ import time
from subarulink import Controller as SubaruAPI, InvalidCredentials, SubaruException from subarulink import Controller as SubaruAPI, InvalidCredentials, SubaruException
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_DEVICE_ID, CONF_PASSWORD, CONF_PIN, CONF_USERNAME from homeassistant.const import (
CONF_COUNTRY,
CONF_DEVICE_ID,
CONF_PASSWORD,
CONF_PIN,
CONF_USERNAME,
)
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers import aiohttp_client from homeassistant.helpers import aiohttp_client
@ -14,7 +20,6 @@ from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
from .const import ( from .const import (
CONF_COUNTRY,
CONF_UPDATE_ENABLED, CONF_UPDATE_ENABLED,
COORDINATOR_NAME, COORDINATOR_NAME,
DOMAIN, DOMAIN,

View file

@ -15,12 +15,18 @@ from subarulink.const import COUNTRY_CAN, COUNTRY_USA
import voluptuous as vol import voluptuous as vol
from homeassistant import config_entries from homeassistant import config_entries
from homeassistant.const import CONF_DEVICE_ID, CONF_PASSWORD, CONF_PIN, CONF_USERNAME from homeassistant.const import (
CONF_COUNTRY,
CONF_DEVICE_ID,
CONF_PASSWORD,
CONF_PIN,
CONF_USERNAME,
)
from homeassistant.core import callback from homeassistant.core import callback
from homeassistant.data_entry_flow import FlowResult from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers import aiohttp_client, config_validation as cv from homeassistant.helpers import aiohttp_client, config_validation as cv
from .const import CONF_COUNTRY, CONF_UPDATE_ENABLED, DOMAIN from .const import CONF_UPDATE_ENABLED, DOMAIN
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
CONF_CONTACT_METHOD = "contact_method" CONF_CONTACT_METHOD = "contact_method"

View file

@ -7,7 +7,6 @@ DOMAIN = "subaru"
FETCH_INTERVAL = 300 FETCH_INTERVAL = 300
UPDATE_INTERVAL = 7200 UPDATE_INTERVAL = 7200
CONF_UPDATE_ENABLED = "update_enabled" CONF_UPDATE_ENABLED = "update_enabled"
CONF_COUNTRY = "country"
# entry fields # entry fields
ENTRY_CONTROLLER = "controller" ENTRY_CONTROLLER = "controller"

View file

@ -13,7 +13,6 @@ ATTR_TODAY_ENERGY_KWH: Final = "today_energy_kwh"
ATTR_TOTAL_ENERGY_KWH: Final = "total_energy_kwh" ATTR_TOTAL_ENERGY_KWH: Final = "total_energy_kwh"
CONF_DIMMER: Final = "dimmer" CONF_DIMMER: Final = "dimmer"
CONF_DISCOVERY: Final = "discovery"
CONF_LIGHT: Final = "light" CONF_LIGHT: Final = "light"
CONF_STRIP: Final = "strip" CONF_STRIP: Final = "strip"
CONF_SWITCH: Final = "switch" CONF_SWITCH: Final = "switch"

View file

@ -4,12 +4,12 @@ from __future__ import annotations
from holidays import HolidayBase, country_holidays, list_supported_countries from holidays import HolidayBase, country_holidays, list_supported_countries
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_LANGUAGE from homeassistant.const import CONF_COUNTRY, CONF_LANGUAGE
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryError from homeassistant.exceptions import ConfigEntryError
from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue
from .const import CONF_COUNTRY, CONF_PROVINCE, DOMAIN, PLATFORMS from .const import CONF_PROVINCE, DOMAIN, PLATFORMS
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:

View file

@ -13,7 +13,7 @@ import voluptuous as vol
from homeassistant.components.binary_sensor import BinarySensorEntity from homeassistant.components.binary_sensor import BinarySensorEntity
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_LANGUAGE, CONF_NAME from homeassistant.const import CONF_COUNTRY, CONF_LANGUAGE, CONF_NAME
from homeassistant.core import HomeAssistant, ServiceResponse, SupportsResponse from homeassistant.core import HomeAssistant, ServiceResponse, SupportsResponse
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo
@ -26,7 +26,6 @@ from homeassistant.util import dt as dt_util
from .const import ( from .const import (
ALLOWED_DAYS, ALLOWED_DAYS,
CONF_ADD_HOLIDAYS, CONF_ADD_HOLIDAYS,
CONF_COUNTRY,
CONF_EXCLUDES, CONF_EXCLUDES,
CONF_OFFSET, CONF_OFFSET,
CONF_PROVINCE, CONF_PROVINCE,

View file

@ -11,7 +11,7 @@ from homeassistant.config_entries import (
ConfigFlow, ConfigFlow,
OptionsFlowWithConfigEntry, OptionsFlowWithConfigEntry,
) )
from homeassistant.const import CONF_LANGUAGE, CONF_NAME from homeassistant.const import CONF_COUNTRY, CONF_LANGUAGE, CONF_NAME
from homeassistant.core import callback from homeassistant.core import callback
from homeassistant.data_entry_flow import AbortFlow, FlowResult from homeassistant.data_entry_flow import AbortFlow, FlowResult
from homeassistant.exceptions import HomeAssistantError from homeassistant.exceptions import HomeAssistantError
@ -33,7 +33,6 @@ from homeassistant.util import dt as dt_util
from .const import ( from .const import (
ALLOWED_DAYS, ALLOWED_DAYS,
CONF_ADD_HOLIDAYS, CONF_ADD_HOLIDAYS,
CONF_COUNTRY,
CONF_EXCLUDES, CONF_EXCLUDES,
CONF_OFFSET, CONF_OFFSET,
CONF_PROVINCE, CONF_PROVINCE,

View file

@ -12,7 +12,6 @@ ALLOWED_DAYS = WEEKDAYS + ["holiday"]
DOMAIN = "workday" DOMAIN = "workday"
PLATFORMS = [Platform.BINARY_SENSOR] PLATFORMS = [Platform.BINARY_SENSOR]
CONF_COUNTRY = "country"
CONF_PROVINCE = "province" CONF_PROVINCE = "province"
CONF_WORKDAYS = "workdays" CONF_WORKDAYS = "workdays"
CONF_EXCLUDES = "excludes" CONF_EXCLUDES = "excludes"

View file

@ -35,7 +35,7 @@ from miio import (
from miio.gateway.gateway import GatewayException from miio.gateway.gateway import GatewayException
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_HOST, CONF_MODEL, CONF_TOKEN, Platform from homeassistant.const import CONF_DEVICE, CONF_HOST, CONF_MODEL, CONF_TOKEN, Platform
from homeassistant.core import HomeAssistant, callback from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
from homeassistant.helpers import device_registry as dr, entity_registry as er from homeassistant.helpers import device_registry as dr, entity_registry as er
@ -43,7 +43,6 @@ from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, Upda
from .const import ( from .const import (
ATTR_AVAILABLE, ATTR_AVAILABLE,
CONF_DEVICE,
CONF_FLOW_TYPE, CONF_FLOW_TYPE,
CONF_GATEWAY, CONF_GATEWAY,
DOMAIN, DOMAIN,

View file

@ -6,12 +6,11 @@ from miio import AirQualityMonitor, AirQualityMonitorCGDN1, DeviceException
from homeassistant.components.air_quality import AirQualityEntity from homeassistant.components.air_quality import AirQualityEntity
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_HOST, CONF_MODEL, CONF_TOKEN from homeassistant.const import CONF_DEVICE, CONF_HOST, CONF_MODEL, CONF_TOKEN
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import ( from .const import (
CONF_DEVICE,
CONF_FLOW_TYPE, CONF_FLOW_TYPE,
MODEL_AIRQUALITYMONITOR_B1, MODEL_AIRQUALITYMONITOR_B1,
MODEL_AIRQUALITYMONITOR_CGDN1, MODEL_AIRQUALITYMONITOR_CGDN1,

View file

@ -11,13 +11,12 @@ from homeassistant.components.binary_sensor import (
BinarySensorEntityDescription, BinarySensorEntityDescription,
) )
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_MODEL, EntityCategory from homeassistant.const import CONF_DEVICE, CONF_MODEL, EntityCategory
from homeassistant.core import HomeAssistant, callback from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import VacuumCoordinatorDataAttributes from . import VacuumCoordinatorDataAttributes
from .const import ( from .const import (
CONF_DEVICE,
CONF_FLOW_TYPE, CONF_FLOW_TYPE,
DOMAIN, DOMAIN,
KEY_COORDINATOR, KEY_COORDINATOR,

View file

@ -13,7 +13,7 @@ import voluptuous as vol
from homeassistant import config_entries from homeassistant import config_entries
from homeassistant.components import zeroconf from homeassistant.components import zeroconf
from homeassistant.config_entries import SOURCE_REAUTH, ConfigEntry from homeassistant.config_entries import SOURCE_REAUTH, ConfigEntry
from homeassistant.const import CONF_HOST, CONF_MODEL, CONF_TOKEN from homeassistant.const import CONF_DEVICE, CONF_HOST, CONF_MODEL, CONF_TOKEN
from homeassistant.core import callback from homeassistant.core import callback
from homeassistant.data_entry_flow import FlowResult from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers.device_registry import format_mac from homeassistant.helpers.device_registry import format_mac
@ -23,7 +23,6 @@ from .const import (
CONF_CLOUD_PASSWORD, CONF_CLOUD_PASSWORD,
CONF_CLOUD_SUBDEVICES, CONF_CLOUD_SUBDEVICES,
CONF_CLOUD_USERNAME, CONF_CLOUD_USERNAME,
CONF_DEVICE,
CONF_FLOW_TYPE, CONF_FLOW_TYPE,
CONF_GATEWAY, CONF_GATEWAY,
CONF_MAC, CONF_MAC,

View file

@ -18,7 +18,6 @@ DOMAIN = "xiaomi_miio"
# Config flow # Config flow
CONF_FLOW_TYPE = "config_flow_device" CONF_FLOW_TYPE = "config_flow_device"
CONF_GATEWAY = "gateway" CONF_GATEWAY = "gateway"
CONF_DEVICE = "device"
CONF_MAC = "mac" CONF_MAC = "mac"
CONF_CLOUD_USERNAME = "cloud_username" CONF_CLOUD_USERNAME = "cloud_username"
CONF_CLOUD_PASSWORD = "cloud_password" CONF_CLOUD_PASSWORD = "cloud_password"

View file

@ -30,7 +30,7 @@ import voluptuous as vol
from homeassistant.components.fan import FanEntity, FanEntityFeature from homeassistant.components.fan import FanEntity, FanEntityFeature
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_ENTITY_ID, CONF_MODEL from homeassistant.const import ATTR_ENTITY_ID, CONF_DEVICE, CONF_MODEL
from homeassistant.core import HomeAssistant, ServiceCall, callback from homeassistant.core import HomeAssistant, ServiceCall, callback
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
@ -40,7 +40,6 @@ from homeassistant.util.percentage import (
) )
from .const import ( from .const import (
CONF_DEVICE,
CONF_FLOW_TYPE, CONF_FLOW_TYPE,
DOMAIN, DOMAIN,
FEATURE_FLAGS_AIRFRESH, FEATURE_FLAGS_AIRFRESH,

View file

@ -20,13 +20,12 @@ from homeassistant.components.humidifier import (
HumidifierEntityFeature, HumidifierEntityFeature,
) )
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_MODE, CONF_MODEL from homeassistant.const import ATTR_MODE, CONF_DEVICE, CONF_MODEL
from homeassistant.core import HomeAssistant, callback from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.util.percentage import percentage_to_ranged_value from homeassistant.util.percentage import percentage_to_ranged_value
from .const import ( from .const import (
CONF_DEVICE,
CONF_FLOW_TYPE, CONF_FLOW_TYPE,
DOMAIN, DOMAIN,
KEY_COORDINATOR, KEY_COORDINATOR,

View file

@ -33,7 +33,13 @@ from homeassistant.components.light import (
LightEntity, LightEntity,
) )
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_ENTITY_ID, CONF_HOST, CONF_MODEL, CONF_TOKEN from homeassistant.const import (
ATTR_ENTITY_ID,
CONF_DEVICE,
CONF_HOST,
CONF_MODEL,
CONF_TOKEN,
)
from homeassistant.core import HomeAssistant, ServiceCall from homeassistant.core import HomeAssistant, ServiceCall
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.device_registry import DeviceInfo from homeassistant.helpers.device_registry import DeviceInfo
@ -41,7 +47,6 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.util import color, dt as dt_util from homeassistant.util import color, dt as dt_util
from .const import ( from .const import (
CONF_DEVICE,
CONF_FLOW_TYPE, CONF_FLOW_TYPE,
CONF_GATEWAY, CONF_GATEWAY,
DOMAIN, DOMAIN,

View file

@ -13,6 +13,7 @@ from homeassistant.components.number import (
) )
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ( from homeassistant.const import (
CONF_DEVICE,
CONF_MODEL, CONF_MODEL,
DEGREE, DEGREE,
REVOLUTIONS_PER_MINUTE, REVOLUTIONS_PER_MINUTE,
@ -25,7 +26,6 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
from .const import ( from .const import (
CONF_DEVICE,
CONF_FLOW_TYPE, CONF_FLOW_TYPE,
DOMAIN, DOMAIN,
FEATURE_FLAGS_AIRFRESH, FEATURE_FLAGS_AIRFRESH,

View file

@ -29,12 +29,11 @@ from miio.integrations.humidifier.zhimi.airhumidifier_miot import (
from homeassistant.components.select import SelectEntity, SelectEntityDescription from homeassistant.components.select import SelectEntity, SelectEntityDescription
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_MODEL, EntityCategory from homeassistant.const import CONF_DEVICE, CONF_MODEL, EntityCategory
from homeassistant.core import HomeAssistant, callback from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import ( from .const import (
CONF_DEVICE,
CONF_FLOW_TYPE, CONF_FLOW_TYPE,
DOMAIN, DOMAIN,
KEY_COORDINATOR, KEY_COORDINATOR,

View file

@ -28,6 +28,7 @@ from homeassistant.const import (
ATTR_TEMPERATURE, ATTR_TEMPERATURE,
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
CONCENTRATION_PARTS_PER_MILLION, CONCENTRATION_PARTS_PER_MILLION,
CONF_DEVICE,
CONF_HOST, CONF_HOST,
CONF_MODEL, CONF_MODEL,
CONF_TOKEN, CONF_TOKEN,
@ -48,7 +49,6 @@ from homeassistant.util import dt as dt_util
from . import VacuumCoordinatorDataAttributes from . import VacuumCoordinatorDataAttributes
from .const import ( from .const import (
CONF_DEVICE,
CONF_FLOW_TYPE, CONF_FLOW_TYPE,
CONF_GATEWAY, CONF_GATEWAY,
DOMAIN, DOMAIN,

View file

@ -21,6 +21,7 @@ from homeassistant.const import (
ATTR_ENTITY_ID, ATTR_ENTITY_ID,
ATTR_MODE, ATTR_MODE,
ATTR_TEMPERATURE, ATTR_TEMPERATURE,
CONF_DEVICE,
CONF_HOST, CONF_HOST,
CONF_MODEL, CONF_MODEL,
CONF_TOKEN, CONF_TOKEN,
@ -31,7 +32,6 @@ import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import ( from .const import (
CONF_DEVICE,
CONF_FLOW_TYPE, CONF_FLOW_TYPE,
CONF_GATEWAY, CONF_GATEWAY,
DOMAIN, DOMAIN,

View file

@ -19,6 +19,7 @@ from homeassistant.components.vacuum import (
VacuumEntityFeature, VacuumEntityFeature,
) )
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_DEVICE
from homeassistant.core import HomeAssistant, callback from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import config_validation as cv, entity_platform from homeassistant.helpers import config_validation as cv, entity_platform
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
@ -27,7 +28,6 @@ from homeassistant.util.dt import as_utc
from . import VacuumCoordinatorData from . import VacuumCoordinatorData
from .const import ( from .const import (
CONF_DEVICE,
CONF_FLOW_TYPE, CONF_FLOW_TYPE,
DOMAIN, DOMAIN,
KEY_COORDINATOR, KEY_COORDINATOR,

View file

@ -12,14 +12,13 @@ import pytest
from homeassistant import data_entry_flow from homeassistant import data_entry_flow
from homeassistant.components import ssdp from homeassistant.components import ssdp
from homeassistant.components.braviatv.const import ( from homeassistant.components.braviatv.const import (
CONF_CLIENT_ID,
CONF_NICKNAME, CONF_NICKNAME,
CONF_USE_PSK, CONF_USE_PSK,
DOMAIN, DOMAIN,
NICKNAME_PREFIX, NICKNAME_PREFIX,
) )
from homeassistant.config_entries import SOURCE_REAUTH, SOURCE_SSDP, SOURCE_USER from homeassistant.config_entries import SOURCE_REAUTH, SOURCE_SSDP, SOURCE_USER
from homeassistant.const import CONF_HOST, CONF_MAC, CONF_PIN from homeassistant.const import CONF_CLIENT_ID, CONF_HOST, CONF_MAC, CONF_PIN
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers import instance_id from homeassistant.helpers import instance_id

View file

@ -4,11 +4,8 @@ from unittest.mock import patch
import pytest import pytest
from homeassistant.components.github.const import ( from homeassistant.components.github.const import CONF_REPOSITORIES, DOMAIN
CONF_ACCESS_TOKEN, from homeassistant.const import CONF_ACCESS_TOKEN
CONF_REPOSITORIES,
DOMAIN,
)
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from .common import MOCK_ACCESS_TOKEN, TEST_REPOSITORY, setup_github_integration from .common import MOCK_ACCESS_TOKEN, TEST_REPOSITORY, setup_github_integration

View file

@ -6,11 +6,11 @@ from aiogithubapi import GitHubException
from homeassistant import config_entries from homeassistant import config_entries
from homeassistant.components.github.config_flow import get_repositories from homeassistant.components.github.config_flow import get_repositories
from homeassistant.components.github.const import ( from homeassistant.components.github.const import (
CONF_ACCESS_TOKEN,
CONF_REPOSITORIES, CONF_REPOSITORIES,
DEFAULT_REPOSITORIES, DEFAULT_REPOSITORIES,
DOMAIN, DOMAIN,
) )
from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResultType from homeassistant.data_entry_flow import FlowResultType

View file

@ -16,12 +16,12 @@ from homeassistant.components.mqtt import DOMAIN as MQTT_DOMAIN
from homeassistant.components.mysensors.config_flow import DEFAULT_BAUD_RATE from homeassistant.components.mysensors.config_flow import DEFAULT_BAUD_RATE
from homeassistant.components.mysensors.const import ( from homeassistant.components.mysensors.const import (
CONF_BAUD_RATE, CONF_BAUD_RATE,
CONF_DEVICE,
CONF_GATEWAY_TYPE, CONF_GATEWAY_TYPE,
CONF_GATEWAY_TYPE_SERIAL, CONF_GATEWAY_TYPE_SERIAL,
CONF_VERSION, CONF_VERSION,
DOMAIN, DOMAIN,
) )
from homeassistant.const import CONF_DEVICE
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.setup import async_setup_component from homeassistant.setup import async_setup_component

View file

@ -9,7 +9,6 @@ import pytest
from homeassistant import config_entries from homeassistant import config_entries
from homeassistant.components.mysensors.const import ( from homeassistant.components.mysensors.const import (
CONF_BAUD_RATE, CONF_BAUD_RATE,
CONF_DEVICE,
CONF_GATEWAY_TYPE, CONF_GATEWAY_TYPE,
CONF_GATEWAY_TYPE_MQTT, CONF_GATEWAY_TYPE_MQTT,
CONF_GATEWAY_TYPE_SERIAL, CONF_GATEWAY_TYPE_SERIAL,
@ -23,6 +22,7 @@ from homeassistant.components.mysensors.const import (
DOMAIN, DOMAIN,
ConfGatewayType, ConfGatewayType,
) )
from homeassistant.const import CONF_DEVICE
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResult, FlowResultType from homeassistant.data_entry_flow import FlowResult, FlowResultType

View file

@ -8,7 +8,6 @@ from subarulink.const import COUNTRY_USA
from homeassistant import config_entries from homeassistant import config_entries
from homeassistant.components.homeassistant import DOMAIN as HA_DOMAIN from homeassistant.components.homeassistant import DOMAIN as HA_DOMAIN
from homeassistant.components.subaru.const import ( from homeassistant.components.subaru.const import (
CONF_COUNTRY,
CONF_UPDATE_ENABLED, CONF_UPDATE_ENABLED,
DOMAIN, DOMAIN,
FETCH_INTERVAL, FETCH_INTERVAL,
@ -22,7 +21,13 @@ from homeassistant.components.subaru.const import (
VEHICLE_NAME, VEHICLE_NAME,
) )
from homeassistant.config_entries import ConfigEntryState from homeassistant.config_entries import ConfigEntryState
from homeassistant.const import CONF_DEVICE_ID, CONF_PASSWORD, CONF_PIN, CONF_USERNAME from homeassistant.const import (
CONF_COUNTRY,
CONF_DEVICE_ID,
CONF_PASSWORD,
CONF_PIN,
CONF_USERNAME,
)
from homeassistant.setup import async_setup_component from homeassistant.setup import async_setup_component
import homeassistant.util.dt as dt_util import homeassistant.util.dt as dt_util

View file

@ -9,7 +9,6 @@ import pytest
from homeassistant import config_entries from homeassistant import config_entries
from homeassistant.components.workday.const import ( from homeassistant.components.workday.const import (
CONF_ADD_HOLIDAYS, CONF_ADD_HOLIDAYS,
CONF_COUNTRY,
CONF_EXCLUDES, CONF_EXCLUDES,
CONF_OFFSET, CONF_OFFSET,
CONF_REMOVE_HOLIDAYS, CONF_REMOVE_HOLIDAYS,
@ -19,7 +18,7 @@ from homeassistant.components.workday.const import (
DEFAULT_WORKDAYS, DEFAULT_WORKDAYS,
DOMAIN, DOMAIN,
) )
from homeassistant.const import CONF_LANGUAGE, CONF_NAME from homeassistant.const import CONF_COUNTRY, CONF_LANGUAGE, CONF_NAME
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResultType from homeassistant.data_entry_flow import FlowResultType
from homeassistant.util.dt import UTC from homeassistant.util.dt import UTC

View file

@ -5,7 +5,6 @@ import pytest
from homeassistant.components.button import DOMAIN, SERVICE_PRESS from homeassistant.components.button import DOMAIN, SERVICE_PRESS
from homeassistant.components.xiaomi_miio.const import ( from homeassistant.components.xiaomi_miio.const import (
CONF_DEVICE,
CONF_FLOW_TYPE, CONF_FLOW_TYPE,
CONF_MAC, CONF_MAC,
DOMAIN as XIAOMI_DOMAIN, DOMAIN as XIAOMI_DOMAIN,
@ -13,6 +12,7 @@ from homeassistant.components.xiaomi_miio.const import (
) )
from homeassistant.const import ( from homeassistant.const import (
ATTR_ENTITY_ID, ATTR_ENTITY_ID,
CONF_DEVICE,
CONF_HOST, CONF_HOST,
CONF_MODEL, CONF_MODEL,
CONF_TOKEN, CONF_TOKEN,

View file

@ -10,7 +10,7 @@ import pytest
from homeassistant import config_entries, data_entry_flow from homeassistant import config_entries, data_entry_flow
from homeassistant.components import zeroconf from homeassistant.components import zeroconf
from homeassistant.components.xiaomi_miio import const from homeassistant.components.xiaomi_miio import const
from homeassistant.const import CONF_HOST, CONF_MODEL, CONF_TOKEN from homeassistant.const import CONF_DEVICE, CONF_HOST, CONF_MODEL, CONF_TOKEN
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from . import TEST_MAC from . import TEST_MAC
@ -685,7 +685,7 @@ async def test_config_flow_step_device_manual_model_succes(hass: HomeAssistant)
assert result["type"] == "create_entry" assert result["type"] == "create_entry"
assert result["title"] == overwrite_model assert result["title"] == overwrite_model
assert result["data"] == { assert result["data"] == {
const.CONF_FLOW_TYPE: const.CONF_DEVICE, const.CONF_FLOW_TYPE: CONF_DEVICE,
const.CONF_CLOUD_USERNAME: None, const.CONF_CLOUD_USERNAME: None,
const.CONF_CLOUD_PASSWORD: None, const.CONF_CLOUD_PASSWORD: None,
const.CONF_CLOUD_COUNTRY: None, const.CONF_CLOUD_COUNTRY: None,
@ -729,7 +729,7 @@ async def config_flow_device_success(hass, model_to_test):
assert result["type"] == "create_entry" assert result["type"] == "create_entry"
assert result["title"] == model_to_test assert result["title"] == model_to_test
assert result["data"] == { assert result["data"] == {
const.CONF_FLOW_TYPE: const.CONF_DEVICE, const.CONF_FLOW_TYPE: CONF_DEVICE,
const.CONF_CLOUD_USERNAME: None, const.CONF_CLOUD_USERNAME: None,
const.CONF_CLOUD_PASSWORD: None, const.CONF_CLOUD_PASSWORD: None,
const.CONF_CLOUD_COUNTRY: None, const.CONF_CLOUD_COUNTRY: None,
@ -775,7 +775,7 @@ async def config_flow_generic_roborock(hass):
assert result["type"] == "create_entry" assert result["type"] == "create_entry"
assert result["title"] == dummy_model assert result["title"] == dummy_model
assert result["data"] == { assert result["data"] == {
const.CONF_FLOW_TYPE: const.CONF_DEVICE, const.CONF_FLOW_TYPE: CONF_DEVICE,
const.CONF_CLOUD_USERNAME: None, const.CONF_CLOUD_USERNAME: None,
const.CONF_CLOUD_PASSWORD: None, const.CONF_CLOUD_PASSWORD: None,
const.CONF_CLOUD_COUNTRY: None, const.CONF_CLOUD_COUNTRY: None,
@ -829,7 +829,7 @@ async def zeroconf_device_success(hass, zeroconf_name_to_test, model_to_test):
assert result["type"] == "create_entry" assert result["type"] == "create_entry"
assert result["title"] == model_to_test assert result["title"] == model_to_test
assert result["data"] == { assert result["data"] == {
const.CONF_FLOW_TYPE: const.CONF_DEVICE, const.CONF_FLOW_TYPE: CONF_DEVICE,
const.CONF_CLOUD_USERNAME: None, const.CONF_CLOUD_USERNAME: None,
const.CONF_CLOUD_PASSWORD: None, const.CONF_CLOUD_PASSWORD: None,
const.CONF_CLOUD_COUNTRY: None, const.CONF_CLOUD_COUNTRY: None,

View file

@ -17,7 +17,6 @@ from homeassistant.components.select import (
) )
from homeassistant.components.xiaomi_miio import UPDATE_INTERVAL from homeassistant.components.xiaomi_miio import UPDATE_INTERVAL
from homeassistant.components.xiaomi_miio.const import ( from homeassistant.components.xiaomi_miio.const import (
CONF_DEVICE,
CONF_FLOW_TYPE, CONF_FLOW_TYPE,
CONF_MAC, CONF_MAC,
DOMAIN as XIAOMI_DOMAIN, DOMAIN as XIAOMI_DOMAIN,
@ -25,6 +24,7 @@ from homeassistant.components.xiaomi_miio.const import (
) )
from homeassistant.const import ( from homeassistant.const import (
ATTR_ENTITY_ID, ATTR_ENTITY_ID,
CONF_DEVICE,
CONF_HOST, CONF_HOST,
CONF_MODEL, CONF_MODEL,
CONF_TOKEN, CONF_TOKEN,

View file

@ -23,7 +23,6 @@ from homeassistant.components.vacuum import (
STATE_ERROR, STATE_ERROR,
) )
from homeassistant.components.xiaomi_miio.const import ( from homeassistant.components.xiaomi_miio.const import (
CONF_DEVICE,
CONF_FLOW_TYPE, CONF_FLOW_TYPE,
CONF_MAC, CONF_MAC,
DOMAIN as XIAOMI_DOMAIN, DOMAIN as XIAOMI_DOMAIN,
@ -32,6 +31,7 @@ from homeassistant.components.xiaomi_miio.const import (
from homeassistant.components.xiaomi_miio.vacuum import ( from homeassistant.components.xiaomi_miio.vacuum import (
ATTR_ERROR, ATTR_ERROR,
ATTR_TIMERS, ATTR_TIMERS,
CONF_DEVICE,
SERVICE_CLEAN_SEGMENT, SERVICE_CLEAN_SEGMENT,
SERVICE_CLEAN_ZONE, SERVICE_CLEAN_ZONE,
SERVICE_GOTO, SERVICE_GOTO,