Move mysensors base entity to separate module (#126105)
This commit is contained in:
parent
7fee61db84
commit
4d140d81f9
13 changed files with 12 additions and 12 deletions
|
@ -23,7 +23,7 @@ from .const import (
|
||||||
DiscoveryInfo,
|
DiscoveryInfo,
|
||||||
SensorType,
|
SensorType,
|
||||||
)
|
)
|
||||||
from .device import MySensorsChildEntity, get_mysensors_devices
|
from .entity import MySensorsChildEntity, get_mysensors_devices
|
||||||
from .gateway import finish_setup, gw_stop, setup_gateway
|
from .gateway import finish_setup, gw_stop, setup_gateway
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
|
@ -19,7 +19,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from . import setup_mysensors_platform
|
from . import setup_mysensors_platform
|
||||||
from .const import MYSENSORS_DISCOVERY, DiscoveryInfo
|
from .const import MYSENSORS_DISCOVERY, DiscoveryInfo
|
||||||
from .device import MySensorsChildEntity
|
from .entity import MySensorsChildEntity
|
||||||
from .helpers import on_unload
|
from .helpers import on_unload
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ from homeassistant.util.unit_system import METRIC_SYSTEM
|
||||||
|
|
||||||
from . import setup_mysensors_platform
|
from . import setup_mysensors_platform
|
||||||
from .const import MYSENSORS_DISCOVERY, DiscoveryInfo
|
from .const import MYSENSORS_DISCOVERY, DiscoveryInfo
|
||||||
from .device import MySensorsChildEntity
|
from .entity import MySensorsChildEntity
|
||||||
from .helpers import on_unload
|
from .helpers import on_unload
|
||||||
|
|
||||||
DICT_HA_TO_MYS = {
|
DICT_HA_TO_MYS = {
|
||||||
|
|
|
@ -14,7 +14,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from . import setup_mysensors_platform
|
from . import setup_mysensors_platform
|
||||||
from .const import MYSENSORS_DISCOVERY, DiscoveryInfo
|
from .const import MYSENSORS_DISCOVERY, DiscoveryInfo
|
||||||
from .device import MySensorsChildEntity
|
from .entity import MySensorsChildEntity
|
||||||
from .helpers import on_unload
|
from .helpers import on_unload
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from . import setup_mysensors_platform
|
from . import setup_mysensors_platform
|
||||||
from .const import MYSENSORS_DISCOVERY, DiscoveryInfo
|
from .const import MYSENSORS_DISCOVERY, DiscoveryInfo
|
||||||
from .device import MySensorsChildEntity
|
from .entity import MySensorsChildEntity
|
||||||
from .helpers import on_unload
|
from .helpers import on_unload
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||||
from homeassistant.util import decorator
|
from homeassistant.util import decorator
|
||||||
|
|
||||||
from .const import CHILD_CALLBACK, NODE_CALLBACK, DevId, GatewayId
|
from .const import CHILD_CALLBACK, NODE_CALLBACK, DevId, GatewayId
|
||||||
from .device import get_mysensors_devices
|
from .entity import get_mysensors_devices
|
||||||
from .helpers import (
|
from .helpers import (
|
||||||
discover_mysensors_node,
|
discover_mysensors_node,
|
||||||
discover_mysensors_platform,
|
discover_mysensors_platform,
|
||||||
|
|
|
@ -20,7 +20,7 @@ from homeassistant.util.color import rgb_hex_to_rgb_list
|
||||||
|
|
||||||
from . import setup_mysensors_platform
|
from . import setup_mysensors_platform
|
||||||
from .const import MYSENSORS_DISCOVERY, DiscoveryInfo, SensorType
|
from .const import MYSENSORS_DISCOVERY, DiscoveryInfo, SensorType
|
||||||
from .device import MySensorsChildEntity
|
from .entity import MySensorsChildEntity
|
||||||
from .helpers import on_unload
|
from .helpers import on_unload
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from . import setup_mysensors_platform
|
from . import setup_mysensors_platform
|
||||||
from .const import MYSENSORS_DISCOVERY, DiscoveryInfo
|
from .const import MYSENSORS_DISCOVERY, DiscoveryInfo
|
||||||
from .device import MySensorsChildEntity
|
from .entity import MySensorsChildEntity
|
||||||
from .helpers import on_unload
|
from .helpers import on_unload
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ from .const import (
|
||||||
DiscoveryInfo,
|
DiscoveryInfo,
|
||||||
NodeDiscoveryInfo,
|
NodeDiscoveryInfo,
|
||||||
)
|
)
|
||||||
from .device import MySensorNodeEntity, MySensorsChildEntity
|
from .entity import MySensorNodeEntity, MySensorsChildEntity
|
||||||
from .helpers import on_unload
|
from .helpers import on_unload
|
||||||
|
|
||||||
SENSORS: dict[str, SensorEntityDescription] = {
|
SENSORS: dict[str, SensorEntityDescription] = {
|
||||||
|
|
|
@ -13,7 +13,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from . import setup_mysensors_platform
|
from . import setup_mysensors_platform
|
||||||
from .const import MYSENSORS_DISCOVERY, DiscoveryInfo, SensorType
|
from .const import MYSENSORS_DISCOVERY, DiscoveryInfo, SensorType
|
||||||
from .device import MySensorsChildEntity
|
from .entity import MySensorsChildEntity
|
||||||
from .helpers import on_unload
|
from .helpers import on_unload
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from . import setup_mysensors_platform
|
from . import setup_mysensors_platform
|
||||||
from .const import MYSENSORS_DISCOVERY, DiscoveryInfo
|
from .const import MYSENSORS_DISCOVERY, DiscoveryInfo
|
||||||
from .device import MySensorsChildEntity
|
from .entity import MySensorsChildEntity
|
||||||
from .helpers import on_unload
|
from .helpers import on_unload
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ async def integration_fixture(
|
||||||
config: dict[str, Any] = {}
|
config: dict[str, Any] = {}
|
||||||
config_entry.add_to_hass(hass)
|
config_entry.add_to_hass(hass)
|
||||||
with patch(
|
with patch(
|
||||||
"homeassistant.components.mysensors.device.Debouncer", autospec=True
|
"homeassistant.components.mysensors.entity.Debouncer", autospec=True
|
||||||
) as debouncer_class:
|
) as debouncer_class:
|
||||||
|
|
||||||
def debouncer(
|
def debouncer(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue