mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-06-23 17:28:51 +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
|
@ -258,7 +258,7 @@ class MikrotikAPI:
|
|||
# ---------------------------
|
||||
# execute
|
||||
# ---------------------------
|
||||
def execute(self, path, command, param, value) -> bool:
|
||||
def execute(self, path, command, param, value, attributes=None) -> bool:
|
||||
"""Execute a command"""
|
||||
entry_found = None
|
||||
params = {}
|
||||
|
@ -292,6 +292,9 @@ class MikrotikAPI:
|
|||
|
||||
params = {".id": entry_found}
|
||||
|
||||
if attributes:
|
||||
params.update(attributes)
|
||||
|
||||
self.lock.acquire()
|
||||
try:
|
||||
tuple(response(command, **params))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue