Move insteon base entity to separate module (#126099)
parent
6dfa6b0001
commit
1afcbd02a9
|
@ -25,7 +25,7 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
|||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from .const import SIGNAL_ADD_ENTITIES
|
||||
from .insteon_entity import InsteonEntity
|
||||
from .entity import InsteonEntity
|
||||
from .utils import async_add_insteon_devices, async_add_insteon_entities
|
||||
|
||||
SENSOR_TYPES = {
|
||||
|
|
|
@ -23,7 +23,7 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
|||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from .const import SIGNAL_ADD_ENTITIES
|
||||
from .insteon_entity import InsteonEntity
|
||||
from .entity import InsteonEntity
|
||||
from .utils import async_add_insteon_devices, async_add_insteon_entities
|
||||
|
||||
FAN_ONLY = "fan_only"
|
||||
|
|
|
@ -15,7 +15,7 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
|||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from .const import SIGNAL_ADD_ENTITIES
|
||||
from .insteon_entity import InsteonEntity
|
||||
from .entity import InsteonEntity
|
||||
from .utils import async_add_insteon_devices, async_add_insteon_entities
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ from homeassistant.util.percentage import (
|
|||
)
|
||||
|
||||
from .const import SIGNAL_ADD_ENTITIES
|
||||
from .insteon_entity import InsteonEntity
|
||||
from .entity import InsteonEntity
|
||||
from .utils import async_add_insteon_devices, async_add_insteon_entities
|
||||
|
||||
SPEED_RANGE = (1, 255) # off is not included
|
||||
|
|
|
@ -13,7 +13,7 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
|||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from .const import SIGNAL_ADD_ENTITIES
|
||||
from .insteon_entity import InsteonEntity
|
||||
from .entity import InsteonEntity
|
||||
from .utils import async_add_insteon_devices, async_add_insteon_entities
|
||||
|
||||
MAX_BRIGHTNESS = 255
|
||||
|
|
|
@ -10,7 +10,7 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
|||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from .const import SIGNAL_ADD_ENTITIES
|
||||
from .insteon_entity import InsteonEntity
|
||||
from .entity import InsteonEntity
|
||||
from .utils import async_add_insteon_devices, async_add_insteon_entities
|
||||
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
|||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from .const import SIGNAL_ADD_ENTITIES
|
||||
from .insteon_entity import InsteonEntity
|
||||
from .entity import InsteonEntity
|
||||
from .utils import async_add_insteon_devices, async_add_insteon_entities
|
||||
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ from .schemas import (
|
|||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .insteon_entity import InsteonEntity
|
||||
from .entity import InsteonEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import pytest
|
|||
from homeassistant.components import insteon
|
||||
from homeassistant.components.insteon import (
|
||||
DOMAIN,
|
||||
insteon_entity,
|
||||
entity as insteon_entity,
|
||||
utils as insteon_utils,
|
||||
)
|
||||
from homeassistant.components.lock import ( # SERVICE_LOCK,; SERVICE_UNLOCK,
|
||||
|
@ -48,11 +48,7 @@ def patch_setup_and_devices():
|
|||
patch.object(insteon, "async_close"),
|
||||
patch.object(insteon, "devices", devices),
|
||||
patch.object(insteon_utils, "devices", devices),
|
||||
patch.object(
|
||||
insteon_entity,
|
||||
"devices",
|
||||
devices,
|
||||
),
|
||||
patch.object(insteon_entity, "devices", devices),
|
||||
):
|
||||
yield
|
||||
|
||||
|
|
Loading…
Reference in New Issue