diff --git a/custom_components/mikrotik_router/sensor_types.py b/custom_components/mikrotik_router/sensor_types.py index 105a0f6..0a74202 100644 --- a/custom_components/mikrotik_router/sensor_types.py +++ b/custom_components/mikrotik_router/sensor_types.py @@ -19,6 +19,7 @@ from homeassistant.const import ( UnitOfDataRate, UnitOfInformation, UnitOfElectricPotential, + UnitOfElectricCurrent, UnitOfPower, ) @@ -300,6 +301,121 @@ SENSOR_TYPES: tuple[MikrotikSensorEntityDescription, ...] = ( data_uid="", data_reference="", ), + MikrotikSensorEntityDescription( + key="system_fan3-speed", + name="Fan3 speed", + icon="mdi:fan", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + device_class=None, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + ha_group="System", + data_path="health", + data_attribute="fan3-speed", + data_name="", + data_uid="", + data_reference="", + ), + MikrotikSensorEntityDescription( + key="system_fan4-speed", + name="Fan4 speed", + icon="mdi:fan", + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + device_class=None, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + ha_group="System", + data_path="health", + data_attribute="fan4-speed", + data_name="", + data_uid="", + data_reference="", + ), + MikrotikSensorEntityDescription( + key="system_poe_out_consumption", + name="PoE out power consumption", + icon="mdi:transmission-tower", + 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_psu1_current", + name="PSU 1 power consumption", + icon="mdi:lightning-bolt-circle", + native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, + suggested_unit_of_measurement=UnitOfElectricCurrent.MILLIAMPERE, + suggested_display_precision=1, + device_class=SensorDeviceClass.CURRENT, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + ha_group="System", + data_path="health", + data_attribute="psu1-current", + data_name="", + data_uid="", + data_reference="", + ), + MikrotikSensorEntityDescription( + key="system_psu1_voltage", + name="PSU 1 Voltage", + icon="mdi:lightning-bolt", + native_unit_of_measurement=UnitOfElectricPotential.VOLT, + suggested_unit_of_measurement=UnitOfElectricPotential.VOLT, + suggested_display_precision=1, + device_class=SensorDeviceClass.VOLTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + ha_group="System", + data_path="health", + data_attribute="psu1-voltage", + data_name="", + data_uid="", + data_reference="", + ), + MikrotikSensorEntityDescription( + key="system_psu2_current", + name="PSU 2 power consumption", + icon="mdi:lightning-bolt-circle", + native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, + suggested_unit_of_measurement=UnitOfElectricCurrent.MILLIAMPERE, + suggested_display_precision=1, + device_class=SensorDeviceClass.CURRENT, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + ha_group="System", + data_path="health", + data_attribute="psu2-current", + data_name="", + data_uid="", + data_reference="", + ), + MikrotikSensorEntityDescription( + key="system_psu2_voltage", + name="PSU 2 Voltage", + icon="mdi:lightning-bolt", + native_unit_of_measurement=UnitOfElectricPotential.VOLT, + suggested_unit_of_measurement=UnitOfElectricPotential.VOLT, + suggested_display_precision=1, + device_class=SensorDeviceClass.VOLTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + ha_group="System", + data_path="health", + data_attribute="psu2-voltage", + data_name="", + data_uid="", + data_reference="", + ), MikrotikSensorEntityDescription( key="system_uptime", name="Uptime",