Hi folks, thanks in advance for your help - always appreciate it.
I’m getting an error with the unit of a number of filtered sensors I use.
e.g. - sensor.daily_washing_machine
The unit ('') of the recorded statistics doesnt match the supported unit 'kWh' of device class 'energy'.
If I look this sensor up in Dev Tools, I see that in the sensor attributes …
unit_of_measurement: kWh
device_class: energy
… seem right.
This comes from a utility_meter that I have set up.
washing_machine:
unique_id: '8757D36F-002C-4AA2-91EC-F9635CCA54A3'
source: sensor.washing_machine_filtered_electric_consumption
name: Daily Washing Machine
cycle: daily
This pulls from a filtered sensor - sensor.washing_machine_filtered_electric_consumption
- platform: filter
name: "Washing Machine"
entity_id: sensor.utility_room_washing_machine_electric_consumption_kwh
unique_id: '0B37F558-504D-4802-AA6B-B4A3D981E052'
filters:
- filter: range
lower_bound: 0
- filter: outlier
window_size: 10
radius: 4.0
… which when I look at in dev tools also says that …
unit_of_measurement: kWh
device_class: energy
This filtered sensor comes from my Z-Wave integration where my smart plug records my usage.
sensor.utility_room_washing_machine_electric_consumption_kwh
meter_type_name: ELECTRIC
unit_of_measurement: kWh
device_class: energy
Soooooo. TLDR version.
My sensor “sensor.daily_washing_machine”, says that the “unit (’’) of the recorded statistics doesnt match the supported unit ‘kWh’ of device class ‘energy’”. However, that sensor, and every sensor that comes before it has unit_of_measurement as “kWh”.
Could someone please point me at where I’m going wrong?
Thank you!