Energy Sensor configuration with vzlogger - wrong conversation

Hey chaps,

I´m playing for weeks to configure vzlogger with Home-Assistant to see the right data in the energy dashboard but without success :frowning:
There is some conversation issue, I think.

Sensor Configuration:

sensor:
- platform: mqtt
  name: "Stromverbrauch Haus"
  unique_id: stromverbrauch_haus
  state_topic: "vzlogger/data/chn1/raw"
  unit_of_measurement: Wh
  state_class: total_increasing
  device_class: energy
  value_template: '{{value | round(2) }}'

Graph of sensor:

That´s how it looks like in the Dashboard:

Any idea what´s going?

:thinking:

unit_of_measurement: kWh

Yes, you are using a power sensor. You need to use an energy sensor. These are two very different things. Simply giving a power sensor an energy unit (Wh or kWh) and giving it the required device class is not enough to turn a power sensor into an energy sensor.

The only way to convert power to energy is to integrate it with respect to time. So if you don’t have an actual energy sensor, then feed your power sensor (fix the unit to W or kW and class to ‘power’) to this:

Choose method: left

Hi Tom,

make sense - so if I understand it correctly, i should calculate the sum of received values.
What if I use the total meter reading (Zählerstand) instead of the current power consumption?

I will give a try:

Let´s see whats´s the dashboard is going to show :wink:

Yes, that is the sensor you need to use instead.

1 Like

Yep, looks good:
image

Thanks a million for the hint and help!

Hi,

I’m new to HA and also working on adding my power consumption to the energy dashboard. I’ve configures to sensors in HA and I can find them under entities

Example


I was able to add the first sensor (total consumption, increasing) to the dashboart, but the second sensor with acutal energy consumption is not available. Any idea why this sensor is not available in the dropdown list?

BR
René