From a61dfa5ff7e1e6d2b744e0cdfeee08377e277e2d Mon Sep 17 00:00:00 2001 From: Tomaae <23486452+tomaae@users.noreply.github.com> Date: Thu, 7 Dec 2023 00:54:23 +0100 Subject: [PATCH] fixed uom for interfaces, fixes #325 --- custom_components/mikrotik_router/sensor_types.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/mikrotik_router/sensor_types.py b/custom_components/mikrotik_router/sensor_types.py index d61790e..49e75f5 100644 --- a/custom_components/mikrotik_router/sensor_types.py +++ b/custom_components/mikrotik_router/sensor_types.py @@ -448,7 +448,7 @@ SENSOR_TYPES: tuple[MikrotikSensorEntityDescription, ...] = ( key="tx-total", name="TX total", icon="mdi:upload-network", - native_unit_of_measurement=UnitOfInformation.BITS, + native_unit_of_measurement=UnitOfInformation.BYTES, suggested_unit_of_measurement=UnitOfInformation.GIGABYTES, suggested_display_precision=1, device_class=SensorDeviceClass.DATA_SIZE, @@ -469,7 +469,7 @@ SENSOR_TYPES: tuple[MikrotikSensorEntityDescription, ...] = ( key="rx-total", name="RX total", icon="mdi:download-network", - native_unit_of_measurement=UnitOfInformation.BITS, + native_unit_of_measurement=UnitOfInformation.BYTES, suggested_unit_of_measurement=UnitOfInformation.GIGABYTES, suggested_display_precision=1, device_class=SensorDeviceClass.DATA_SIZE,