Energy Custom Graph. A custom card to use Home Assistants internal EChart library with more flexibility

Currently not.

I’m pretty sure the EChart library has this feature on board, but my card hasn’t implemented it yet.

Sadly I’m quite busy with real-life / renovation stuff at the moment,
so improvements on my custom cards are pretty slow atm.

Maybe you can add an issue with the feature request on Github too, so it won’t get lost.

Pull Requests (from whoever) are also very welcome. :wink:

Firstly your card is amazing…love how much it does in a clever manner, giving us info we didn’t have before.

One such piece of info is “Solar Self Consumed”…its nice tto be able to see this info that HA itself doesnt spit out automatically…but now I’d like to ask a question re this data.

Is it at all possible to spit out this data as a sensor showing a daily total.

This would allow me and many others, I am sure to get an accurate measurement of savings daily/weekly/monthly, etc., without having to tally on a daily basis or go back through historical graphs to get this data

I have no idea what this would require to do…so apologies if I’ve asked for something stupid, even more so if it is indeed already in there somewhere and I;ve missed it.

With this data, I could then easily calculate my daily /weekly/monthly etc, going forward

Thanks a lot for the explanation and the hints.

Will try the hourly aggregation :slight_smile:

Hi,
Your card is absolutely rocking! Many thanks for creating endless possibilities. :clap:
Any idea how to remove the blue lines in the solar fill (as it’s done in the stock power-sources-graph card)?

And is there a way to use a gradient fill instead of a solid fill (as in the stock power-sources-graph card)?

Custom card is on top.
Bottom is the power-sources-graph.

Code
type: custom:energy-custom-graph-card
series:
  - chart_type: line
    stat_type: mean
    color: "--energy-solar-color"
    fill: true
    name: Zonne-energie
    show_in_legend: true
    fill_opacity: 0.5
    statistic_id: sensor.actuele_opbrengst_zonnepanelen_kw
    stack: energie
    line_width: 1
  - name: Grid
    chart_type: line
    color: "--energy-grid-consumption-color"
    stack: energie
    fill: true
    fill_opacity: 0.5
    line_width: 1
    calculation:
      unit: kW
      terms:
        - statistic_id: sensor.power_consumption
          stat_type: mean
          operation: add
        - statistic_id: sensor.power_production
          stat_type: mean
          operation: subtract
  - name: Verbruik huis
    chart_type: line
    line_style: dotted
    color: "—grey-color"
    calculation:
      unit: kW
      terms:
        - statistic_id: sensor.power_consumption
          stat_type: mean
          operation: add
        - statistic_id: sensor.power_production
          stat_type: mean
          operation: subtract
        - statistic_id: sensor.actuele_opbrengst_zonnepanelen_kw
          stat_type: mean
          operation: add
timespan:
  mode: energy
title: Energie
expand_legend: false
legend_sort: none
y_axes:
  - id: left
    fit_y_data: true
    logarithmic_scale: false
    center_zero: false
    unit: kW
aggregation:
  fallback: hour
  manual: 5minute
  energy_picker:
    hour: 5minute
    day: 5minute
hide_legend: false
show_stack_sums: false
allow_compare: true
show_unit: true

I’m not sure what’s exactly going on here.

Normally, you should see mixed fills when areas are drawn with fill 0.5 in front of each other like that:

But I see that you are using a stack, which normally should draw them on top of each other.
So I don’t get why the signals are crossing at all.
If I understand your signals correctly, I guess you wouldn’t need stacking?

Maybe this is a bug with calculated signals and stacks.
Could you try to remove the stack names, so the 2 signals (solar and grid) are drawn independently?

About the gradients: This isn’t possible so far, but I’ve seen your feature request on Github.
Will try to add that in a future release.

1 Like