added wifi information to interfaces

This commit is contained in:
Tomaae 2022-08-21 22:27:49 +02:00
parent 5520b25c0f
commit c5570b6d5e
No known key found for this signature in database
GPG key ID: 8360BBD8A381D1C0
3 changed files with 83 additions and 0 deletions

View file

@ -12,6 +12,7 @@ from .switch_types import (
SENSOR_SERVICES,
DEVICE_ATTRIBUTES_IFACE_ETHER,
DEVICE_ATTRIBUTES_IFACE_SFP,
DEVICE_ATTRIBUTES_IFACE_WIRELESS,
)
_LOGGER = logging.getLogger(__name__)
@ -114,6 +115,11 @@ class MikrotikPortSwitch(MikrotikSwitch):
if variable in self._data:
attributes[format_attribute(variable)] = self._data[variable]
elif self._data["type"] == "wlan":
for variable in DEVICE_ATTRIBUTES_IFACE_WIRELESS:
if variable in self._data:
attributes[format_attribute(variable)] = self._data[variable]
return attributes
@property