Add additional outlet sensors to NUT (#143309)

Add outlet sensors for current, power, and real powre
This commit is contained in:
tdfountain 2025-05-26 12:34:15 -07:00 committed by GitHub
parent b1403838bb
commit 16394061cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 30 additions and 0 deletions

View File

@ -610,6 +610,33 @@ SENSOR_TYPES: Final[dict[str, SensorEntityDescription]] = {
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
),
"outlet.current": SensorEntityDescription(
key="outlet.current",
translation_key="outlet_current",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
device_class=SensorDeviceClass.CURRENT,
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
),
"outlet.power": SensorEntityDescription(
key="outlet.power",
translation_key="outlet_power",
native_unit_of_measurement=UnitOfApparentPower.VOLT_AMPERE,
device_class=SensorDeviceClass.APPARENT_POWER,
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
),
"outlet.realpower": SensorEntityDescription(
key="outlet.realpower",
translation_key="outlet_realpower",
native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER,
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
),
"outlet.voltage": SensorEntityDescription(
key="outlet.voltage",
translation_key="outlet_voltage",

View File

@ -240,6 +240,9 @@
"outlet_number_desc": { "name": "Outlet {outlet_name} description" },
"outlet_number_power": { "name": "Outlet {outlet_name} power" },
"outlet_number_realpower": { "name": "Outlet {outlet_name} real power" },
"outlet_current": { "name": "Outlet current" },
"outlet_power": { "name": "Outlet apparent power" },
"outlet_realpower": { "name": "Outlet real power" },
"outlet_voltage": { "name": "Outlet voltage" },
"output_current": { "name": "Output current" },
"output_current_nominal": { "name": "Nominal output current" },