Added default name to port uid #60

This commit is contained in:
tomaae 2020-12-02 11:43:10 +01:00
parent 1e109f3dc6
commit 71a4b7c812
2 changed files with 6 additions and 1 deletions

View file

@ -233,7 +233,7 @@ class MikrotikControllerPortSwitch(MikrotikControllerSwitch):
@property
def unique_id(self) -> str:
"""Return a unique identifier for this port."""
return f"{self._inst.lower()}-enable_switch-{self._data['port-mac-address']}"
return f"{self._inst.lower()}-enable_switch-{self._data['port-mac-address']}_{self._data['default-name']}"
@property
def icon(self):