Added documentation
This commit is contained in:
parent
ff7b23b716
commit
91552bafb6
1 changed files with 14 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue