mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-09 17:04:29 +02:00
show mikrotik model name on integration screen
append device name in front of entities
This commit is contained in:
parent
f95e87ed32
commit
3289c57b7a
2 changed files with 4 additions and 5 deletions
|
@ -126,7 +126,7 @@ class MikrotikControllerPortDeviceTracker(ScannerEntity):
|
|||
@property
|
||||
def name(self) -> str:
|
||||
"""Return the name of the port."""
|
||||
return self.mikrotik_controller.data['interface'][self._uid]['default-name']
|
||||
return f"{self._name} {self.mikrotik_controller.data['interface'][self._uid]['default-name']}"
|
||||
|
||||
@property
|
||||
def unique_id(self) -> str:
|
||||
|
@ -157,7 +157,7 @@ class MikrotikControllerPortDeviceTracker(ScannerEntity):
|
|||
info = {
|
||||
"connections": {(CONNECTION_NETWORK_MAC, self.mikrotik_controller.data['interface'][self._uid]['port-mac-address'])},
|
||||
"manufacturer": self.mikrotik_controller.data['resource']['platform'],
|
||||
"model": "Port",
|
||||
"model": self.mikrotik_controller.data['resource']['board-name'],
|
||||
"name": self.mikrotik_controller.data['interface'][self._uid]['default-name'],
|
||||
}
|
||||
return info
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue