mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-10 17:34:29 +02:00
If comment is available, use it for a name #75
This commit is contained in:
parent
cef6710f1b
commit
d601a055fd
1 changed files with 3 additions and 0 deletions
|
@ -406,6 +406,9 @@ class MikrotikControllerMangleSwitch(MikrotikControllerSwitch):
|
|||
@property
|
||||
def name(self) -> str:
|
||||
"""Return the name of the Mangle switch."""
|
||||
if self._data["comment"]:
|
||||
return f"{self._inst} Mangle {self._data['comment']}"
|
||||
|
||||
return f"{self._inst} Mangle {self._data['name']}"
|
||||
|
||||
@property
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue