No statistics for one sensor?

Hello,

I have this in my templates :

- trigger:
    - trigger: time_pattern
      minutes: "/5"
  sensor:
    - name: Energy Solar Panels To Recorder
      unique_id: energy_solar_panels_to_recorder
      state: "{{ states('sensor.energy_solar_panels') | float(default=0) }}"
      unit_of_measurement: "kWh"
      state_class: total_increasing
      device_class: energy
    - name: Energy Produced Tariff 1 To Recorder
      unique_id: energy_produced_tariff_1_to_recorder
      state: "{{ states('sensor.energy_produced_tariff_1') | float(default=0) }}"
      unit_of_measurement: "kWh"
      state_class: total_increasing
      device_class: energy
...
    - name: Maandpiek Capaciteit To Recorder
      unique_id: maandpiek_capaciteit_to_recorder
      state: "{{ states('input_number.number_maandpiek_capaciteit') | float(0) }}"
      unit_of_measurement: "kW"
      state_class: measurement
      device_class: power

And this in my configuration.yaml :

  #Mariadb
recorder:
  db_url: !secret mariadb_url
  commit_interval: 30 #alles opslaan in geheugen en pas om de 30 seconden effectief wegschrijven
  auto_purge: false
  #  purge_keep_days: 7
  include:
    domains:
      #- automation
      #- script
      #- updater
      #- switch
      #- light
    entities:
      # ******************************************************
      # Overzicht spoelingen trommelfilter
      # ******************************************************
      - input_datetime.tijdstip_spoelingen_trommelfilter
      #
      #
      # ******************************************************
      # Energie
      # ******************************************************
      - sensor.energy_consumed_tariff_1_to_recorder
      - sensor.energy_consumed_tariff_2_to_recorder
      - sensor.energy_produced_tariff_1_to_recorder
      - sensor.energy_produced_tariff_2_to_recorder
      - sensor.energy_solar_panels_to_recorder
...
      - sensor.maandpiek_capaciteit_to_recorder

But I don’t get statistics for the last one (all this configurated a month ago, so yes input_number.number_maandpiek_capaciteit had changed several times) :

It’s the only one with this :

      state_class: measurement
      device_class: power

I don’t know if this is the reason ?

I want to be able to get a graph with maximum values pro month…

Nobody who can help me ?

It’s a power entity, it needs to be added as a power input to the energy dashboard. If you want it as energy, you’d need to use the integration integration to get kWh.

Found it :

utility_meter:
  maandpiek_capaciteit_grafiek:
    source: sensor.maandpiek_capaciteit_to_recorder
    cycle: monthly

type: custom:apexcharts-card
header:
  title: Maandpiek Capaciteit
graph_span: 24month
span:
  end: month
series:
  - entity: sensor.maandpiek_capaciteit_to_recorder
    name: Piekvermogen
    type: column
    group_by:
      func: max
      duration: 1month
apex_config:
  chart:
    toolbar:
      show: true
  yaxis:
    title:
      text: kW

Off topic : is there a way show data starting from 2026 ?