added option to set polling interval
This commit is contained in:
1 parent
6361e661c0
commit
ed10127a90
6 files changed
+26
-7
No files matched your search
@@ -129,13 +129,13 @@ class DummyDevice(BluettiDevice):
|
||||
class PollingCoordinator(DataUpdateCoordinator):
|
||||
"""Polling coordinator."""
|
||||
|
||||
def __init__(self, hass: HomeAssistant, address, device_name: str):
|
||||
def __init__(self, hass: HomeAssistant, address, device_name: str, polling_interval: int):
|
||||
"""Initialize coordinator."""
|
||||
super().__init__(
|
||||
hass,
|
||||
_LOGGER,
|
||||
name="Bluetti polling coordinator",
|
||||
update_interval=timedelta(seconds=20),
|
||||
update_interval=timedelta(seconds=polling_interval),
|
||||
)
|
||||
self._address = address
|
||||
self.notify_future = None
|
||||
|
||||
Reference in new issue
Block a user