mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-23 12:04:31 +02:00
changed unique_id's for device trackers to distinguish between interface and host #24
This commit is contained in:
parent
a0ebb9a6cf
commit
5521d01e33
1 changed files with 2 additions and 2 deletions
|
@ -164,7 +164,7 @@ class MikrotikControllerPortDeviceTracker(ScannerEntity):
|
|||
@property
|
||||
def unique_id(self):
|
||||
"""Return a unique identifier for this port."""
|
||||
return f"{self._inst.lower()}-{self._data['port-mac-address']}"
|
||||
return f"{self._inst.lower()}-interface-{self._data['port-mac-address']}"
|
||||
|
||||
@property
|
||||
def available(self) -> bool:
|
||||
|
@ -259,7 +259,7 @@ class MikrotikControllerHostDeviceTracker(ScannerEntity):
|
|||
@property
|
||||
def unique_id(self):
|
||||
"""Return a unique identifier for this host."""
|
||||
return f"{self._inst.lower()}-{self._data['mac-address']}"
|
||||
return f"{self._inst.lower()}-host-{self._data['mac-address']}"
|
||||
|
||||
@property
|
||||
def available(self) -> bool:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue