Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pyintesishome/intesishomelocal.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@
class IntesisHomeLocal(IntesisBase):
"""pyintesishome local class."""

def __init__(self, host, username, password, loop=None, websession=None) -> None:
def __init__(self, host, username, password, loop=None, websession=None, scan_interval=30) -> None:
"""Constructor"""
device_type = DEVICE_INTESISHOME_LOCAL
self._session_id: str = ""
self._datapoints: dict = {}
self._scan_interval = 6
self._scan_interval = scan_interval
# Ceiling on the backed-off poll interval while the device is
# failing. These units are not powerful, and polling a struggling
# one every _scan_interval can make matters worse.
self._max_scan_interval = 30
self._max_scan_interval = max(60, scan_interval * 2)
# Seconds without a successful poll before the device is reported
# as disconnected. Deliberately expressed as elapsed time rather
# than a failure count: a failed request can occupy anywhere from
Expand Down