fmartinou / teleinfo2mqtt

Publish teleinfo to mqtt topics
https://fmartinou.github.io/teleinfo2mqtt
MIT License
64 stars 17 forks source link

Wrong device class for PAPP sensor #57

Closed NathanKun closed 1 year ago

NathanKun commented 1 year ago

I got a warning in log: Entity sensor.linky_032064323057_teleinfo_xxx_papp (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'VA' which is not a valid unit for the device class ('power') it is using; expected one of ['W', 'kW'];

This is related to the PAPP sensor, which is configured as a 'power' device class, but using 'VA' as unit. I think we should use the 'apparent_power' device class for the PAPP sensor: https://www.home-assistant.io/integrations/sensor/

fmartinou commented 1 year ago

Hi,

Thank your for reporting this issue; I didn't know about the apparent_power. Your analysis seems right; I'll make the change.

fmartinou commented 1 year ago

Released as 8.3.3