mirror of
https://github.com/home-assistant/core.git
synced 2025-07-11 07:17:12 +00:00
Move insteon base entity to separate module (#126099)
This commit is contained in:
parent
6dfa6b0001
commit
1afcbd02a9
@ -25,7 +25,7 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
|||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from .const import SIGNAL_ADD_ENTITIES
|
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
|
from .utils import async_add_insteon_devices, async_add_insteon_entities
|
||||||
|
|
||||||
SENSOR_TYPES = {
|
SENSOR_TYPES = {
|
||||||
|
@ -23,7 +23,7 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
|||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from .const import SIGNAL_ADD_ENTITIES
|
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
|
from .utils import async_add_insteon_devices, async_add_insteon_entities
|
||||||
|
|
||||||
FAN_ONLY = "fan_only"
|
FAN_ONLY = "fan_only"
|
||||||
|
@ -15,7 +15,7 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
|||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from .const import SIGNAL_ADD_ENTITIES
|
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
|
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 .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
|
from .utils import async_add_insteon_devices, async_add_insteon_entities
|
||||||
|
|
||||||
SPEED_RANGE = (1, 255) # off is not included
|
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 homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from .const import SIGNAL_ADD_ENTITIES
|
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
|
from .utils import async_add_insteon_devices, async_add_insteon_entities
|
||||||
|
|
||||||
MAX_BRIGHTNESS = 255
|
MAX_BRIGHTNESS = 255
|
||||||
|
@ -10,7 +10,7 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
|||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from .const import SIGNAL_ADD_ENTITIES
|
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
|
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 homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from .const import SIGNAL_ADD_ENTITIES
|
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
|
from .utils import async_add_insteon_devices, async_add_insteon_entities
|
||||||
|
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ from .schemas import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from .insteon_entity import InsteonEntity
|
from .entity import InsteonEntity
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import pytest
|
|||||||
from homeassistant.components import insteon
|
from homeassistant.components import insteon
|
||||||
from homeassistant.components.insteon import (
|
from homeassistant.components.insteon import (
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
insteon_entity,
|
entity as insteon_entity,
|
||||||
utils as insteon_utils,
|
utils as insteon_utils,
|
||||||
)
|
)
|
||||||
from homeassistant.components.lock import ( # SERVICE_LOCK,; SERVICE_UNLOCK,
|
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, "async_close"),
|
||||||
patch.object(insteon, "devices", devices),
|
patch.object(insteon, "devices", devices),
|
||||||
patch.object(insteon_utils, "devices", devices),
|
patch.object(insteon_utils, "devices", devices),
|
||||||
patch.object(
|
patch.object(insteon_entity, "devices", devices),
|
||||||
insteon_entity,
|
|
||||||
"devices",
|
|
||||||
devices,
|
|
||||||
),
|
|
||||||
):
|
):
|
||||||
yield
|
yield
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user