mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-06-26 18:58:54 +02:00
Added sensors for total interface tx/rx bytes, fixes #210
This commit is contained in:
parent
574d3137b9
commit
981668032e
2 changed files with 44 additions and 0 deletions
|
@ -700,6 +700,8 @@ class MikrotikControllerData:
|
|||
{"name": "tx-previous", "default": 0.0},
|
||||
{"name": "rx", "default": 0.0},
|
||||
{"name": "tx", "default": 0.0},
|
||||
{"name": "rx-total", "default": 0.0},
|
||||
{"name": "tx-total", "default": 0.0},
|
||||
],
|
||||
skip=[
|
||||
{"name": "type", "value": "bridge"},
|
||||
|
@ -740,6 +742,9 @@ class MikrotikControllerData:
|
|||
)
|
||||
self.data["interface"][uid]["rx-previous"] = current_rx
|
||||
|
||||
self.data["interface"][uid]["tx-total"] = current_tx
|
||||
self.data["interface"][uid]["rx-total"] = current_rx
|
||||
|
||||
self.data["interface"] = parse_api(
|
||||
data=self.data["interface"],
|
||||
source=self.api.path("/interface/ethernet"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue