diff --git a/homeassistant/components/mikrotik/sensor.py b/homeassistant/components/mikrotik/sensor.py index 5c31f4890fde..be3126151c0b 100644 --- a/homeassistant/components/mikrotik/sensor.py +++ b/homeassistant/components/mikrotik/sensor.py @@ -12,7 +12,9 @@ from homeassistant.components.sensor import ( ) from homeassistant.const import ( EntityCategory, + UnitOfElectricCurrent, UnitOfElectricPotential, + UnitOfPower, UnitOfRatio, UnitOfTemperature, ) @@ -42,6 +44,59 @@ SENSORS: Final = ( native_unit_of_measurement=UnitOfTemperature.CELSIUS, type=HEALTH, ), + MikrotikSensorEntityDescription( + key="board-temperature1", + translation_key="board_temperature", + translation_placeholders={"index": "1"}, + device_class=SensorDeviceClass.TEMPERATURE, + entity_category=EntityCategory.DIAGNOSTIC, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + type=HEALTH, + ), + MikrotikSensorEntityDescription( + key="cpu-temperature", + translation_key="cpu_temperature", + device_class=SensorDeviceClass.TEMPERATURE, + entity_category=EntityCategory.DIAGNOSTIC, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + type=HEALTH, + ), + MikrotikSensorEntityDescription( + key="psu1-current", + translation_key="psu_current", + translation_placeholders={"index": "1"}, + device_class=SensorDeviceClass.CURRENT, + entity_category=EntityCategory.DIAGNOSTIC, + native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, + type=HEALTH, + ), + MikrotikSensorEntityDescription( + key="psu2-current", + translation_key="psu_current", + translation_placeholders={"index": "2"}, + device_class=SensorDeviceClass.CURRENT, + entity_category=EntityCategory.DIAGNOSTIC, + native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, + type=HEALTH, + ), + MikrotikSensorEntityDescription( + key="psu1-voltage", + translation_key="psu_voltage", + translation_placeholders={"index": "1"}, + device_class=SensorDeviceClass.VOLTAGE, + entity_category=EntityCategory.DIAGNOSTIC, + native_unit_of_measurement=UnitOfElectricPotential.VOLT, + type=HEALTH, + ), + MikrotikSensorEntityDescription( + key="psu2-voltage", + translation_key="psu_voltage", + translation_placeholders={"index": "2"}, + device_class=SensorDeviceClass.VOLTAGE, + entity_category=EntityCategory.DIAGNOSTIC, + native_unit_of_measurement=UnitOfElectricPotential.VOLT, + type=HEALTH, + ), MikrotikSensorEntityDescription( key="voltage", device_class=SensorDeviceClass.VOLTAGE, @@ -49,6 +104,14 @@ SENSORS: Final = ( native_unit_of_measurement=UnitOfElectricPotential.VOLT, type=HEALTH, ), + MikrotikSensorEntityDescription( + key="poe-out-consumption", + translation_key="poe_out_consumption", + device_class=SensorDeviceClass.POWER, + entity_category=EntityCategory.DIAGNOSTIC, + native_unit_of_measurement=UnitOfPower.WATT, + type=HEALTH, + ), MikrotikSensorEntityDescription( key="cpu-load", translation_key="cpu_load", diff --git a/homeassistant/components/mikrotik/strings.json b/homeassistant/components/mikrotik/strings.json index 43a56dd00b20..cb716f57dca9 100644 --- a/homeassistant/components/mikrotik/strings.json +++ b/homeassistant/components/mikrotik/strings.json @@ -61,14 +61,29 @@ } }, "sensor": { + "board_temperature": { + "name": "Board temperature {index}" + }, "cpu_load": { "name": "CPU usage" }, + "cpu_temperature": { + "name": "CPU temperature" + }, "disk_usage": { "name": "Disk usage" }, "memory_usage": { "name": "Memory usage" + }, + "poe_out_consumption": { + "name": "PoE (out) consumption" + }, + "psu_current": { + "name": "PSU {index} current" + }, + "psu_voltage": { + "name": "PSU {index} voltage" } }, "switch": {