My Log is filled with : 'dict object' has no attribute 'energy_consumption'

Hi,

I have issues with the energy dashboard, it started working on/off and now it doesn’t show any graphs.
For sources it shows cost but not consumed energy

The sensors behind have data, and through customization, I added:

device_class: energy
state_class: measurement
last_reset: '1970-01-01T00:00:00+00:00'

I noticed many of the following warning entry pairs in my log that sounds related to energy:

2022-04-05 15:35:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'sensorname' when rendering '{{ value_json.output.sensorname }}'
2022-04-05 15:35:12 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'energy_consumption' when rendering '{{ value_json.output.energy_consumption }}'

But I can’t figure out which sensors it is related to and what to do about these. No sensor names are specified.

Or maybe, my issue in the energy dashboard, can be analyzed /Fixed by other means.

Any body had similar issues?

Hope somebody can guide me in the right direction.

Thanks.
Ghassan

No worries, the warnimngs in my log, are still there but actually does not effect my energy dashboard…
.
I fixed the issue in my energy dashboard, not showing consumption graphs or numbers for my sensors holding the total accumulated amounts, by simply changing the state_class from measurement to total_increasing.

Is it officially announced that you must use total_increasing?