mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-10 09:24:31 +02:00
Allow integration to run with limited access rights #235
This commit is contained in:
parent
58f931ad8e
commit
9667dcc171
1 changed files with 5 additions and 1 deletions
|
@ -1528,7 +1528,11 @@ class MikrotikControllerData:
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
def get_firmware_update(self):
|
def get_firmware_update(self):
|
||||||
"""Check for firmware update on Mikrotik"""
|
"""Check for firmware update on Mikrotik"""
|
||||||
if "write" not in self.data["access"] or "policy" not in self.data["access"]:
|
if (
|
||||||
|
"write" not in self.data["access"]
|
||||||
|
or "policy" not in self.data["access"]
|
||||||
|
or "reboot" not in self.data["access"]
|
||||||
|
):
|
||||||
return
|
return
|
||||||
|
|
||||||
self.execute("/system/package/update", "check-for-updates", None, None)
|
self.execute("/system/package/update", "check-for-updates", None, None)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue