Graph that layers solar production of x days on top of each other?

Is it possible?

Let’s say the solar production of the last 5 days, but the graph should only show 24 hours, but layer all 5 days on top of each other.

Apex charts can do this. There is an offset you can apply to each graph line, just use the same sensor for how ever many days you want and add a different multiple of a 24hr offset to each one.

E.g. last three days (the fainter the line the older it is):

Screenshot 2021-10-06 at 10-33-25 Administration - Home Assistant

type: custom:apexcharts-card
graph_span: 24h
span:
  start: day
header:
  show: true
  title: Solar
  show_states: false
  colorize_states: true
now:
  show: true
apex_config:
  legend:
    show: false
all_series_config:
  curve: straight
  unit: W
  fill_raw: last
  stroke_width: 2
  extend_to_end: false
  float_precision: 0
  group_by:
    func: avg
    duration: 30min
  show:
    legend_value: false
series:
  - entity: sensor.sma_inverter_power
    name: Today
    color: '#184a26'
  - entity: sensor.sma_inverter_power
    offset: '-1d'
    name: Yesterday
    color: '#0da035'
    opacity: 0.75
  - entity: sensor.sma_inverter_power
    offset: '-2d'
    name: Day before Yesterday
    color: '#0da035'
    opacity: 0.5
  - entity: sensor.sma_inverter_power
    offset: '-3d'
    name: Three days ago
    color: '#0da035'
    opacity: 0.25
card_mod:
  class: top-level-chart

Note even for three and a quarter days this was a lot of data. And took a while to load the graph.

3 Likes

Awesome. That’s exactly what I hoped. This whole graph system is even better than in my wildest dreams.