diff --git a/src/mash/bridges/fritzbox.py b/src/mash/bridges/fritzbox.py index 89a10d4..9370a29 100644 --- a/src/mash/bridges/fritzbox.py +++ b/src/mash/bridges/fritzbox.py @@ -10,7 +10,14 @@ EXCEPTION_RECONNECT_TIMEOUT_SEC = 60 class FritzDeviceState: + """Holds the state of a fritzbox device and implements comparisons.""" + def __init__(self, mac_address: str, raw_state: dict) -> None: + """ + Args: + mac_address (str): Mac Address of fritzbox device. + raw_state (dict): Raw device state containing NewActive, NewIPAddress, NewAddressSource, NewLeaseTimeRemaining, NewInterfaceType & NewHostName. + """ logging.debug( f"Fritz raw device state to mac [{mac_address}]: {raw_state}", extra=raw_state, @@ -48,6 +55,13 @@ class FritzBoxBridge(Bridge): port: Optional[int] = None, refresh_delay_sec: int = 60, ) -> None: + """ + Args: + id (str): Id of fritzbox bridge. + ip (str): IP Address of fritzbox bridge in network to connect to. + port (Optional[int], optional): Port of fritzbox bridge in network to connect to. Defaults to None. + refresh_delay_sec (int, optional): Delay between pull cycles to get recent states from fritzbox in seconds. Defaults to 60. + """ super().__init__(id=id, type="fritzbox") self._ip = ip self._port = port