diff --git a/homeassistant/components/ambient_station/sensor.py b/homeassistant/components/ambient_station/sensor.py index 1cf7ac6bfb7..3a17ecfc1f1 100644 --- a/homeassistant/components/ambient_station/sensor.py +++ b/homeassistant/components/ambient_station/sensor.py @@ -28,13 +28,8 @@ from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.entity import EntityDescription from homeassistant.helpers.entity_platform import AddEntitiesCallback -from . import ( - TYPE_SOLARRADIATION, - TYPE_SOLARRADIATION_LX, - AmbientStation, - AmbientWeatherEntity, -) -from .const import ATTR_LAST_DATA, DOMAIN +from . import AmbientStation, AmbientWeatherEntity +from .const import ATTR_LAST_DATA, DOMAIN, TYPE_SOLARRADIATION, TYPE_SOLARRADIATION_LX TYPE_24HOURRAININ = "24hourrainin" TYPE_BAROMABSIN = "baromabsin" diff --git a/homeassistant/components/automation/logbook.py b/homeassistant/components/automation/logbook.py index b5dbada1b7a..901972595e4 100644 --- a/homeassistant/components/automation/logbook.py +++ b/homeassistant/components/automation/logbook.py @@ -3,7 +3,8 @@ from homeassistant.components.logbook import LazyEventPartialState from homeassistant.const import ATTR_ENTITY_ID, ATTR_NAME from homeassistant.core import HomeAssistant, callback -from . import ATTR_SOURCE, DOMAIN, EVENT_AUTOMATION_TRIGGERED +from . import ATTR_SOURCE, EVENT_AUTOMATION_TRIGGERED +from .const import DOMAIN @callback diff --git a/homeassistant/components/automation/reproduce_state.py b/homeassistant/components/automation/reproduce_state.py index 4318cdafa39..aa6e6a501b6 100644 --- a/homeassistant/components/automation/reproduce_state.py +++ b/homeassistant/components/automation/reproduce_state.py @@ -15,7 +15,7 @@ from homeassistant.const import ( ) from homeassistant.core import Context, HomeAssistant, State -from . import DOMAIN +from .const import DOMAIN _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/bond/light.py b/homeassistant/components/bond/light.py index 255f848c167..973cb0f4eb9 100644 --- a/homeassistant/components/bond/light.py +++ b/homeassistant/components/bond/light.py @@ -20,7 +20,6 @@ from homeassistant.helpers import config_validation as cv, entity_platform from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity_platform import AddEntitiesCallback -from . import BondHub from .const import ( ATTR_POWER_STATE, BPUP_SUBS, @@ -30,7 +29,7 @@ from .const import ( SERVICE_SET_LIGHT_POWER_TRACKED_STATE, ) from .entity import BondEntity -from .utils import BondDevice +from .utils import BondDevice, BondHub _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/button/device_trigger.py b/homeassistant/components/button/device_trigger.py index 6d4692234f7..ccad50dec05 100644 --- a/homeassistant/components/button/device_trigger.py +++ b/homeassistant/components/button/device_trigger.py @@ -25,7 +25,7 @@ from homeassistant.core import CALLBACK_TYPE, HomeAssistant from homeassistant.helpers import config_validation as cv, entity_registry from homeassistant.helpers.typing import ConfigType -from . import DOMAIN +from .const import DOMAIN TRIGGER_TYPES = {"pressed"} diff --git a/homeassistant/components/device_tracker/device_condition.py b/homeassistant/components/device_tracker/device_condition.py index 2762a271cab..0703d3c7646 100644 --- a/homeassistant/components/device_tracker/device_condition.py +++ b/homeassistant/components/device_tracker/device_condition.py @@ -17,7 +17,7 @@ from homeassistant.helpers import condition, config_validation as cv, entity_reg from homeassistant.helpers.config_validation import DEVICE_CONDITION_BASE_SCHEMA from homeassistant.helpers.typing import ConfigType, TemplateVarsType -from . import DOMAIN +from .const import DOMAIN CONDITION_TYPES = {"is_home", "is_not_home"} diff --git a/homeassistant/components/device_tracker/device_trigger.py b/homeassistant/components/device_tracker/device_trigger.py index 926519c2243..4350f03cefc 100644 --- a/homeassistant/components/device_tracker/device_trigger.py +++ b/homeassistant/components/device_tracker/device_trigger.py @@ -24,7 +24,7 @@ from homeassistant.core import CALLBACK_TYPE, HomeAssistant from homeassistant.helpers import config_validation as cv, entity_registry from homeassistant.helpers.typing import ConfigType -from . import DOMAIN +from .const import DOMAIN TRIGGER_TYPES: Final[set[str]] = {"enters", "leaves"} diff --git a/homeassistant/components/lcn/device_trigger.py b/homeassistant/components/lcn/device_trigger.py index 33b474ab724..b82724f05d6 100644 --- a/homeassistant/components/lcn/device_trigger.py +++ b/homeassistant/components/lcn/device_trigger.py @@ -16,8 +16,7 @@ from homeassistant.core import CALLBACK_TYPE, HomeAssistant from homeassistant.helpers import config_validation as cv, device_registry as dr from homeassistant.helpers.typing import ConfigType -from . import DOMAIN -from .const import KEY_ACTIONS, SENDKEYS +from .const import DOMAIN, KEY_ACTIONS, SENDKEYS TRIGGER_TYPES = {"transmitter", "transponder", "fingerprint", "send_keys"} diff --git a/homeassistant/components/luftdaten/sensor.py b/homeassistant/components/luftdaten/sensor.py index e8127b8d9be..055820de3a0 100644 --- a/homeassistant/components/luftdaten/sensor.py +++ b/homeassistant/components/luftdaten/sensor.py @@ -27,8 +27,7 @@ from homeassistant.helpers.update_coordinator import ( DataUpdateCoordinator, ) -from . import DOMAIN -from .const import ATTR_SENSOR_ID, CONF_SENSOR_ID +from .const import ATTR_SENSOR_ID, CONF_SENSOR_ID, DOMAIN SENSORS: tuple[SensorEntityDescription, ...] = ( SensorEntityDescription( diff --git a/homeassistant/components/media_player/device_condition.py b/homeassistant/components/media_player/device_condition.py index d099eb9a8a4..2d8c04dc181 100644 --- a/homeassistant/components/media_player/device_condition.py +++ b/homeassistant/components/media_player/device_condition.py @@ -21,7 +21,7 @@ from homeassistant.helpers import condition, config_validation as cv, entity_reg from homeassistant.helpers.config_validation import DEVICE_CONDITION_BASE_SCHEMA from homeassistant.helpers.typing import ConfigType, TemplateVarsType -from . import DOMAIN +from .const import DOMAIN CONDITION_TYPES = {"is_on", "is_off", "is_idle", "is_paused", "is_playing"} diff --git a/homeassistant/components/media_player/device_trigger.py b/homeassistant/components/media_player/device_trigger.py index d48a657794b..1bdbb62248f 100644 --- a/homeassistant/components/media_player/device_trigger.py +++ b/homeassistant/components/media_player/device_trigger.py @@ -28,7 +28,7 @@ from homeassistant.core import CALLBACK_TYPE, HomeAssistant from homeassistant.helpers import config_validation as cv, entity_registry from homeassistant.helpers.typing import ConfigType -from . import DOMAIN +from .const import DOMAIN TRIGGER_TYPES = {"turned_on", "turned_off", "idle", "paused", "playing"} diff --git a/homeassistant/components/mysensors/config_flow.py b/homeassistant/components/mysensors/config_flow.py index 5c190d6fd56..e45a332767f 100644 --- a/homeassistant/components/mysensors/config_flow.py +++ b/homeassistant/components/mysensors/config_flow.py @@ -22,26 +22,21 @@ from homeassistant.core import callback from homeassistant.data_entry_flow import FlowResult import homeassistant.helpers.config_validation as cv -from . import ( - CONF_DEVICE, - CONF_RETAIN, - CONF_VERSION, - DEFAULT_BAUD_RATE, - DEFAULT_TCP_PORT, - DEFAULT_VERSION, - is_persistence_file, -) +from . import DEFAULT_BAUD_RATE, DEFAULT_TCP_PORT, DEFAULT_VERSION, is_persistence_file from .const import ( CONF_BAUD_RATE, + CONF_DEVICE, CONF_GATEWAY_TYPE, CONF_GATEWAY_TYPE_ALL, CONF_GATEWAY_TYPE_MQTT, CONF_GATEWAY_TYPE_SERIAL, CONF_GATEWAY_TYPE_TCP, CONF_PERSISTENCE_FILE, + CONF_RETAIN, CONF_TCP_PORT, CONF_TOPIC_IN_PREFIX, CONF_TOPIC_OUT_PREFIX, + CONF_VERSION, DOMAIN, ConfGatewayType, ) diff --git a/homeassistant/components/mysensors/device_tracker.py b/homeassistant/components/mysensors/device_tracker.py index bfb4649e7cd..ecb43a96aa4 100644 --- a/homeassistant/components/mysensors/device_tracker.py +++ b/homeassistant/components/mysensors/device_tracker.py @@ -10,8 +10,7 @@ from homeassistant.core import HomeAssistant from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.util import slugify -from . import DevId -from .const import ATTR_GATEWAY_ID, DiscoveryInfo, GatewayId +from .const import ATTR_GATEWAY_ID, DevId, DiscoveryInfo, GatewayId from .helpers import on_unload