mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-12 18:34:30 +02:00
Fixed grouping of accounting entities
This commit is contained in:
parent
aee33b8c13
commit
39c31cb84a
1 changed files with 11 additions and 4 deletions
|
@ -379,13 +379,20 @@ class MikrotikAccountingSensor(MikrotikControllerSensor):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def device_info(self):
|
def device_info(self):
|
||||||
"""Return a port description for device registry."""
|
"""Return a accounting description for device registry."""
|
||||||
info = {
|
info = {
|
||||||
"connections": {
|
"identifiers": {
|
||||||
(CONNECTION_NETWORK_MAC, self._data["mac-address"])},
|
(
|
||||||
|
DOMAIN,
|
||||||
|
"serial-number",
|
||||||
|
self._ctrl.data["routerboard"]["serial-number"],
|
||||||
|
"sensor",
|
||||||
|
"Accounting"
|
||||||
|
)
|
||||||
|
},
|
||||||
"manufacturer": self._ctrl.data["resource"]["platform"],
|
"manufacturer": self._ctrl.data["resource"]["platform"],
|
||||||
"model": self._ctrl.data["resource"]["board-name"],
|
"model": self._ctrl.data["resource"]["board-name"],
|
||||||
"name": SENSOR_TYPES[ATTR_GROUP],
|
"name": self._type[ATTR_GROUP],
|
||||||
}
|
}
|
||||||
return info
|
return info
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue