added force_fwupdate_check for time interval

This commit is contained in:
tomaae 2019-12-04 18:53:28 +01:00
parent 4954908bff
commit 0c5048160f

View file

@ -45,7 +45,7 @@ class MikrotikControllerData():
self.api = None
async_track_time_interval(self.hass, self.force_update, self.option_scan_interval)
async_track_time_interval(self.hass, self.async_fwupdate_check, timedelta(hours=1))
async_track_time_interval(self.hass, self.force_fwupdate_check, timedelta(hours=1))
return
@ -57,6 +57,14 @@ class MikrotikControllerData():
await self.async_update()
return
# ---------------------------
# force_fwupdate_check
# ---------------------------
async def force_update(self, now=None):
"""Periodic update."""
await self.async_fwupdate_check()
return
# ---------------------------
# option_track_arp
# ---------------------------