From 6de1a940eddf44b5785a82a3497ce5c6d83b7da2 Mon Sep 17 00:00:00 2001 From: Brendan Le Foll Date: Fri, 4 Oct 2024 16:03:33 +0200 Subject: [PATCH] Update sensor_types.py: Add system poe out Add POE total power consumption - at least on CRS328-24P --- .../mikrotik_router/sensor_types.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/custom_components/mikrotik_router/sensor_types.py b/custom_components/mikrotik_router/sensor_types.py index 49e75f5..ad9ea44 100644 --- a/custom_components/mikrotik_router/sensor_types.py +++ b/custom_components/mikrotik_router/sensor_types.py @@ -235,6 +235,23 @@ class MikrotikSensorEntityDescription(SensorEntityDescription): data_uid="", data_reference="", ), + MikrotikSensorEntityDescription( + key="system_poe_out_consumption", + name="PoE out power consumption", + icon="mdi:flash", + native_unit_of_measurement=UnitOfPower.WATT, + suggested_unit_of_measurement=UnitOfPower.WATT, + suggested_display_precision=1, + device_class=SensorDeviceClass.POWER, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + ha_group="System", + data_path="health", + data_attribute="poe-out-consumption", + data_name="", + data_uid="", + data_reference="", + ), MikrotikSensorEntityDescription( key="system_fan1-speed", name="Fan1 speed",