ApexCharts card - A highly customizable graph card

I was a bit confused myself to begin with, different show variables for the chart and then the series. I am pleased you got it going.

1 Like

Hello
Is it possible to create on-the-fly sum from several sensors?

I have sensors providing energy injected and purchased into/from grid in 15-minutes intervals, for each phase. Roughly it looks like on screenshot below.

I would like to add another graph, probably line one (the best if could be on top of that one) summing injected and purchased energy for each phase in those intervals, and then suming all those 3 resuls.
So general formula would be: injA-purchA + (injB-purchB) + (injC-purchC)

The goal is to get final value of energy in 15-min intervals on the graph.

Currently the chart is configured like this:

type: custom:apexcharts-card
graph_span: 24h
update_interval: 10m
all_series_config:
  type: column
  show:
    datalabels: false
    in_chart: true
  float_precision: 2
  group_by:
    duration: 15m
    func: diff
stacked: true
header:
  show: true
  title: Energy 15mins
  show_states: true
  colorize_states: true
series:
  - entity: sensor.wattsonic_phase_a_energy_purchased
    name: Purchased A
    invert: true
    color: "#C1545B"
  - entity: sensor.wattsonic_phase_b_energy_purchased
    name: Purchased B
    invert: true
    color: "#D55C64"
  - entity: sensor.wattsonic_phase_c_energy_purchased
    name: Purchased C
    invert: true
    color: "#EA656D"
  - entity: sensor.wattsonic_phase_a_energy_injected
    name: Injected A
    color: "#4DC1A6"
  - entity: sensor.wattsonic_phase_b_energy_injected
    name: Injected B
    color: "#55D5B8"
  - entity: sensor.wattsonic_phase_c_energy_injected
    name: Injected C
    color: "#5DEAC9"

thanks in advance