What is the best approach to create history_stats for the last 7 days but showed by each day seperate without enormous amounts of code?

Yes, but it is still not perfect

image

It shows also milliseconds and I don’t want that.

type: custom:apexcharts-card
apex_config:
  chart:
    height: 140%
  dataLabels:
    background:
      enabled: false
    style:
      colors:
        - var(--primary-text-color)
graph_span: 1w
span:
  end: day
header:
  show: true
  title: Masterbedroom raam status
experimental:
  color_threshold: true
yaxis:
  - id: left
    min: ~0
    apex_config:
      forceNiceScale: true
series:
  - entity: sensor.masterbedroom_raam_open_vandaag_stats
    type: column
    name: Open
    yaxis_id: left
    float_precision: 2
    show:
      datalabels: false
      as_duration: hour
    group_by:
      func: last
      duration: 1d
  - entity: sensor.masterbedroom_raam_gesloten_vandaag_stats
    type: column
    name: Gesloten
    yaxis_id: left
    float_precision: 2
    show:
      datalabels: false
      as_duration: hour
    group_by:
      func: last
      duration: 1d
  - entity: sensor.masterbedroom_raam_ventilatie_vandaag_stats
    type: column
    name: Ventilatie
    yaxis_id: left
    float_precision: 2
    show:
      datalabels: false
      as_duration: hour
    group_by:
      func: last
      duration: 1d
card_mod:
  class: top-level-chart