mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-06-28 19:50:06 +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):
|
||||
"""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
|
||||
|
||||
self.execute("/system/package/update", "check-for-updates", None, None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue