Use correct relative imports [n-z] (#63471)
This commit is contained in:
parent
d20851812e
commit
04e1933728
13 changed files with 18 additions and 20 deletions
|
@ -15,7 +15,6 @@ from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.entity import DeviceInfo
|
from homeassistant.helpers.entity import DeviceInfo
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from . import NeatoHub
|
|
||||||
from .const import (
|
from .const import (
|
||||||
NEATO_DOMAIN,
|
NEATO_DOMAIN,
|
||||||
NEATO_LOGIN,
|
NEATO_LOGIN,
|
||||||
|
@ -23,6 +22,7 @@ from .const import (
|
||||||
NEATO_ROBOTS,
|
NEATO_ROBOTS,
|
||||||
SCAN_INTERVAL_MINUTES,
|
SCAN_INTERVAL_MINUTES,
|
||||||
)
|
)
|
||||||
|
from .hub import NeatoHub
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@ from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.entity import DeviceInfo, EntityCategory
|
from homeassistant.helpers.entity import DeviceInfo, EntityCategory
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from . import NeatoHub
|
|
||||||
from .const import NEATO_DOMAIN, NEATO_LOGIN, NEATO_ROBOTS, SCAN_INTERVAL_MINUTES
|
from .const import NEATO_DOMAIN, NEATO_LOGIN, NEATO_ROBOTS, SCAN_INTERVAL_MINUTES
|
||||||
|
from .hub import NeatoHub
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.entity import DeviceInfo, EntityCategory, ToggleEntity
|
from homeassistant.helpers.entity import DeviceInfo, EntityCategory, ToggleEntity
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from . import NeatoHub
|
|
||||||
from .const import NEATO_DOMAIN, NEATO_LOGIN, NEATO_ROBOTS, SCAN_INTERVAL_MINUTES
|
from .const import NEATO_DOMAIN, NEATO_LOGIN, NEATO_ROBOTS, SCAN_INTERVAL_MINUTES
|
||||||
|
from .hub import NeatoHub
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,6 @@ from homeassistant.helpers import config_validation as cv, entity_platform
|
||||||
from homeassistant.helpers.entity import DeviceInfo
|
from homeassistant.helpers.entity import DeviceInfo
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from . import NeatoHub
|
|
||||||
from .const import (
|
from .const import (
|
||||||
ACTION,
|
ACTION,
|
||||||
ALERTS,
|
ALERTS,
|
||||||
|
@ -48,6 +47,7 @@ from .const import (
|
||||||
NEATO_ROBOTS,
|
NEATO_ROBOTS,
|
||||||
SCAN_INTERVAL_MINUTES,
|
SCAN_INTERVAL_MINUTES,
|
||||||
)
|
)
|
||||||
|
from .hub import NeatoHub
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -26,10 +26,10 @@ from homeassistant.core import CALLBACK_TYPE, HomeAssistant
|
||||||
from homeassistant.helpers import config_validation as cv, entity_registry
|
from homeassistant.helpers import config_validation as cv, entity_registry
|
||||||
from homeassistant.helpers.typing import ConfigType
|
from homeassistant.helpers.typing import ConfigType
|
||||||
|
|
||||||
from . import DOMAIN
|
|
||||||
from .climate import STATE_NETATMO_AWAY, STATE_NETATMO_HG, STATE_NETATMO_SCHEDULE
|
from .climate import STATE_NETATMO_AWAY, STATE_NETATMO_HG, STATE_NETATMO_SCHEDULE
|
||||||
from .const import (
|
from .const import (
|
||||||
CLIMATE_TRIGGERS,
|
CLIMATE_TRIGGERS,
|
||||||
|
DOMAIN,
|
||||||
EVENT_TYPE_THERM_MODE,
|
EVENT_TYPE_THERM_MODE,
|
||||||
INDOOR_CAMERA_TRIGGERS,
|
INDOOR_CAMERA_TRIGGERS,
|
||||||
MODEL_NACAMERA,
|
MODEL_NACAMERA,
|
||||||
|
|
|
@ -15,7 +15,7 @@ from homeassistant.helpers import entity_registry
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.typing import ConfigType
|
from homeassistant.helpers.typing import ConfigType
|
||||||
|
|
||||||
from . import DOMAIN, const
|
from .const import ATTR_VALUE, DOMAIN, SERVICE_SET_VALUE
|
||||||
|
|
||||||
ATYP_SET_VALUE = "set_value"
|
ATYP_SET_VALUE = "set_value"
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ ACTION_SCHEMA = cv.DEVICE_ACTION_BASE_SCHEMA.extend(
|
||||||
{
|
{
|
||||||
vol.Required(CONF_TYPE): ATYP_SET_VALUE,
|
vol.Required(CONF_TYPE): ATYP_SET_VALUE,
|
||||||
vol.Required(CONF_ENTITY_ID): cv.entity_domain(DOMAIN),
|
vol.Required(CONF_ENTITY_ID): cv.entity_domain(DOMAIN),
|
||||||
vol.Required(const.ATTR_VALUE): vol.Coerce(float),
|
vol.Required(ATTR_VALUE): vol.Coerce(float),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -58,10 +58,10 @@ async def async_call_action_from_config(
|
||||||
"""Execute a device action."""
|
"""Execute a device action."""
|
||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
const.SERVICE_SET_VALUE,
|
SERVICE_SET_VALUE,
|
||||||
{
|
{
|
||||||
ATTR_ENTITY_ID: config[CONF_ENTITY_ID],
|
ATTR_ENTITY_ID: config[CONF_ENTITY_ID],
|
||||||
const.ATTR_VALUE: config[const.ATTR_VALUE],
|
ATTR_VALUE: config[ATTR_VALUE],
|
||||||
},
|
},
|
||||||
blocking=True,
|
blocking=True,
|
||||||
context=context,
|
context=context,
|
||||||
|
@ -72,6 +72,6 @@ async def async_get_action_capabilities(
|
||||||
hass: HomeAssistant, config: ConfigType
|
hass: HomeAssistant, config: ConfigType
|
||||||
) -> dict[str, vol.Schema]:
|
) -> dict[str, vol.Schema]:
|
||||||
"""List action capabilities."""
|
"""List action capabilities."""
|
||||||
fields = {vol.Required(const.ATTR_VALUE): vol.Coerce(float)}
|
fields = {vol.Required(ATTR_VALUE): vol.Coerce(float)}
|
||||||
|
|
||||||
return {"extra_fields": vol.Schema(fields)}
|
return {"extra_fields": vol.Schema(fields)}
|
||||||
|
|
|
@ -9,7 +9,7 @@ from typing import Any
|
||||||
from homeassistant.const import ATTR_ENTITY_ID
|
from homeassistant.const import ATTR_ENTITY_ID
|
||||||
from homeassistant.core import Context, HomeAssistant, State
|
from homeassistant.core import Context, HomeAssistant, State
|
||||||
|
|
||||||
from . import ATTR_VALUE, DOMAIN, SERVICE_SET_VALUE
|
from .const import ATTR_VALUE, DOMAIN, SERVICE_SET_VALUE
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,7 @@ from homeassistant.helpers import config_validation as cv, entity_registry
|
||||||
from homeassistant.helpers.entity import get_capability
|
from homeassistant.helpers.entity import get_capability
|
||||||
from homeassistant.helpers.typing import ConfigType
|
from homeassistant.helpers.typing import ConfigType
|
||||||
|
|
||||||
from . import DOMAIN
|
from .const import ATTR_OPTIONS, DOMAIN
|
||||||
from .const import ATTR_OPTIONS
|
|
||||||
|
|
||||||
TRIGGER_TYPES = {"current_option_changed"}
|
TRIGGER_TYPES = {"current_option_changed"}
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,7 @@ from typing import Any
|
||||||
from homeassistant.const import ATTR_ENTITY_ID
|
from homeassistant.const import ATTR_ENTITY_ID
|
||||||
from homeassistant.core import Context, HomeAssistant, State
|
from homeassistant.core import Context, HomeAssistant, State
|
||||||
|
|
||||||
from . import ATTR_OPTION, DOMAIN, SERVICE_SELECT_OPTION
|
from .const import ATTR_OPTION, ATTR_OPTIONS, DOMAIN, SERVICE_SELECT_OPTION
|
||||||
from .const import ATTR_OPTIONS
|
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ import av
|
||||||
|
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
from . import KeyFrameConverter, redact_credentials
|
from . import redact_credentials
|
||||||
from .const import (
|
from .const import (
|
||||||
ATTR_SETTINGS,
|
ATTR_SETTINGS,
|
||||||
AUDIO_CODECS,
|
AUDIO_CODECS,
|
||||||
|
@ -26,7 +26,7 @@ from .const import (
|
||||||
SEGMENT_CONTAINER_FORMAT,
|
SEGMENT_CONTAINER_FORMAT,
|
||||||
SOURCE_TIMEOUT,
|
SOURCE_TIMEOUT,
|
||||||
)
|
)
|
||||||
from .core import Part, Segment, StreamOutput, StreamSettings
|
from .core import KeyFrameConverter, Part, Segment, StreamOutput, StreamSettings
|
||||||
from .hls import HlsStreamOutput
|
from .hls import HlsStreamOutput
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
|
@ -19,7 +19,7 @@ from homeassistant.helpers.update_coordinator import (
|
||||||
DataUpdateCoordinator,
|
DataUpdateCoordinator,
|
||||||
)
|
)
|
||||||
|
|
||||||
from . import DATA_COORDINATOR, DATA_TILE, DOMAIN
|
from .const import DATA_COORDINATOR, DATA_TILE, DOMAIN
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import pywemo
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import config_entry_flow
|
from homeassistant.helpers import config_entry_flow
|
||||||
|
|
||||||
from . import DOMAIN
|
from .const import DOMAIN
|
||||||
|
|
||||||
|
|
||||||
async def _async_has_devices(hass: HomeAssistant) -> bool:
|
async def _async_has_devices(hass: HomeAssistant) -> bool:
|
||||||
|
|
|
@ -16,13 +16,13 @@ from homeassistant.exceptions import HomeAssistantError
|
||||||
from homeassistant.helpers import condition, config_validation as cv
|
from homeassistant.helpers import condition, config_validation as cv
|
||||||
from homeassistant.helpers.typing import ConfigType, TemplateVarsType
|
from homeassistant.helpers.typing import ConfigType, TemplateVarsType
|
||||||
|
|
||||||
from . import DOMAIN
|
|
||||||
from .const import (
|
from .const import (
|
||||||
ATTR_COMMAND_CLASS,
|
ATTR_COMMAND_CLASS,
|
||||||
ATTR_ENDPOINT,
|
ATTR_ENDPOINT,
|
||||||
ATTR_PROPERTY,
|
ATTR_PROPERTY,
|
||||||
ATTR_PROPERTY_KEY,
|
ATTR_PROPERTY_KEY,
|
||||||
ATTR_VALUE,
|
ATTR_VALUE,
|
||||||
|
DOMAIN,
|
||||||
VALUE_SCHEMA,
|
VALUE_SCHEMA,
|
||||||
)
|
)
|
||||||
from .device_automation_helpers import (
|
from .device_automation_helpers import (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue