marq24 / ha-tibber-pulse-local

Local/LAN Tibber Pulse IR/Bridge Integration for Home Assistant. My Tibber invitation Link: https://invite.tibber.com/6o0kqvzf (Code: six, oscar, zero, kilo, quebec, victor, zulu, foxtrot)
Apache License 2.0
114 stars 4 forks source link

Wrong device_class for Wirkleistung #30

Closed tunip closed 4 months ago

tunip commented 4 months ago

Checklist

Add a description

The "Wirkleistungs" entities does have the wrong device_class. "energy" is for consumption over time (Wh, kWh).

They must be "power" (https://developers.home-assistant.io/docs/core/entity/sensor/)

Bildschirmfoto 2024-07-09 um 09 22 44 Bildschirmfoto 2024-07-09 um 09 23 19
    # aktuelle Wirkleistung
    ExtSensorEntityDescription(
        key="0100100700ff",
        aliases=["0100010700ff",  "01000107ffff",  "0100020700ff", "01000f0700ff"],
        name="Power (actual)",
        native_unit_of_measurement=UnitOfPower.WATT,
        icon="mdi:meter-electric",
        device_class=SensorDeviceClass.ENERGY,
        state_class=SensorStateClass.MEASUREMENT,
    ),
    # Wirkleistung L1
        device_class=SensorDeviceClass.ENERGY,
...
    # Wirkleistung L2
        device_class=SensorDeviceClass.ENERGY,
...
    # Wirkleistung L3
        device_class=SensorDeviceClass.ENERGY,
...

Needs to be changed to: device_class=SensorDeviceClass.POWER,

Add your DEBUG log output

No response

marq24 commented 4 months ago

thanks! - will do this ASAP...

marq24 commented 4 months ago

please update to https://github.com/marq24/ha-tibber-pulse-local/releases/tag/2024.7.1 and close when fixed - TIA

tunip commented 4 months ago

Many thanks for the very quick fix 👍