Modified variable hostname to host-name to keep inline with Mikrotik API

This commit is contained in:
Ivan Pavlina 2020-04-08 16:53:20 +02:00
parent 1bb90d51cd
commit 023f45cf26
2 changed files with 13 additions and 13 deletions

View file

@ -38,7 +38,7 @@ DEVICE_ATTRIBUTES_IFACE = [
]
DEVICE_ATTRIBUTES_HOST = [
"hostname",
"host-name",
"address",
"mac-address",
"interface",
@ -234,7 +234,7 @@ class MikrotikControllerHostDeviceTracker(ScannerEntity):
_LOGGER.debug(
"New host tracker %s (%s - %s)",
self._inst,
self._data["hostname"],
self._data["host-name"],
self._data["mac-address"],
)
@ -254,7 +254,7 @@ class MikrotikControllerHostDeviceTracker(ScannerEntity):
@property
def name(self):
"""Return the name of the host."""
return f"{self._data['hostname']}"
return f"{self._data['host-name']}"
@property
def unique_id(self):