How to change device class for sum group

I have a group entity (sensor.total_power_being_used_now) that sums the total power usage of my two Emporia Vue sensors. I received the following error today:

Unit of measurements is not correct

Unit of measurements W, W of input sensors sensor.basement_power_meter_total_power, sensor.garage_power_meter_total_power are not compatible using no device class of sensor group sensor.total_power_being_used_now.

Please correct the unit of measurements on the source entities or set a proper device class on the sensor group and reload the group sensor to fix this issue.

Warning - 2/12/2024

I’m trying to change the device class of the group but can’t find out how to change it. Does anyone know how to change the device class?

You can change the unit of measure for a sensor in the UI editing the entity, but I believe the device class must be set by the integration, which probably means you will not be able to change it. First, I would double check if sensor.garage_power_meter_total_power has the correct unit of measure set. If it does, then maybe try creating a template sensor that just copies the garage sensor’s value {{ states('sensor.garage_power_meter_total_power') }}. You will be able to define the device class when you create the sensor (on the Helpers tab).

1 Like

@bphillips921 I see the exact same warning summing up individual power sensors. Did you find a way to get rid of this warning?

Seems to have been fixed in 2024.2.4 :+1: