From a8606411d9cad5ec1ba37da2b43de98430f96b34 Mon Sep 17 00:00:00 2001 From: tomaae <23486452+tomaae@users.noreply.github.com> Date: Fri, 26 Jun 2020 16:35:40 +0200 Subject: [PATCH] Added traffic sensors to ppp and wireless interfaces #48 --- custom_components/mikrotik_router/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/mikrotik_router/sensor.py b/custom_components/mikrotik_router/sensor.py index 8753923..d59c5d9 100644 --- a/custom_components/mikrotik_router/sensor.py +++ b/custom_components/mikrotik_router/sensor.py @@ -181,7 +181,7 @@ def update_items(inst, mikrotik_controller, async_add_entities, sensors): if "traffic_" in sensor: for uid in mikrotik_controller.data["interface"]: - if mikrotik_controller.data["interface"][uid]["type"] == "ether": + if mikrotik_controller.data["interface"][uid]["type"] != "bridge": item_id = f"{inst}-{sensor}-{mikrotik_controller.data['interface'][uid]['default-name']}" _LOGGER.debug("Updating sensor %s", item_id) if item_id in sensors: