Resolve device manufacturer for tracked devices #67

This commit is contained in:
tomaae 2020-12-03 16:41:06 +01:00
parent 0976f880a1
commit 5e7ae94cea
4 changed files with 30 additions and 7 deletions

View file

@ -432,10 +432,11 @@ class MikrotikAccountingSensor(MikrotikControllerSensor):
"""Return a accounting description for device registry."""
info = {
"connections": {(CONNECTION_NETWORK_MAC, self._data["mac-address"])},
# "manufacturer": self._ctrl.data["resource"]["platform"],
# "model": self._ctrl.data["resource"]["board-name"],
"default_name": self._data["host-name"],
}
if self._data["manufacturer"] != "":
info["manufacturer"] = self._data["manufacturer"]
return info
@property