Use correct relative imports [n-z] (#63471)

This commit is contained in:
Marc Mueller 2022-01-05 17:23:49 +01:00 committed by GitHub
parent d20851812e
commit 04e1933728
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 18 additions and 20 deletions

View file

@ -15,7 +15,6 @@ from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import NeatoHub
from .const import (
NEATO_DOMAIN,
NEATO_LOGIN,
@ -23,6 +22,7 @@ from .const import (
NEATO_ROBOTS,
SCAN_INTERVAL_MINUTES,
)
from .hub import NeatoHub
_LOGGER = logging.getLogger(__name__)

View file

@ -15,8 +15,8 @@ from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import DeviceInfo, EntityCategory
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import NeatoHub
from .const import NEATO_DOMAIN, NEATO_LOGIN, NEATO_ROBOTS, SCAN_INTERVAL_MINUTES
from .hub import NeatoHub
_LOGGER = logging.getLogger(__name__)

View file

@ -14,8 +14,8 @@ from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import DeviceInfo, EntityCategory, ToggleEntity
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import NeatoHub
from .const import NEATO_DOMAIN, NEATO_LOGIN, NEATO_ROBOTS, SCAN_INTERVAL_MINUTES
from .hub import NeatoHub
_LOGGER = logging.getLogger(__name__)

View file

@ -35,7 +35,6 @@ from homeassistant.helpers import config_validation as cv, entity_platform
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import NeatoHub
from .const import (
ACTION,
ALERTS,
@ -48,6 +47,7 @@ from .const import (
NEATO_ROBOTS,
SCAN_INTERVAL_MINUTES,
)
from .hub import NeatoHub
_LOGGER = logging.getLogger(__name__)

View file

@ -26,10 +26,10 @@ 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 .climate import STATE_NETATMO_AWAY, STATE_NETATMO_HG, STATE_NETATMO_SCHEDULE
from .const import (
CLIMATE_TRIGGERS,
DOMAIN,
EVENT_TYPE_THERM_MODE,
INDOOR_CAMERA_TRIGGERS,
MODEL_NACAMERA,

View file

@ -15,7 +15,7 @@ from homeassistant.helpers import entity_registry
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.typing import ConfigType
from . import DOMAIN, const
from .const import ATTR_VALUE, DOMAIN, SERVICE_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_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."""
await hass.services.async_call(
DOMAIN,
const.SERVICE_SET_VALUE,
SERVICE_SET_VALUE,
{
ATTR_ENTITY_ID: config[CONF_ENTITY_ID],
const.ATTR_VALUE: config[const.ATTR_VALUE],
ATTR_VALUE: config[ATTR_VALUE],
},
blocking=True,
context=context,
@ -72,6 +72,6 @@ async def async_get_action_capabilities(
hass: HomeAssistant, config: ConfigType
) -> dict[str, vol.Schema]:
"""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)}

View file

@ -9,7 +9,7 @@ from typing import Any
from homeassistant.const import ATTR_ENTITY_ID
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__)

View file

@ -30,8 +30,7 @@ from homeassistant.helpers import config_validation as cv, entity_registry
from homeassistant.helpers.entity import get_capability
from homeassistant.helpers.typing import ConfigType
from . import DOMAIN
from .const import ATTR_OPTIONS
from .const import ATTR_OPTIONS, DOMAIN
TRIGGER_TYPES = {"current_option_changed"}

View file

@ -9,8 +9,7 @@ from typing import Any
from homeassistant.const import ATTR_ENTITY_ID
from homeassistant.core import Context, HomeAssistant, State
from . import ATTR_OPTION, DOMAIN, SERVICE_SELECT_OPTION
from .const import ATTR_OPTIONS
from .const import ATTR_OPTION, ATTR_OPTIONS, DOMAIN, SERVICE_SELECT_OPTION
_LOGGER = logging.getLogger(__name__)

View file

@ -14,7 +14,7 @@ import av
from homeassistant.core import HomeAssistant
from . import KeyFrameConverter, redact_credentials
from . import redact_credentials
from .const import (
ATTR_SETTINGS,
AUDIO_CODECS,
@ -26,7 +26,7 @@ from .const import (
SEGMENT_CONTAINER_FORMAT,
SOURCE_TIMEOUT,
)
from .core import Part, Segment, StreamOutput, StreamSettings
from .core import KeyFrameConverter, Part, Segment, StreamOutput, StreamSettings
from .hls import HlsStreamOutput
_LOGGER = logging.getLogger(__name__)

View file

@ -19,7 +19,7 @@ from homeassistant.helpers.update_coordinator import (
DataUpdateCoordinator,
)
from . import DATA_COORDINATOR, DATA_TILE, DOMAIN
from .const import DATA_COORDINATOR, DATA_TILE, DOMAIN
_LOGGER = logging.getLogger(__name__)

View file

@ -5,7 +5,7 @@ import pywemo
from homeassistant.core import HomeAssistant
from homeassistant.helpers import config_entry_flow
from . import DOMAIN
from .const import DOMAIN
async def _async_has_devices(hass: HomeAssistant) -> bool:

View file

@ -16,13 +16,13 @@ from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import condition, config_validation as cv
from homeassistant.helpers.typing import ConfigType, TemplateVarsType
from . import DOMAIN
from .const import (
ATTR_COMMAND_CLASS,
ATTR_ENDPOINT,
ATTR_PROPERTY,
ATTR_PROPERTY_KEY,
ATTR_VALUE,
DOMAIN,
VALUE_SCHEMA,
)
from .device_automation_helpers import (