From a29990a784278a2e2ff1e58a5794ea2fd534e01d Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Tue, 29 Mar 2022 11:11:58 +0200 Subject: [PATCH] Use new CONF_MODEL core constant (1/3) (#68829) * Use CONF_MODEL in axis * Use CONF_MODEL in denonavr * Use CONF_MODEL in flux_led * Use CONF_MODEL in konnected * Use CONF_MODEL in steamist * Use CONF_MODEL in tellstick * Use CONF_MODEL in tensorflow * Use CONF_MODEL in twinkly * Use CONF_MODEL in yeelight Co-authored-by: epenet --- homeassistant/components/axis/config_flow.py | 2 +- homeassistant/components/axis/const.py | 1 - homeassistant/components/axis/device.py | 2 +- homeassistant/components/denonavr/config_flow.py | 3 +-- homeassistant/components/denonavr/media_player.py | 9 +++++++-- homeassistant/components/flux_led/const.py | 1 - homeassistant/components/flux_led/discovery.py | 3 +-- homeassistant/components/flux_led/entity.py | 3 ++- homeassistant/components/konnected/config_flow.py | 2 +- homeassistant/components/konnected/const.py | 1 - homeassistant/components/steamist/config_flow.py | 4 ++-- homeassistant/components/steamist/const.py | 2 -- homeassistant/components/steamist/discovery.py | 4 ++-- homeassistant/components/steamist/entity.py | 3 +-- homeassistant/components/tellstick/sensor.py | 2 +- homeassistant/components/tensorflow/image_processing.py | 2 +- homeassistant/components/twinkly/config_flow.py | 4 ++-- homeassistant/components/twinkly/const.py | 1 - homeassistant/components/twinkly/light.py | 2 +- homeassistant/components/yeelight/__init__.py | 2 +- homeassistant/components/yeelight/config_flow.py | 3 +-- homeassistant/components/yeelight/const.py | 1 - tests/components/axis/test_config_flow.py | 2 +- tests/components/axis/test_device.py | 7 ++----- tests/components/axis/test_init.py | 3 ++- tests/components/denonavr/test_config_flow.py | 3 +-- tests/components/denonavr/test_media_player.py | 3 +-- tests/components/flux_led/test_config_flow.py | 3 +-- tests/components/steamist/__init__.py | 4 ++-- tests/components/twinkly/test_config_flow.py | 2 +- tests/components/twinkly/test_init.py | 2 +- tests/components/twinkly/test_light.py | 2 +- tests/components/yeelight/test_config_flow.py | 3 +-- 33 files changed, 40 insertions(+), 51 deletions(-) diff --git a/homeassistant/components/axis/config_flow.py b/homeassistant/components/axis/config_flow.py index 5ec68073610d..23b1ba4c7535 100644 --- a/homeassistant/components/axis/config_flow.py +++ b/homeassistant/components/axis/config_flow.py @@ -11,6 +11,7 @@ from homeassistant.config_entries import SOURCE_IGNORE from homeassistant.const import ( CONF_HOST, CONF_MAC, + CONF_MODEL, CONF_NAME, CONF_PASSWORD, CONF_PORT, @@ -22,7 +23,6 @@ from homeassistant.helpers.device_registry import format_mac from homeassistant.util.network import is_link_local from .const import ( - CONF_MODEL, CONF_STREAM_PROFILE, CONF_VIDEO_SOURCE, DEFAULT_STREAM_PROFILE, diff --git a/homeassistant/components/axis/const.py b/homeassistant/components/axis/const.py index c9267568707d..a13cae0dd0ac 100644 --- a/homeassistant/components/axis/const.py +++ b/homeassistant/components/axis/const.py @@ -10,7 +10,6 @@ DOMAIN = "axis" ATTR_MANUFACTURER = "Axis Communications AB" CONF_EVENTS = "events" -CONF_MODEL = "model" CONF_STREAM_PROFILE = "stream_profile" CONF_VIDEO_SOURCE = "video_source" diff --git a/homeassistant/components/axis/device.py b/homeassistant/components/axis/device.py index 3a1017534451..2338a90d5626 100644 --- a/homeassistant/components/axis/device.py +++ b/homeassistant/components/axis/device.py @@ -16,6 +16,7 @@ from homeassistant.components.mqtt.models import ReceiveMessage from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( CONF_HOST, + CONF_MODEL, CONF_NAME, CONF_PASSWORD, CONF_PORT, @@ -33,7 +34,6 @@ from homeassistant.setup import async_when_setup from .const import ( ATTR_MANUFACTURER, CONF_EVENTS, - CONF_MODEL, CONF_STREAM_PROFILE, CONF_VIDEO_SOURCE, DEFAULT_EVENTS, diff --git a/homeassistant/components/denonavr/config_flow.py b/homeassistant/components/denonavr/config_flow.py index 2d5cef14f5b5..238c87bbf5e8 100644 --- a/homeassistant/components/denonavr/config_flow.py +++ b/homeassistant/components/denonavr/config_flow.py @@ -11,7 +11,7 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.components import ssdp -from homeassistant.const import CONF_HOST, CONF_TYPE +from homeassistant.const import CONF_HOST, CONF_MODEL, CONF_TYPE from homeassistant.core import callback from homeassistant.data_entry_flow import FlowResult from homeassistant.helpers.httpx_client import get_async_client @@ -28,7 +28,6 @@ IGNORED_MODELS = ["HEOS 1", "HEOS 3", "HEOS 5", "HEOS 7"] CONF_SHOW_ALL_SOURCES = "show_all_sources" CONF_ZONE2 = "zone2" CONF_ZONE3 = "zone3" -CONF_MODEL = "model" CONF_MANUFACTURER = "manufacturer" CONF_SERIAL_NUMBER = "serial_number" CONF_UPDATE_AUDYSSEY = "update_audyssey" diff --git a/homeassistant/components/denonavr/media_player.py b/homeassistant/components/denonavr/media_player.py index fe9b81c65d33..fb8c6fa3015c 100644 --- a/homeassistant/components/denonavr/media_player.py +++ b/homeassistant/components/denonavr/media_player.py @@ -35,7 +35,13 @@ from homeassistant.components.media_player.const import ( SUPPORT_VOLUME_STEP, ) from homeassistant.config_entries import ConfigEntry -from homeassistant.const import ATTR_COMMAND, CONF_HOST, STATE_PAUSED, STATE_PLAYING +from homeassistant.const import ( + ATTR_COMMAND, + CONF_HOST, + CONF_MODEL, + STATE_PAUSED, + STATE_PLAYING, +) from homeassistant.core import HomeAssistant from homeassistant.helpers import config_validation as cv, entity_platform from homeassistant.helpers.entity import DeviceInfo @@ -44,7 +50,6 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback from . import CONF_RECEIVER from .config_flow import ( CONF_MANUFACTURER, - CONF_MODEL, CONF_SERIAL_NUMBER, CONF_TYPE, CONF_UPDATE_AUDYSSEY, diff --git a/homeassistant/components/flux_led/const.py b/homeassistant/components/flux_led/const.py index 9113d52f5c82..9124be5bb9e0 100644 --- a/homeassistant/components/flux_led/const.py +++ b/homeassistant/components/flux_led/const.py @@ -53,7 +53,6 @@ STARTUP_SCAN_TIMEOUT: Final = 5 DISCOVER_SCAN_TIMEOUT: Final = 10 DIRECTED_DISCOVERY_TIMEOUT: Final = 15 -CONF_MODEL: Final = "model" CONF_MODEL_NUM: Final = "model_num" CONF_MODEL_INFO: Final = "model_info" CONF_MODEL_DESCRIPTION: Final = "model_description" diff --git a/homeassistant/components/flux_led/discovery.py b/homeassistant/components/flux_led/discovery.py index 70ab8cb3fa5b..67dbbc74e2eb 100644 --- a/homeassistant/components/flux_led/discovery.py +++ b/homeassistant/components/flux_led/discovery.py @@ -25,14 +25,13 @@ from flux_led.scanner import FluxLEDDiscovery from homeassistant import config_entries from homeassistant.components import network from homeassistant.config_entries import ConfigEntry, ConfigEntryState -from homeassistant.const import CONF_HOST, CONF_NAME +from homeassistant.const import CONF_HOST, CONF_MODEL, CONF_NAME from homeassistant.core import HomeAssistant, callback from homeassistant.helpers import device_registry as dr from homeassistant.util.network import is_ip_address from .const import ( CONF_MINOR_VERSION, - CONF_MODEL, CONF_MODEL_DESCRIPTION, CONF_MODEL_INFO, CONF_MODEL_NUM, diff --git a/homeassistant/components/flux_led/entity.py b/homeassistant/components/flux_led/entity.py index 6a77dba948c7..ef9038b1435b 100644 --- a/homeassistant/components/flux_led/entity.py +++ b/homeassistant/components/flux_led/entity.py @@ -15,6 +15,7 @@ from homeassistant.const import ( ATTR_MODEL, ATTR_NAME, ATTR_SW_VERSION, + CONF_MODEL, CONF_NAME, ) from homeassistant.core import callback @@ -23,7 +24,7 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.entity import DeviceInfo, Entity from homeassistant.helpers.update_coordinator import CoordinatorEntity -from .const import CONF_MINOR_VERSION, CONF_MODEL, DOMAIN, SIGNAL_STATE_UPDATED +from .const import CONF_MINOR_VERSION, DOMAIN, SIGNAL_STATE_UPDATED from .coordinator import FluxLedUpdateCoordinator diff --git a/homeassistant/components/konnected/config_flow.py b/homeassistant/components/konnected/config_flow.py index 467f3518831c..b6f80035dbec 100644 --- a/homeassistant/components/konnected/config_flow.py +++ b/homeassistant/components/konnected/config_flow.py @@ -20,6 +20,7 @@ from homeassistant.const import ( CONF_DISCOVERY, CONF_HOST, CONF_ID, + CONF_MODEL, CONF_NAME, CONF_PORT, CONF_REPEAT, @@ -38,7 +39,6 @@ from .const import ( CONF_BLINK, CONF_DEFAULT_OPTIONS, CONF_INVERSE, - CONF_MODEL, CONF_MOMENTARY, CONF_PAUSE, CONF_POLL_INTERVAL, diff --git a/homeassistant/components/konnected/const.py b/homeassistant/components/konnected/const.py index 270b26045383..c4dd67e7d39f 100644 --- a/homeassistant/components/konnected/const.py +++ b/homeassistant/components/konnected/const.py @@ -13,7 +13,6 @@ CONF_INVERSE = "inverse" CONF_BLINK = "blink" CONF_DHT_SENSORS = "dht_sensors" CONF_DS18B20_SENSORS = "ds18b20_sensors" -CONF_MODEL = "model" STATE_LOW = "low" STATE_HIGH = "high" diff --git a/homeassistant/components/steamist/config_flow.py b/homeassistant/components/steamist/config_flow.py index c0ec18157b6e..f182189a9c7b 100644 --- a/homeassistant/components/steamist/config_flow.py +++ b/homeassistant/components/steamist/config_flow.py @@ -10,14 +10,14 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.components import dhcp -from homeassistant.const import CONF_DEVICE, CONF_HOST, CONF_NAME +from homeassistant.const import CONF_DEVICE, CONF_HOST, CONF_MODEL, CONF_NAME from homeassistant.core import callback from homeassistant.data_entry_flow import FlowResult from homeassistant.helpers import device_registry as dr from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.typing import DiscoveryInfoType -from .const import CONF_MODEL, CONNECTION_EXCEPTIONS, DISCOVER_SCAN_TIMEOUT, DOMAIN +from .const import CONNECTION_EXCEPTIONS, DISCOVER_SCAN_TIMEOUT, DOMAIN from .discovery import ( async_discover_device, async_discover_devices, diff --git a/homeassistant/components/steamist/const.py b/homeassistant/components/steamist/const.py index 2375bdaf92f8..cacd79b77ac9 100644 --- a/homeassistant/components/steamist/const.py +++ b/homeassistant/components/steamist/const.py @@ -8,8 +8,6 @@ DOMAIN = "steamist" CONNECTION_EXCEPTIONS = (asyncio.TimeoutError, aiohttp.ClientError) -CONF_MODEL = "model" - STARTUP_SCAN_TIMEOUT = 5 DISCOVER_SCAN_TIMEOUT = 10 diff --git a/homeassistant/components/steamist/discovery.py b/homeassistant/components/steamist/discovery.py index 773e56d6612f..7600503658fa 100644 --- a/homeassistant/components/steamist/discovery.py +++ b/homeassistant/components/steamist/discovery.py @@ -9,12 +9,12 @@ from discovery30303 import AIODiscovery30303, Device30303 from homeassistant import config_entries from homeassistant.components import network -from homeassistant.const import CONF_NAME +from homeassistant.const import CONF_MODEL, CONF_NAME from homeassistant.core import HomeAssistant, callback from homeassistant.helpers import device_registry as dr from homeassistant.util.network import is_ip_address -from .const import CONF_MODEL, DISCOVER_SCAN_TIMEOUT, DISCOVERY, DOMAIN +from .const import DISCOVER_SCAN_TIMEOUT, DISCOVERY, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/steamist/entity.py b/homeassistant/components/steamist/entity.py index ab104a3074d8..4692b48d314e 100644 --- a/homeassistant/components/steamist/entity.py +++ b/homeassistant/components/steamist/entity.py @@ -4,12 +4,11 @@ from __future__ import annotations from aiosteamist import SteamistStatus from homeassistant.config_entries import ConfigEntry -from homeassistant.const import CONF_HOST, CONF_NAME +from homeassistant.const import CONF_HOST, CONF_MODEL, CONF_NAME from homeassistant.helpers import device_registry as dr from homeassistant.helpers.entity import DeviceInfo, Entity, EntityDescription from homeassistant.helpers.update_coordinator import CoordinatorEntity -from .const import CONF_MODEL from .coordinator import SteamistDataUpdateCoordinator diff --git a/homeassistant/components/tellstick/sensor.py b/homeassistant/components/tellstick/sensor.py index f3b322c5d950..e820c46da456 100644 --- a/homeassistant/components/tellstick/sensor.py +++ b/homeassistant/components/tellstick/sensor.py @@ -15,6 +15,7 @@ from homeassistant.components.sensor import ( ) from homeassistant.const import ( CONF_ID, + CONF_MODEL, CONF_NAME, CONF_PROTOCOL, PERCENTAGE, @@ -34,7 +35,6 @@ DatatypeDescription = namedtuple( CONF_DATATYPE_MASK = "datatype_mask" CONF_ONLY_NAMED = "only_named" CONF_TEMPERATURE_SCALE = "temperature_scale" -CONF_MODEL = "model" DEFAULT_DATATYPE_MASK = 127 DEFAULT_TEMPERATURE_SCALE = TEMP_CELSIUS diff --git a/homeassistant/components/tensorflow/image_processing.py b/homeassistant/components/tensorflow/image_processing.py index d90558e8b2ef..60e9dc54b80a 100644 --- a/homeassistant/components/tensorflow/image_processing.py +++ b/homeassistant/components/tensorflow/image_processing.py @@ -19,6 +19,7 @@ from homeassistant.components.image_processing import ( ) from homeassistant.const import ( CONF_ENTITY_ID, + CONF_MODEL, CONF_NAME, CONF_SOURCE, EVENT_HOMEASSISTANT_START, @@ -49,7 +50,6 @@ CONF_GRAPH = "graph" CONF_LABELS = "labels" CONF_LABEL_OFFSET = "label_offset" CONF_LEFT = "left" -CONF_MODEL = "model" CONF_MODEL_DIR = "model_dir" CONF_RIGHT = "right" CONF_TOP = "top" diff --git a/homeassistant/components/twinkly/config_flow.py b/homeassistant/components/twinkly/config_flow.py index 8320e18c9607..eab44dba5910 100644 --- a/homeassistant/components/twinkly/config_flow.py +++ b/homeassistant/components/twinkly/config_flow.py @@ -11,10 +11,10 @@ from voluptuous import Required, Schema from homeassistant import config_entries, data_entry_flow from homeassistant.components import dhcp -from homeassistant.const import CONF_HOST +from homeassistant.const import CONF_HOST, CONF_MODEL from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import CONF_ID, CONF_MODEL, CONF_NAME, DEV_ID, DEV_MODEL, DEV_NAME, DOMAIN +from .const import CONF_ID, CONF_NAME, DEV_ID, DEV_MODEL, DEV_NAME, DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/twinkly/const.py b/homeassistant/components/twinkly/const.py index c266412432bb..e48ff165c67c 100644 --- a/homeassistant/components/twinkly/const.py +++ b/homeassistant/components/twinkly/const.py @@ -6,7 +6,6 @@ DOMAIN = "twinkly" CONF_ID = "id" CONF_HOST = "host" CONF_NAME = "name" -CONF_MODEL = "model" # Strongly named HA attributes keys ATTR_HOST = "host" diff --git a/homeassistant/components/twinkly/light.py b/homeassistant/components/twinkly/light.py index 6675461c06bc..440dab9a6fff 100644 --- a/homeassistant/components/twinkly/light.py +++ b/homeassistant/components/twinkly/light.py @@ -18,6 +18,7 @@ from homeassistant.components.light import ( LightEntity, ) from homeassistant.config_entries import ConfigEntry +from homeassistant.const import CONF_MODEL from homeassistant.core import HomeAssistant from homeassistant.helpers.entity import DeviceInfo from homeassistant.helpers.entity_platform import AddEntitiesCallback @@ -25,7 +26,6 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback from .const import ( CONF_HOST, CONF_ID, - CONF_MODEL, CONF_NAME, DATA_CLIENT, DATA_DEVICE_INFO, diff --git a/homeassistant/components/yeelight/__init__.py b/homeassistant/components/yeelight/__init__.py index 4d226f233b28..0bca1267565b 100644 --- a/homeassistant/components/yeelight/__init__.py +++ b/homeassistant/components/yeelight/__init__.py @@ -13,6 +13,7 @@ from homeassistant.const import ( CONF_DEVICES, CONF_HOST, CONF_ID, + CONF_MODEL, CONF_NAME, EVENT_HOMEASSISTANT_STOP, ) @@ -31,7 +32,6 @@ from .const import ( CONF_DETECTED_MODEL, CONF_FLOW_PARAMS, CONF_MODE_MUSIC, - CONF_MODEL, CONF_NIGHTLIGHT_SWITCH, CONF_NIGHTLIGHT_SWITCH_TYPE, CONF_SAVE_ON_CHANGE, diff --git a/homeassistant/components/yeelight/config_flow.py b/homeassistant/components/yeelight/config_flow.py index 8dd127502e2a..8a3a5b41320e 100644 --- a/homeassistant/components/yeelight/config_flow.py +++ b/homeassistant/components/yeelight/config_flow.py @@ -11,7 +11,7 @@ from yeelight.main import get_known_models from homeassistant import config_entries, exceptions from homeassistant.components import dhcp, ssdp, zeroconf from homeassistant.config_entries import ConfigEntryState -from homeassistant.const import CONF_DEVICE, CONF_HOST, CONF_ID, CONF_NAME +from homeassistant.const import CONF_DEVICE, CONF_HOST, CONF_ID, CONF_MODEL, CONF_NAME from homeassistant.core import callback from homeassistant.data_entry_flow import FlowResult import homeassistant.helpers.config_validation as cv @@ -19,7 +19,6 @@ import homeassistant.helpers.config_validation as cv from .const import ( CONF_DETECTED_MODEL, CONF_MODE_MUSIC, - CONF_MODEL, CONF_NIGHTLIGHT_SWITCH, CONF_NIGHTLIGHT_SWITCH_TYPE, CONF_SAVE_ON_CHANGE, diff --git a/homeassistant/components/yeelight/const.py b/homeassistant/components/yeelight/const.py index 28b5591dcbf2..e9ba80bca95e 100644 --- a/homeassistant/components/yeelight/const.py +++ b/homeassistant/components/yeelight/const.py @@ -33,7 +33,6 @@ DEFAULT_MODE_MUSIC = False DEFAULT_SAVE_ON_CHANGE = False DEFAULT_NIGHTLIGHT_SWITCH = False -CONF_MODEL = "model" CONF_DETECTED_MODEL = "detected_model" CONF_TRANSITION = "transition" diff --git a/tests/components/axis/test_config_flow.py b/tests/components/axis/test_config_flow.py index 112fa57fa646..f09e87020c3c 100644 --- a/tests/components/axis/test_config_flow.py +++ b/tests/components/axis/test_config_flow.py @@ -9,7 +9,6 @@ from homeassistant.components import dhcp, ssdp, zeroconf from homeassistant.components.axis import config_flow from homeassistant.components.axis.const import ( CONF_EVENTS, - CONF_MODEL, CONF_STREAM_PROFILE, CONF_VIDEO_SOURCE, DEFAULT_STREAM_PROFILE, @@ -26,6 +25,7 @@ from homeassistant.config_entries import ( ) from homeassistant.const import ( CONF_HOST, + CONF_MODEL, CONF_NAME, CONF_PASSWORD, CONF_PORT, diff --git a/tests/components/axis/test_device.py b/tests/components/axis/test_device.py index cca62babbb59..4717e2915c1c 100644 --- a/tests/components/axis/test_device.py +++ b/tests/components/axis/test_device.py @@ -9,15 +9,12 @@ import pytest import respx from homeassistant.components import axis, zeroconf -from homeassistant.components.axis.const import ( - CONF_EVENTS, - CONF_MODEL, - DOMAIN as AXIS_DOMAIN, -) +from homeassistant.components.axis.const import CONF_EVENTS, DOMAIN as AXIS_DOMAIN from homeassistant.components.binary_sensor import DOMAIN as BINARY_SENSOR_DOMAIN from homeassistant.config_entries import SOURCE_ZEROCONF from homeassistant.const import ( CONF_HOST, + CONF_MODEL, CONF_NAME, CONF_PASSWORD, CONF_PORT, diff --git a/tests/components/axis/test_init.py b/tests/components/axis/test_init.py index 5ca9fb1eb8db..94f8bf88a8d3 100644 --- a/tests/components/axis/test_init.py +++ b/tests/components/axis/test_init.py @@ -2,12 +2,13 @@ from unittest.mock import AsyncMock, Mock, patch from homeassistant.components import axis -from homeassistant.components.axis.const import CONF_MODEL, DOMAIN as AXIS_DOMAIN +from homeassistant.components.axis.const import DOMAIN as AXIS_DOMAIN from homeassistant.components.binary_sensor import DOMAIN as BINARY_SENSOR_DOMAIN from homeassistant.const import ( CONF_DEVICE, CONF_HOST, CONF_MAC, + CONF_MODEL, CONF_NAME, CONF_PASSWORD, CONF_PORT, diff --git a/tests/components/denonavr/test_config_flow.py b/tests/components/denonavr/test_config_flow.py index ff811e0d235f..91197927e957 100644 --- a/tests/components/denonavr/test_config_flow.py +++ b/tests/components/denonavr/test_config_flow.py @@ -7,7 +7,6 @@ from homeassistant import config_entries, data_entry_flow from homeassistant.components import ssdp from homeassistant.components.denonavr.config_flow import ( CONF_MANUFACTURER, - CONF_MODEL, CONF_SERIAL_NUMBER, CONF_SHOW_ALL_SOURCES, CONF_TYPE, @@ -17,7 +16,7 @@ from homeassistant.components.denonavr.config_flow import ( DOMAIN, AvrTimoutError, ) -from homeassistant.const import CONF_HOST +from homeassistant.const import CONF_HOST, CONF_MODEL from tests.common import MockConfigEntry diff --git a/tests/components/denonavr/test_media_player.py b/tests/components/denonavr/test_media_player.py index 0607e7d42f7f..4497025c11ce 100644 --- a/tests/components/denonavr/test_media_player.py +++ b/tests/components/denonavr/test_media_player.py @@ -6,7 +6,6 @@ import pytest from homeassistant.components import media_player from homeassistant.components.denonavr.config_flow import ( CONF_MANUFACTURER, - CONF_MODEL, CONF_SERIAL_NUMBER, CONF_TYPE, DOMAIN, @@ -18,7 +17,7 @@ from homeassistant.components.denonavr.media_player import ( SERVICE_SET_DYNAMIC_EQ, SERVICE_UPDATE_AUDYSSEY, ) -from homeassistant.const import ATTR_ENTITY_ID, CONF_HOST +from homeassistant.const import ATTR_ENTITY_ID, CONF_HOST, CONF_MODEL from tests.common import MockConfigEntry diff --git a/tests/components/flux_led/test_config_flow.py b/tests/components/flux_led/test_config_flow.py index 7c810688053c..9750600518e4 100644 --- a/tests/components/flux_led/test_config_flow.py +++ b/tests/components/flux_led/test_config_flow.py @@ -12,7 +12,6 @@ from homeassistant.components.flux_led.const import ( CONF_CUSTOM_EFFECT_SPEED_PCT, CONF_CUSTOM_EFFECT_TRANSITION, CONF_MINOR_VERSION, - CONF_MODEL, CONF_MODEL_DESCRIPTION, CONF_MODEL_INFO, CONF_MODEL_NUM, @@ -23,7 +22,7 @@ from homeassistant.components.flux_led.const import ( TRANSITION_JUMP, TRANSITION_STROBE, ) -from homeassistant.const import CONF_DEVICE, CONF_HOST +from homeassistant.const import CONF_DEVICE, CONF_HOST, CONF_MODEL from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import RESULT_TYPE_ABORT, RESULT_TYPE_FORM diff --git a/tests/components/steamist/__init__.py b/tests/components/steamist/__init__.py index 4868bb6a9565..8761d675d548 100644 --- a/tests/components/steamist/__init__.py +++ b/tests/components/steamist/__init__.py @@ -8,9 +8,9 @@ from aiosteamist import Steamist, SteamistStatus from discovery30303 import AIODiscovery30303, Device30303 from homeassistant.components import steamist -from homeassistant.components.steamist.const import CONF_MODEL, DOMAIN +from homeassistant.components.steamist.const import DOMAIN from homeassistant.config_entries import ConfigEntry, ConfigEntryState -from homeassistant.const import CONF_HOST, CONF_NAME +from homeassistant.const import CONF_HOST, CONF_MODEL, CONF_NAME from homeassistant.core import HomeAssistant from homeassistant.helpers import device_registry as dr from homeassistant.setup import async_setup_component diff --git a/tests/components/twinkly/test_config_flow.py b/tests/components/twinkly/test_config_flow.py index e29bd1c3fc18..0cbfe563790a 100644 --- a/tests/components/twinkly/test_config_flow.py +++ b/tests/components/twinkly/test_config_flow.py @@ -6,10 +6,10 @@ from homeassistant.components import dhcp from homeassistant.components.twinkly.const import ( CONF_HOST, CONF_ID, - CONF_MODEL, CONF_NAME, DOMAIN as TWINKLY_DOMAIN, ) +from homeassistant.const import CONF_MODEL from . import TEST_MODEL, ClientMock diff --git a/tests/components/twinkly/test_init.py b/tests/components/twinkly/test_init.py index 573bf5fbc86a..b6b86bb7b338 100644 --- a/tests/components/twinkly/test_init.py +++ b/tests/components/twinkly/test_init.py @@ -6,11 +6,11 @@ from uuid import uuid4 from homeassistant.components.twinkly.const import ( CONF_HOST, CONF_ID, - CONF_MODEL, CONF_NAME, DOMAIN as TWINKLY_DOMAIN, ) from homeassistant.config_entries import ConfigEntryState +from homeassistant.const import CONF_MODEL from homeassistant.core import HomeAssistant from tests.common import MockConfigEntry diff --git a/tests/components/twinkly/test_light.py b/tests/components/twinkly/test_light.py index 7072d7c2eecb..14bed7df007c 100644 --- a/tests/components/twinkly/test_light.py +++ b/tests/components/twinkly/test_light.py @@ -7,10 +7,10 @@ from homeassistant.components.light import ATTR_BRIGHTNESS from homeassistant.components.twinkly.const import ( CONF_HOST, CONF_ID, - CONF_MODEL, CONF_NAME, DOMAIN as TWINKLY_DOMAIN, ) +from homeassistant.const import CONF_MODEL from homeassistant.core import HomeAssistant from homeassistant.helpers import device_registry as dr, entity_registry as er from homeassistant.helpers.device_registry import DeviceEntry diff --git a/tests/components/yeelight/test_config_flow.py b/tests/components/yeelight/test_config_flow.py index 205b5ddfa611..80acaa6f10ee 100644 --- a/tests/components/yeelight/test_config_flow.py +++ b/tests/components/yeelight/test_config_flow.py @@ -9,7 +9,6 @@ from homeassistant.components.yeelight.config_flow import MODEL_UNKNOWN, CannotC from homeassistant.components.yeelight.const import ( CONF_DETECTED_MODEL, CONF_MODE_MUSIC, - CONF_MODEL, CONF_NIGHTLIGHT_SWITCH, CONF_NIGHTLIGHT_SWITCH_TYPE, CONF_SAVE_ON_CHANGE, @@ -22,7 +21,7 @@ from homeassistant.components.yeelight.const import ( DOMAIN, NIGHTLIGHT_SWITCH_TYPE_LIGHT, ) -from homeassistant.const import CONF_DEVICE, CONF_HOST, CONF_ID, CONF_NAME +from homeassistant.const import CONF_DEVICE, CONF_HOST, CONF_ID, CONF_MODEL, CONF_NAME from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import RESULT_TYPE_ABORT, RESULT_TYPE_FORM