Added traffic sensors to ppp and wireless interfaces #48

This commit is contained in:
tomaae 2020-06-26 16:35:40 +02:00
parent 59c57efb25
commit a8606411d9

View file

@ -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: