mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-06-24 09:48:53 +02:00
rebase
This commit is contained in:
commit
c8728238af
10 changed files with 142 additions and 19 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