Beginner needs help with calculation and integration of natural gas consumption

Hello,

I get a value from my heating for the consumption of the last 24 hours in kWh. At 00:00 the consumption of the last day is displayed for 24 hours. So it is not a real high-counting counter. This is displayed for heat, hot water, and total (3 sensors via MQTT). I failed to integrate the sensor in the energy dashboard. How can I realize this, do I first have to create a “virtual sensor” in which the daily consumption is added step by step?
It doesn’t work that way, it always shows 0 kWh in the dashboard:

    - name: "WTC Verbrauch Vortag gesamt"
      state_topic: "ioBroker/weishaupt-wem/0/WTC-G/Tageswärmemenge(Vortag)GesamtWE0"
      icon: "mdi:gas-station"
      device_class: gas
      state_class: total
      unit_of_measurement: "kWh" 

So you have a sensor that changes exactly once and only once per day, and it just changes to the value of yesterday’s consumption?

That’s not a type of sensor that’s going to natively work with energy, so you will need to create some kind of helper that can understand that and create a total sensor.

I think you may want a utility_meter helper with “delta_values” set to true:

1 Like

Looks good, thank you! I will observe it the next days to see if consumption is correctly calculated.