mitch-dc/volkswagen_we_connect_id

Code for fixing energy sensor warning

StefanoGiu opened this issue · 1 comments

You should fix the code this way:

    if sensor.native_unit_of_measurement:
        self._attr_native_unit_of_measurement = sensor.native_unit_of_measurement
    if sensor.native_unit_of_measurement and sensor.device_class!=SensorDeviceClass.ENERGY:
        self._attr_state_class = SensorStateClass.MEASUREMENT

Moreover, I don't get the updates of this custom component via Hacs... why?

Is this a fix for #233 ?