Use relative imports inside integrations (#22235)
* Use relative imports inside integrations * Lint * Fix automation tests * Fix scene imports
This commit is contained in:
1 parent
ab17b22239
commit
4b1de61110
522 files changed
+1834
-1725
No files matched your search
@@ -1,11 +1,10 @@
|
||||
"""Support for ESPHome binary sensors."""
|
||||
import logging
|
||||
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
|
||||
from homeassistant.components.binary_sensor import BinarySensorDevice
|
||||
from homeassistant.components.esphome import EsphomeEntity, \
|
||||
platform_async_setup_entry
|
||||
|
||||
from . import EsphomeEntity, platform_async_setup_entry
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# pylint: disable=unused-import
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
"""Support for ESPHome covers."""
|
||||
import logging
|
||||
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
|
||||
from homeassistant.components.cover import CoverDevice, SUPPORT_CLOSE, \
|
||||
SUPPORT_OPEN, SUPPORT_STOP
|
||||
from homeassistant.components.esphome import EsphomeEntity, \
|
||||
platform_async_setup_entry
|
||||
from homeassistant.components.cover import (
|
||||
SUPPORT_CLOSE, SUPPORT_OPEN, SUPPORT_STOP, CoverDevice)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.helpers.typing import HomeAssistantType
|
||||
|
||||
from . import EsphomeEntity, platform_async_setup_entry
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# pylint: disable=unused-import
|
||||
from aioesphomeapi import CoverInfo, CoverState # noqa
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
"""Support for ESPHome fans."""
|
||||
import logging
|
||||
from typing import List, Optional, TYPE_CHECKING
|
||||
from typing import TYPE_CHECKING, List, Optional
|
||||
|
||||
from homeassistant.components.esphome import EsphomeEntity, \
|
||||
platform_async_setup_entry
|
||||
from homeassistant.components.fan import FanEntity, SPEED_HIGH, SPEED_LOW, \
|
||||
SPEED_MEDIUM, SUPPORT_OSCILLATE, SUPPORT_SET_SPEED, SPEED_OFF
|
||||
from homeassistant.components.fan import (
|
||||
SPEED_HIGH, SPEED_LOW, SPEED_MEDIUM, SPEED_OFF, SUPPORT_OSCILLATE,
|
||||
SUPPORT_SET_SPEED, FanEntity)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.helpers.typing import HomeAssistantType
|
||||
|
||||
from . import EsphomeEntity, platform_async_setup_entry
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# pylint: disable=unused-import
|
||||
from aioesphomeapi import FanInfo, FanState # noqa
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
"""Support for ESPHome lights."""
|
||||
import logging
|
||||
from typing import Optional, List, Tuple, TYPE_CHECKING
|
||||
from typing import TYPE_CHECKING, List, Optional, Tuple
|
||||
|
||||
from homeassistant.components.esphome import EsphomeEntity, \
|
||||
platform_async_setup_entry
|
||||
from homeassistant.components.light import Light, SUPPORT_FLASH, \
|
||||
SUPPORT_BRIGHTNESS, SUPPORT_TRANSITION, SUPPORT_COLOR, \
|
||||
SUPPORT_WHITE_VALUE, SUPPORT_COLOR_TEMP, SUPPORT_EFFECT, ATTR_HS_COLOR, \
|
||||
ATTR_FLASH, ATTR_TRANSITION, ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, \
|
||||
ATTR_EFFECT, ATTR_WHITE_VALUE, FLASH_SHORT, FLASH_LONG
|
||||
from homeassistant.components.light import (
|
||||
ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_EFFECT, ATTR_FLASH, ATTR_HS_COLOR,
|
||||
ATTR_TRANSITION, ATTR_WHITE_VALUE, FLASH_LONG, FLASH_SHORT,
|
||||
SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_COLOR_TEMP, SUPPORT_EFFECT,
|
||||
SUPPORT_FLASH, SUPPORT_TRANSITION, SUPPORT_WHITE_VALUE, Light)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.helpers.typing import HomeAssistantType
|
||||
import homeassistant.util.color as color_util
|
||||
|
||||
from . import EsphomeEntity, platform_async_setup_entry
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# pylint: disable=unused-import
|
||||
from aioesphomeapi import LightInfo, LightState # noqa
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
"""Support for esphome sensors."""
|
||||
import logging
|
||||
import math
|
||||
from typing import Optional, TYPE_CHECKING
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
|
||||
from homeassistant.components.esphome import EsphomeEntity, \
|
||||
platform_async_setup_entry
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.helpers.typing import HomeAssistantType
|
||||
|
||||
from . import EsphomeEntity, platform_async_setup_entry
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# pylint: disable=unused-import
|
||||
from aioesphomeapi import ( # noqa
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
"""Support for ESPHome switches."""
|
||||
import logging
|
||||
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
|
||||
from homeassistant.components.esphome import EsphomeEntity, \
|
||||
platform_async_setup_entry
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.helpers.typing import HomeAssistantType
|
||||
|
||||
from . import EsphomeEntity, platform_async_setup_entry
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# pylint: disable=unused-import
|
||||
from aioesphomeapi import SwitchInfo, SwitchState # noqa
|
||||
|
||||
Reference in new issue
Block a user