mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-08-14 06:38:36 +02:00
added wifi information to interfaces
This commit is contained in:
parent
5520b25c0f
commit
c5570b6d5e
3 changed files with 83 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue