From 0854f29b7c688f31eaba1468d79073fa5c2914d3 Mon Sep 17 00:00:00 2001 From: MattWestb <49618193+MattWestb@users.noreply.github.com> Date: Wed, 28 Dec 2022 15:27:17 +0100 Subject: [PATCH] Fix zha RMS voltage (#84689) Fix RMS Voltage. class ElectricalMeasurementRMSVoltage(ElectricalMeasurement, id_suffix="rms_voltage"): is using CURRENT as unit but shall being VOLTAGE. Fix: https://github.com/home-assistant/core/issues/84537 --- homeassistant/components/zha/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/zha/sensor.py b/homeassistant/components/zha/sensor.py index e81d3a9655f..a66f3aa1fe8 100644 --- a/homeassistant/components/zha/sensor.py +++ b/homeassistant/components/zha/sensor.py @@ -324,7 +324,7 @@ class ElectricalMeasurementRMSVoltage(ElectricalMeasurement, id_suffix="rms_volt """RMS Voltage measurement.""" SENSOR_ATTR = "rms_voltage" - _attr_device_class: SensorDeviceClass = SensorDeviceClass.CURRENT + _attr_device_class: SensorDeviceClass = SensorDeviceClass.VOLTAGE _attr_should_poll = False # Poll indirectly by ElectricalMeasurementSensor _attr_name: str = "RMS voltage" _attr_native_unit_of_measurement = UnitOfElectricPotential.VOLT