diff --git a/custom_components/mikrotik_router/sensor.py b/custom_components/mikrotik_router/sensor.py index 8a4feb0..708cb35 100644 --- a/custom_components/mikrotik_router/sensor.py +++ b/custom_components/mikrotik_router/sensor.py @@ -185,7 +185,6 @@ def update_items(inst, mikrotik_controller, async_add_entities, sensors): if "accounting_" in sensor: for uid in mikrotik_controller.data["accounting"]: - item_id = f"{inst}-{sensor}-{mikrotik_controller.data['accounting'][uid]['mac-address']}" if item_id in sensors: if sensors[item_id].enabled: @@ -366,7 +365,7 @@ class MikrotikAccountingSensor(MikrotikControllerSensor): @property def name(self): """Return the name.""" - return f"{self._data['host-name']} {self._type[ATTR_LABEL]} " + return f"{self._data['host-name']} {self._type[ATTR_LABEL]}" @property def unique_id(self):