Adjust components to use relative imports (#78279)
parent
9cb8d910ce
commit
dbc6dda41e
|
@ -3,9 +3,9 @@
|
|||
from insteon_frontend import get_build_id, locate_dir
|
||||
|
||||
from homeassistant.components import panel_custom, websocket_api
|
||||
from homeassistant.components.insteon.const import CONF_DEV_PATH, DOMAIN
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
|
||||
from ..const import CONF_DEV_PATH, DOMAIN
|
||||
from .aldb import (
|
||||
websocket_add_default_links,
|
||||
websocket_change_aldb_record,
|
||||
|
|
|
@ -13,9 +13,10 @@ from homeassistant.components.climate import (
|
|||
ClimateEntityFeature,
|
||||
HVACMode,
|
||||
)
|
||||
from homeassistant.components.overkiz.entity import OverkizEntity
|
||||
from homeassistant.const import TEMP_CELSIUS
|
||||
|
||||
from ..entity import OverkizEntity
|
||||
|
||||
PRESET_FROST_PROTECTION = "frost_protection"
|
||||
|
||||
OVERKIZ_TO_HVAC_MODES: dict[str, HVACMode] = {
|
||||
|
|
|
@ -12,10 +12,11 @@ from homeassistant.components.climate import (
|
|||
ClimateEntityFeature,
|
||||
HVACMode,
|
||||
)
|
||||
from homeassistant.components.overkiz.coordinator import OverkizDataUpdateCoordinator
|
||||
from homeassistant.components.overkiz.entity import OverkizEntity
|
||||
from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS
|
||||
|
||||
from ..coordinator import OverkizDataUpdateCoordinator
|
||||
from ..entity import OverkizEntity
|
||||
|
||||
PRESET_DRYING = "drying"
|
||||
|
||||
OVERKIZ_TO_HVAC_MODE: dict[str, str] = {
|
||||
|
|
|
@ -4,9 +4,10 @@ from typing import cast
|
|||
from pyoverkiz.enums import OverkizCommand, OverkizCommandParam, OverkizState
|
||||
|
||||
from homeassistant.components.climate import ClimateEntity, HVACMode
|
||||
from homeassistant.components.overkiz.entity import OverkizEntity
|
||||
from homeassistant.const import TEMP_CELSIUS
|
||||
|
||||
from ..entity import OverkizEntity
|
||||
|
||||
OVERKIZ_TO_HVAC_MODE: dict[str, str] = {
|
||||
OverkizCommandParam.HEATING: HVACMode.HEAT,
|
||||
OverkizCommandParam.DRYING: HVACMode.DRY,
|
||||
|
|
|
@ -5,12 +5,12 @@ from typing import Any
|
|||
from urllib.parse import urlparse
|
||||
|
||||
from homeassistant.components import system_health
|
||||
from homeassistant.components.recorder.core import Recorder
|
||||
from homeassistant.components.recorder.util import session_scope
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
|
||||
from .. import get_instance
|
||||
from ..const import SupportedDialect
|
||||
from ..core import Recorder
|
||||
from ..util import session_scope
|
||||
from .mysql import db_size_bytes as mysql_db_size_bytes
|
||||
from .postgresql import db_size_bytes as postgresql_db_size_bytes
|
||||
from .sqlite import db_size_bytes as sqlite_db_size_bytes
|
||||
|
|
|
@ -10,7 +10,13 @@ from zwave_js_server.model.controller import CONTROLLER_EVENT_MODEL_MAP
|
|||
from zwave_js_server.model.driver import DRIVER_EVENT_MODEL_MAP
|
||||
from zwave_js_server.model.node import NODE_EVENT_MODEL_MAP
|
||||
|
||||
from homeassistant.components.zwave_js.const import (
|
||||
from homeassistant.const import ATTR_DEVICE_ID, ATTR_ENTITY_ID, CONF_PLATFORM
|
||||
from homeassistant.core import CALLBACK_TYPE, HassJob, HomeAssistant, callback
|
||||
from homeassistant.helpers import config_validation as cv, device_registry as dr
|
||||
from homeassistant.helpers.trigger import TriggerActionType, TriggerInfo
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
||||
from ..const import (
|
||||
ATTR_CONFIG_ENTRY_ID,
|
||||
ATTR_EVENT,
|
||||
ATTR_EVENT_DATA,
|
||||
|
@ -20,17 +26,11 @@ from homeassistant.components.zwave_js.const import (
|
|||
DATA_CLIENT,
|
||||
DOMAIN,
|
||||
)
|
||||
from homeassistant.components.zwave_js.helpers import (
|
||||
from ..helpers import (
|
||||
async_get_nodes_from_targets,
|
||||
get_device_id,
|
||||
get_home_and_node_id_from_device_entry,
|
||||
)
|
||||
from homeassistant.const import ATTR_DEVICE_ID, ATTR_ENTITY_ID, CONF_PLATFORM
|
||||
from homeassistant.core import CALLBACK_TYPE, HassJob, HomeAssistant, callback
|
||||
from homeassistant.helpers import config_validation as cv, device_registry as dr
|
||||
from homeassistant.helpers.trigger import TriggerActionType, TriggerInfo
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
||||
from .helpers import async_bypass_dynamic_config_validation
|
||||
|
||||
# Platform type should be <DOMAIN>.<SUBMODULE_NAME>
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
"""Helpers for Z-Wave JS custom triggers."""
|
||||
from homeassistant.components.zwave_js.const import ATTR_CONFIG_ENTRY_ID, DOMAIN
|
||||
from homeassistant.config_entries import ConfigEntryState
|
||||
from homeassistant.const import ATTR_DEVICE_ID, ATTR_ENTITY_ID
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers import device_registry as dr, entity_registry as er
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
||||
from ..const import ATTR_CONFIG_ENTRY_ID, DOMAIN
|
||||
|
||||
|
||||
@callback
|
||||
def async_bypass_dynamic_config_validation(
|
||||
|
|
|
@ -7,8 +7,14 @@ import voluptuous as vol
|
|||
from zwave_js_server.const import CommandClass
|
||||
from zwave_js_server.model.value import Value, get_value_id
|
||||
|
||||
from homeassistant.components.zwave_js.config_validation import VALUE_SCHEMA
|
||||
from homeassistant.components.zwave_js.const import (
|
||||
from homeassistant.const import ATTR_DEVICE_ID, ATTR_ENTITY_ID, CONF_PLATFORM, MATCH_ALL
|
||||
from homeassistant.core import CALLBACK_TYPE, HassJob, HomeAssistant, callback
|
||||
from homeassistant.helpers import config_validation as cv, device_registry as dr
|
||||
from homeassistant.helpers.trigger import TriggerActionType, TriggerInfo
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
||||
from ..config_validation import VALUE_SCHEMA
|
||||
from ..const import (
|
||||
ATTR_COMMAND_CLASS,
|
||||
ATTR_COMMAND_CLASS_NAME,
|
||||
ATTR_CURRENT_VALUE,
|
||||
|
@ -23,16 +29,7 @@ from homeassistant.components.zwave_js.const import (
|
|||
ATTR_PROPERTY_NAME,
|
||||
DOMAIN,
|
||||
)
|
||||
from homeassistant.components.zwave_js.helpers import (
|
||||
async_get_nodes_from_targets,
|
||||
get_device_id,
|
||||
)
|
||||
from homeassistant.const import ATTR_DEVICE_ID, ATTR_ENTITY_ID, CONF_PLATFORM, MATCH_ALL
|
||||
from homeassistant.core import CALLBACK_TYPE, HassJob, HomeAssistant, callback
|
||||
from homeassistant.helpers import config_validation as cv, device_registry as dr
|
||||
from homeassistant.helpers.trigger import TriggerActionType, TriggerInfo
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
||||
from ..helpers import async_get_nodes_from_targets, get_device_id
|
||||
from .helpers import async_bypass_dynamic_config_validation
|
||||
|
||||
# Platform type should be <DOMAIN>.<SUBMODULE_NAME>
|
||||
|
|
Loading…
Reference in New Issue