mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Use const imports [a-e] (#63467)
This commit is contained in:
parent
a2de95197d
commit
1b32385ab2
@ -12,16 +12,16 @@ from homeassistant.components import (
|
|||||||
timer,
|
timer,
|
||||||
vacuum,
|
vacuum,
|
||||||
)
|
)
|
||||||
from homeassistant.components.alarm_control_panel import ATTR_CODE_FORMAT, FORMAT_NUMBER
|
from homeassistant.components.alarm_control_panel import FORMAT_NUMBER
|
||||||
from homeassistant.components.alarm_control_panel.const import (
|
from homeassistant.components.alarm_control_panel.const import (
|
||||||
SUPPORT_ALARM_ARM_AWAY,
|
SUPPORT_ALARM_ARM_AWAY,
|
||||||
SUPPORT_ALARM_ARM_HOME,
|
SUPPORT_ALARM_ARM_HOME,
|
||||||
SUPPORT_ALARM_ARM_NIGHT,
|
SUPPORT_ALARM_ARM_NIGHT,
|
||||||
)
|
)
|
||||||
import homeassistant.components.climate.const as climate
|
import homeassistant.components.climate.const as climate
|
||||||
from homeassistant.components.lock import STATE_LOCKING, STATE_UNLOCKING
|
|
||||||
import homeassistant.components.media_player.const as media_player
|
import homeassistant.components.media_player.const as media_player
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
ATTR_CODE_FORMAT,
|
||||||
ATTR_SUPPORTED_FEATURES,
|
ATTR_SUPPORTED_FEATURES,
|
||||||
ATTR_TEMPERATURE,
|
ATTR_TEMPERATURE,
|
||||||
ATTR_UNIT_OF_MEASUREMENT,
|
ATTR_UNIT_OF_MEASUREMENT,
|
||||||
@ -31,6 +31,7 @@ from homeassistant.const import (
|
|||||||
STATE_ALARM_ARMED_NIGHT,
|
STATE_ALARM_ARMED_NIGHT,
|
||||||
STATE_IDLE,
|
STATE_IDLE,
|
||||||
STATE_LOCKED,
|
STATE_LOCKED,
|
||||||
|
STATE_LOCKING,
|
||||||
STATE_OFF,
|
STATE_OFF,
|
||||||
STATE_ON,
|
STATE_ON,
|
||||||
STATE_PAUSED,
|
STATE_PAUSED,
|
||||||
@ -38,6 +39,7 @@ from homeassistant.const import (
|
|||||||
STATE_UNAVAILABLE,
|
STATE_UNAVAILABLE,
|
||||||
STATE_UNKNOWN,
|
STATE_UNKNOWN,
|
||||||
STATE_UNLOCKED,
|
STATE_UNLOCKED,
|
||||||
|
STATE_UNLOCKING,
|
||||||
)
|
)
|
||||||
from homeassistant.core import State
|
from homeassistant.core import State
|
||||||
import homeassistant.util.color as color_util
|
import homeassistant.util.color as color_util
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
"""ATAG water heater component."""
|
"""ATAG water heater component."""
|
||||||
from homeassistant.components.water_heater import (
|
from homeassistant.components.water_heater import (
|
||||||
ATTR_TEMPERATURE,
|
|
||||||
STATE_ECO,
|
STATE_ECO,
|
||||||
STATE_PERFORMANCE,
|
STATE_PERFORMANCE,
|
||||||
WaterHeaterEntity,
|
WaterHeaterEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import STATE_OFF, TEMP_CELSIUS, Platform
|
from homeassistant.const import ATTR_TEMPERATURE, STATE_OFF, TEMP_CELSIUS, Platform
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
"""Constants for the BleBox devices integration."""
|
"""Constants for the BleBox devices integration."""
|
||||||
|
|
||||||
from homeassistant.components.cover import (
|
from homeassistant.components.cover import CoverDeviceClass
|
||||||
|
from homeassistant.components.sensor import SensorDeviceClass
|
||||||
|
from homeassistant.components.switch import SwitchDeviceClass
|
||||||
|
from homeassistant.const import (
|
||||||
STATE_CLOSED,
|
STATE_CLOSED,
|
||||||
STATE_CLOSING,
|
STATE_CLOSING,
|
||||||
STATE_OPEN,
|
STATE_OPEN,
|
||||||
STATE_OPENING,
|
STATE_OPENING,
|
||||||
CoverDeviceClass,
|
TEMP_CELSIUS,
|
||||||
)
|
)
|
||||||
from homeassistant.components.sensor import SensorDeviceClass
|
|
||||||
from homeassistant.components.switch import SwitchDeviceClass
|
|
||||||
from homeassistant.const import TEMP_CELSIUS
|
|
||||||
|
|
||||||
DOMAIN = "blebox"
|
DOMAIN = "blebox"
|
||||||
PRODUCT = "product"
|
PRODUCT = "product"
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
"""BleBox cover entity."""
|
"""BleBox cover entity."""
|
||||||
from homeassistant.components.cover import (
|
from homeassistant.components.cover import (
|
||||||
ATTR_POSITION,
|
ATTR_POSITION,
|
||||||
STATE_CLOSED,
|
|
||||||
STATE_CLOSING,
|
|
||||||
STATE_OPENING,
|
|
||||||
SUPPORT_CLOSE,
|
SUPPORT_CLOSE,
|
||||||
SUPPORT_OPEN,
|
SUPPORT_OPEN,
|
||||||
SUPPORT_SET_POSITION,
|
SUPPORT_SET_POSITION,
|
||||||
@ -11,6 +8,7 @@ from homeassistant.components.cover import (
|
|||||||
CoverEntity,
|
CoverEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
|
from homeassistant.const import STATE_CLOSED, STATE_CLOSING, STATE_OPENING
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@ import voluptuous as vol
|
|||||||
|
|
||||||
from homeassistant.components.remote import (
|
from homeassistant.components.remote import (
|
||||||
ATTR_ALTERNATIVE,
|
ATTR_ALTERNATIVE,
|
||||||
ATTR_COMMAND,
|
|
||||||
ATTR_COMMAND_TYPE,
|
ATTR_COMMAND_TYPE,
|
||||||
ATTR_DELAY_SECS,
|
ATTR_DELAY_SECS,
|
||||||
ATTR_DEVICE,
|
ATTR_DEVICE,
|
||||||
@ -32,7 +31,7 @@ from homeassistant.components.remote import (
|
|||||||
RemoteEntity,
|
RemoteEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import STATE_OFF
|
from homeassistant.const import ATTR_COMMAND, STATE_OFF
|
||||||
from homeassistant.core import HomeAssistant, callback
|
from homeassistant.core import HomeAssistant, callback
|
||||||
from homeassistant.helpers import config_validation as cv
|
from homeassistant.helpers import config_validation as cv
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
@ -13,8 +13,8 @@ from homeassistant.components.light import (
|
|||||||
ATTR_RGB_COLOR,
|
ATTR_RGB_COLOR,
|
||||||
DOMAIN as LIGHT_DOMAIN,
|
DOMAIN as LIGHT_DOMAIN,
|
||||||
LIGHT_TURN_ON_SCHEMA,
|
LIGHT_TURN_ON_SCHEMA,
|
||||||
SERVICE_TURN_ON as LIGHT_SERVICE_TURN_ON,
|
|
||||||
)
|
)
|
||||||
|
from homeassistant.const import SERVICE_TURN_ON as LIGHT_SERVICE_TURN_ON
|
||||||
from homeassistant.core import HomeAssistant, ServiceCall
|
from homeassistant.core import HomeAssistant, ServiceCall
|
||||||
from homeassistant.helpers import aiohttp_client
|
from homeassistant.helpers import aiohttp_client
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
"""Intents for the cover integration."""
|
"""Intents for the cover integration."""
|
||||||
|
from homeassistant.const import SERVICE_CLOSE_COVER, SERVICE_OPEN_COVER
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import intent
|
from homeassistant.helpers import intent
|
||||||
|
|
||||||
from . import DOMAIN, SERVICE_CLOSE_COVER, SERVICE_OPEN_COVER
|
from . import DOMAIN
|
||||||
|
|
||||||
INTENT_OPEN_COVER = "HassOpenCover"
|
INTENT_OPEN_COVER = "HassOpenCover"
|
||||||
INTENT_CLOSE_COVER = "HassCloseCover"
|
INTENT_CLOSE_COVER = "HassCloseCover"
|
||||||
|
@ -5,13 +5,11 @@ from pyeconet.equipment import EquipmentType
|
|||||||
from pyeconet.equipment.water_heater import WaterHeaterOperationMode
|
from pyeconet.equipment.water_heater import WaterHeaterOperationMode
|
||||||
|
|
||||||
from homeassistant.components.water_heater import (
|
from homeassistant.components.water_heater import (
|
||||||
ATTR_TEMPERATURE,
|
|
||||||
STATE_ECO,
|
STATE_ECO,
|
||||||
STATE_ELECTRIC,
|
STATE_ELECTRIC,
|
||||||
STATE_GAS,
|
STATE_GAS,
|
||||||
STATE_HEAT_PUMP,
|
STATE_HEAT_PUMP,
|
||||||
STATE_HIGH_DEMAND,
|
STATE_HIGH_DEMAND,
|
||||||
STATE_OFF,
|
|
||||||
STATE_PERFORMANCE,
|
STATE_PERFORMANCE,
|
||||||
SUPPORT_AWAY_MODE,
|
SUPPORT_AWAY_MODE,
|
||||||
SUPPORT_OPERATION_MODE,
|
SUPPORT_OPERATION_MODE,
|
||||||
@ -19,6 +17,7 @@ from homeassistant.components.water_heater import (
|
|||||||
WaterHeaterEntity,
|
WaterHeaterEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
|
from homeassistant.const import ATTR_TEMPERATURE, STATE_OFF
|
||||||
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
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@ from homeassistant.components.climate.const import (
|
|||||||
from homeassistant.components.cover import (
|
from homeassistant.components.cover import (
|
||||||
ATTR_CURRENT_POSITION,
|
ATTR_CURRENT_POSITION,
|
||||||
ATTR_POSITION,
|
ATTR_POSITION,
|
||||||
SERVICE_SET_COVER_POSITION,
|
|
||||||
SUPPORT_SET_POSITION,
|
SUPPORT_SET_POSITION,
|
||||||
)
|
)
|
||||||
from homeassistant.components.fan import (
|
from homeassistant.components.fan import (
|
||||||
@ -58,6 +57,7 @@ from homeassistant.const import (
|
|||||||
ATTR_TEMPERATURE,
|
ATTR_TEMPERATURE,
|
||||||
SERVICE_CLOSE_COVER,
|
SERVICE_CLOSE_COVER,
|
||||||
SERVICE_OPEN_COVER,
|
SERVICE_OPEN_COVER,
|
||||||
|
SERVICE_SET_COVER_POSITION,
|
||||||
SERVICE_TURN_OFF,
|
SERVICE_TURN_OFF,
|
||||||
SERVICE_TURN_ON,
|
SERVICE_TURN_ON,
|
||||||
SERVICE_VOLUME_SET,
|
SERVICE_VOLUME_SET,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user