mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-02 13:34:30 +02:00
added support for virtual interfaces #12
This commit is contained in:
parent
99d6d7c43b
commit
cd4d0a09ee
3 changed files with 31 additions and 5 deletions
|
@ -226,6 +226,8 @@ class MikrotikControllerPortSwitch(MikrotikControllerSwitch):
|
|||
"""Turn on the switch."""
|
||||
path = "/interface"
|
||||
param = "default-name"
|
||||
if "-" in self._data["port-mac-address"]:
|
||||
param = "name"
|
||||
value = self._data[param]
|
||||
mod_param = "disabled"
|
||||
mod_value = False
|
||||
|
@ -236,6 +238,8 @@ class MikrotikControllerPortSwitch(MikrotikControllerSwitch):
|
|||
"""Turn on the switch."""
|
||||
path = "/interface"
|
||||
param = "default-name"
|
||||
if "-" in self._data["port-mac-address"]:
|
||||
param = "name"
|
||||
value = self._data[param]
|
||||
mod_param = "disabled"
|
||||
mod_value = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue