mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-13 10:54:33 +02:00
display customized interface name for port device tracker
This commit is contained in:
parent
6c31c1e35e
commit
480ef5988c
1 changed files with 4 additions and 2 deletions
|
@ -116,7 +116,7 @@ def update_items(inst, config_entry, mikrotik_controller, async_add_entities, tr
|
|||
# Data point unique id
|
||||
["default-name", "mac-address"],
|
||||
# Entry Name
|
||||
["default-name", "host-name"],
|
||||
["name", "host-name"],
|
||||
# Entry Unique id
|
||||
["port-mac-address", "mac-address"],
|
||||
# Tracker function
|
||||
|
@ -226,8 +226,10 @@ class MikrotikControllerDeviceTracker(ScannerEntity):
|
|||
},
|
||||
"manufacturer": self._ctrl.data["resource"]["platform"],
|
||||
"model": self._ctrl.data["resource"]["board-name"],
|
||||
"name": f"{self._inst} {self._data[self._sid_data['sid_name']]}",
|
||||
"name": self._data[self._sid_data["sid_name"]],
|
||||
}
|
||||
if self._sid_data["sid"] == "interface":
|
||||
info["name"] = f"{self._inst} {self._data[self._sid_data['sid_name']]}"
|
||||
return info
|
||||
|
||||
@property
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue