Apparently, to solve the issue below was adding start_with_last: true
, like this:
group_by:
func: diff
duration: 1h
start_with_last: true
To be honest, I didn’t know what & when to use all those func and options!
It’s just trial and error
======================================================================
I am using this entity for the Solar Production in the Energy Dashboard:
- sensor:
name: Solar Panel Production
state_class: total_increasing
unit_of_measurement: kWh
device_class: energy
icon: mdi:solar-panel-large
state: >
{{ states("sensor.helper_envoy_current_power_production_riemann")|float }}
The values are correct, compared to the Enphase Enlighten mobile app “Energy Produced”.
Today, I have this graph in the Energy Dashboard:
Each column in chart have this value:
0.02
0.15
0.32
0.69
0.95
0.55
0.95
0.85
0.5
0.07
Total = 5.05
I created utility_meter to get the daily chart of that Solar Panel Production sensor. I plotted in ApexCharts:
As you can see, the chart looks like the same as the Energy Dashboard. However, each column has slightly different values:
0.01
0.14
0.29
0.67
0.79
0.49
0.91
0.79
0.46
0.05
And the total is shown 0. The chart column is defined using “diff” function:
group_by:
func: diff
duration: 1h
So, how can I create the same chart with the same values as in the Energy Dashboard, using utility_meter?
The utility_meter sensor has the same total. It is shown if I changed the func to “last”:
It looks like the utility_meter data are OK, I think. But, I don’t know how to make the same chart as in the Energy Dashboard.
Any ideas?