From 9667dcc171b745fe4b342fa816b6063a3d57c4af Mon Sep 17 00:00:00 2001 From: Tomaae <23486452+tomaae@users.noreply.github.com> Date: Sat, 20 Aug 2022 01:43:54 +0200 Subject: [PATCH] Allow integration to run with limited access rights #235 --- custom_components/mikrotik_router/mikrotik_controller.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/custom_components/mikrotik_router/mikrotik_controller.py b/custom_components/mikrotik_router/mikrotik_controller.py index dd6754f..3faaa23 100644 --- a/custom_components/mikrotik_router/mikrotik_controller.py +++ b/custom_components/mikrotik_router/mikrotik_controller.py @@ -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)