This is not energy but power.
Not state_calss total but measurement
Has a unit of kW instead of kWh (but you may skip the division and just use W for better readability).
Also it’s entiry_id seems to be sensor.knx_verbrauch_total but you configured your Riemann helper to use sensor.knx_kwh.
(The helper calculates it to “energy” and “total_increasing” and “kWh”/“Wh”).
What i don’t understood is, whe ist there no knx_energy available and the source is named knx_verbrauch_total. (knx_energy is not available in the helper configuration).
knx_energy is the unique_id of this entity. This is never used in any user-visible configuration. Only the entity_id is used. And this is, if it was not changed meanwhile, sensor.knx_verbrauch_total. You can see this in Dev-tools → States.
The unit of sensor.knx_verbrauch_total (W) can not be converted to the unit of previously compiled statistics (kWh). Generation of long term statistics will be suppressed unless the unit changes back to kWh or a compatible unit. Go to Link to Developer Tools: Statistics – My Home Assistant to fix this
So i have changed the unique id and created a new Riemann integration. I Hope i got some values there after 1-2h
I have just tested this with a random power sensor. I only set a source entity and left everything at default → Trapezoidal rule.
A value was shown immediately.
I did a second test with a different sensor that rarely changes value → state of the helper was “unknown”. So I guess a change of value is required to start calculation 🤷
Looking at your graph above it looks like your sensor doesn’t change value much. If that is true, maybe try to add always_callback: true to the knx sensor and force_update (I think its called so) at the template sensor.
Hey thanks… i tried this, but force_update is not available for templates sensors. I did some google searches and found a workaround for this.
I had to add an attribute (that changes every second (maybe minute will also work?)).
so in conclustion, when a sensor state does not change often. Wee need to user force_update or as a workaround we need to add a changing attribute for the sensor.
I also changed the KNX sensor… but i think in my case this has no effect. (Depens on the KNX Component)