Skip to content

Commit

Permalink
poe variable check for virtual interfaces #100
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaae committed Mar 1, 2021
1 parent 5fd9005 commit c8e1e80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/mikrotik_router/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ async def async_turn_off(self) -> Optional[str]:
mod_value = True
self._ctrl.set_value(path, param, value, mod_param, mod_value)

if self._data["poe-out"] == "auto-on":
if "poe-out" in self._data and self._data["poe-out"] == "auto-on":
path = "/interface/ethernet"
self._ctrl.set_value(path, param, value, "poe-out", "off")

Expand Down

0 comments on commit c8e1e80

Please sign in to comment.