1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
"""Xiaomi Gateway device base class."""
import logging
from typing import TYPE_CHECKING, List
from ..exceptions import DeviceException
_LOGGER = logging.getLogger(__name__)
# Necessary due to circular deps
if TYPE_CHECKING:
from .gateway import Gateway
class GatewayDevice:
"""GatewayDevice class Specifies the init method for all gateway device
functionalities."""
_supported_models = ["dummy.device"]
def __init__(
self,
parent: "Gateway" = None,
) -> None:
if parent is None:
raise DeviceException(
"This should never be initialized without gateway object."
)
self._gateway = parent
self._event_ids: List[str] = []
|