mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-21 14:58:02 +00:00
Make timeout adjustable (#494)
This commit is contained in:
@@ -195,6 +195,7 @@ class SmartDevice:
|
||||
*,
|
||||
port: Optional[int] = None,
|
||||
credentials: Optional[Credentials] = None,
|
||||
timeout: Optional[int] = None,
|
||||
) -> None:
|
||||
"""Create a new SmartDevice instance.
|
||||
|
||||
@@ -203,7 +204,7 @@ class SmartDevice:
|
||||
self.host = host
|
||||
self.port = port
|
||||
|
||||
self.protocol = TPLinkSmartHomeProtocol(host, port=port)
|
||||
self.protocol = TPLinkSmartHomeProtocol(host, port=port, timeout=timeout)
|
||||
self.credentials = credentials
|
||||
_LOGGER.debug("Initializing %s of type %s", self.host, type(self))
|
||||
self._device_type = DeviceType.Unknown
|
||||
|
Reference in New Issue
Block a user