skodaconnect / homeassistant-myskoda

Homeassistant integration for MySkoda.
89 stars 15 forks source link

Add energy class for Ladeleistung (Enyaq) #323

Open gruessung opened 1 week ago

gruessung commented 1 week ago

Car: Skoda Enyaq

Please add sensor.skoda_enyaq_ladeleistung to home assistant energy class. Actually it's not possible to use this sensor in an intragralhelper to add my car into HA energy dashboard.

WebSpider commented 1 week ago

This is the charging_power sensor

dvx76 commented 1 week ago

charging_power report power (device_class=SensorDeviceClass.POWER), not energy (device_class=SensorDeviceClass.ENERGY).

The API doesn't report energy consumed/charged.

You might be able to derive an additional energy sensor from the charging_power, see for e.g. https://community.home-assistant.io/t/create-energy-sensor-from-power-meter/505442/2

gruessung commented 6 days ago

@dvx76 HA didn't let me select the charging power sensor for a new integralsensor :) I already have one from the old Skoda integration.

dvx76 commented 6 days ago

Sorry but I don't understand what the problem is or what you are asking from us here. The charging_power sensor has the correct device_class (SensorDeviceClass.POWER) and I can select it as the source for a Integral helper

image

gruessung commented 6 days ago

@dvx76 Thats weird! grafik

As you can see i'm not able to choose any sensor starting by sensor.skoda*

dvx76 commented 6 days ago

Sorry not sure what to tell you. Maybe verify the name, unit and device_class of your charging_power entity in developer tools,

image

WebSpider commented 5 days ago

@dvx76 would it be an idea to derive the sensor by default in the integration?

dvx76 commented 5 days ago

Mostly note-to-self: we could maybe include an entity which subclasses homeassistant.components.integration.sensor.IntegrationSensor and sets it up with the charging_power sensor. I don't know if this is a good idea 😄 . Would definitely not look into calculating the value ourselves when HA has this feature out of the box.