Adjust components to use relative imports (#78279)

pull/78331/head
epenet 2022-09-12 23:33:21 +02:00 committed by GitHub
parent 9cb8d910ce
commit dbc6dda41e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 29 additions and 28 deletions

View File

@ -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,

View File

@ -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] = {

View File

@ -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] = {

View File

@ -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,

View File

@ -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

View File

@ -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>

View File

@ -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(

View File

@ -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>