mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-06-26 02:38:47 +02:00
added attributes to execute method, using it on check-for-updates. hardcoded 10 seconds for duration
This commit is contained in:
parent
251874bdc2
commit
22844e7ae5
2 changed files with 7 additions and 4 deletions
|
@ -387,9 +387,9 @@ class MikrotikControllerData:
|
|||
# ---------------------------
|
||||
# execute
|
||||
# ---------------------------
|
||||
def execute(self, path, command, param, value):
|
||||
def execute(self, path, command, param, value, attributes=None):
|
||||
"""Change value using Mikrotik API"""
|
||||
return self.api.execute(path, command, param, value)
|
||||
return self.api.execute(path, command, param, value, attributes)
|
||||
|
||||
# ---------------------------
|
||||
# run_script
|
||||
|
@ -1544,7 +1544,7 @@ class MikrotikControllerData:
|
|||
):
|
||||
return
|
||||
|
||||
self.execute("/system/package/update", "check-for-updates", None, None)
|
||||
self.execute("/system/package/update", "check-for-updates", None, None, {"duration": 10})
|
||||
self.data["fw-update"] = parse_api(
|
||||
data=self.data["fw-update"],
|
||||
source=self.api.query("/system/package/update"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue