Apex Cards: Helper Entitiy shows wrong time span

Hi,

I am setting up my first Apex card and I think I am almost there. I want to see the daily solar production of my PV-Panels. In the card below it shows the correct days and entitiy, but the values are not what I excpected. The sum of solar production should be in the range of 5 kwh at the end of day but the values are corresponding to the current time of day. So the colums are showing the values for 10:06 am for the screenshot below.

How can I change that to show the totals for each day?

The yaml code I used was:


type: custom:apexcharts-card
graph_span: 5 days
header:
  show: true
  title: Stromerzeugung 30 Tage
  show_states: true
  colorize_states: true
series:
  - entity: sensor.helper_solar_production_daily
    type: column
    group_by:
      func: last
      duration: 1day
    float_precision: 1
    show:
       datalabels: true

Are you currently in a time zone different from your HA server?

No. I am in a different network, but in the same city.

The time and values on the columns always match the current time.

So at the moment it is 10:44 am and the colums in the graphic are showing the values for 10:44 for each day. (so the values are no larger than at 10:06). But I want the totals for 23:59 each day.

Try the max function instead of “last”.

That worked perfectly. Thanks a lot.

full code in case anyone finds this later on:

type: custom:apexcharts-card
graph_span: 5 days
header:
  show: true
  title: Stromerzeugung 30 Tage
  show_states: true
  colorize_states: true
series:
  - entity: sensor.helper_solar_production_daily
    type: column
    group_by:
      func: max
      duration: 1day
    float_precision: 1
    show:
      datalabels: true