poe variable check for virtual interfaces #100

This commit is contained in:
tomaae 2021-03-01 16:50:30 +01:00
parent ae3feb499e
commit 5fd9005811

View file

@ -321,7 +321,7 @@ class MikrotikControllerPortSwitch(MikrotikControllerSwitch):
mod_value = False
self._ctrl.set_value(path, param, value, mod_param, mod_value)
if self._data["poe-out"] == "off":
if "poe-out" in self._data and self._data["poe-out"] == "off":
path = "/interface/ethernet"
self._ctrl.set_value(path, param, value, "poe-out", "auto-on")