Workaround for 7.17 missing /system/health in some devices, fixes #392

This commit is contained in:
Tomaae 2025-05-01 13:10:17 +02:00
parent 6905bcb6b5
commit 477c68cf55
No known key found for this signature in database
GPG key ID: 60C51A657EEF2D87
2 changed files with 13 additions and 2 deletions

View file

@ -1428,8 +1428,9 @@ class MikrotikCoordinator(DataUpdateCoordinator[None]):
{"name": "value", "default": "unknown"},
],
)
for uid, vals in self.ds["health7"].items():
self.ds["health"][uid] = vals["value"]
if self.ds["health7"]:
for uid, vals in self.ds["health7"].items():
self.ds["health"][uid] = vals["value"]
# ---------------------------
# get_system_resource