ApexCharts card - A highly customizable graph card

I love this!! However I had a question, for the radial sensor, how do I add my own icon? Im not familiar with the coding here, how did u obtain the data:image/svg…etc.

Hello everyone, please tell me how to rotate the characters?
rotate

- x: '${new Date(states[''sensor.sunset''].attributes.yesterday).getTime()}'
  label:
    text: 🌄
    borderWidth: 0
    style:
      background: '#0000'
      fontSize: '18px'

next doesn’t work for me :frowning:

      rotate: 90
      rotate: 90deg
      transform: rotate(90deg)

and how to highlight the vertical bar next to the symbol with a different color?

Really great project, I like the charts!
I am using this for the gas prices of my local filling station. As this is shut down during the night, there is no data. I see that there is the possibility to fill the empty data, but I would just like to exclude it, basically taking out 22.00-6.00. I see the start and end option, but that seems to only work for one continuous timeline (start each morning from 6.00), not if I display multiple days.
Any way to achieve that?
grafik

I like to make these mini icons. Is it possible to decrease the space reserved for the header? I can do so already a bit by setting floating: true, but with this option the “action” is no longer working. Is it for example possible to have the graph span the entire card, with still overlaying the actual value and title?

Capture

Code so far


type: custom:apexcharts-card
header:
  show: true
  show_states: true
  floating: true
experimental:
  color_threshold: true
all_series_config:
  stroke_width: 0
  opacity: 0.7
  type: area
series:
- entity: sensor.myenergi_my_home_power_grid
    name: Grid
    curve: smooth
    extend_to_end: false
    color_threshold:
      - value: -1
        color: '#1b8a5a'
      - value: 1
        color: '#ee3e32'
    group_by:
      func: avg
      duration: 15min
layout: minimal
graph_span: 24h
update_interval: 10 min
span:
  start: day
apex_config:
  chart:
    height: 110px
    width: 100px
style: |
  ha-card {font-size: 10px;}    

How can i plot a sensor value, but subtracting the first value in the graph?
The sensor is cumulative, and i want to show the daily increase.

Hi, what sensor have you used for your TV Consumption? have you a config for me? I use Philips TV integration. Thanks

I use the following in my sensors.yaml:

- platform: history_stats
  name: watched TV today
  entity_id: media_player.lg_fernseher
  state: "on"
  type: time
  start: "{{ now().replace(hour=0, minute=0, second=0) }}"
  end: "{{ now() }}"

It grows over the day and then starts fresh the next day.

3 Likes

Thank you very much

- platform: openexchangerates
  name: Euro Currency
  api_key: xxxx
  quote: EUR

- platform: template
  sensors:
    helium_wallet_value:
      value_template: "{{ ((states('sensor.helium_hnt_oracle_price') | float * states('sensor.helium_wallet_xxxxx') | float) * states('sensor.euro_currency') | float) | round(2) }}"
      unit_of_measurement: "EUR"

- platform: template
  sensors:
    helium_wallet_today_value:
      value_template: "{{ ((states('sensor.helium_hnt_oracle_price') | float * states('sensor.helium_wallet_today') | float) * states('sensor.euro_currency') | float) | round(2) }}"
      unit_of_measurement: "EUR"

is there no way to remove legends? I am making a power graph for devices in my home, and I don’t need legends when I can press them. I can only remove value, but not the legend it self which is a huge bummer

also, how do I get rid of so many decimals, it happens from time to time, about 20% of the time

code:

type: custom:apexcharts-card
update_interval: 1min
chart_type: donut
apex_config:
  plotOptions:
    pie:
      donut:
        background: transparent
        labels:
          show: true
          total:
            show: true
header:
  show: true
  title: Strømforbruk akkurat nå
  show_states: false
  colorize_states: true
series:
  - entity: sensor.power_bjorganveien_39
    name: Other
    show:
      legend_value: false
    transform: >-
      return parseFloat(x) -
      parseFloat(hass.states['sensor.varmepumpe_stikk_stue_electric_consumption_w'].state)
      -  parseFloat(hass.states['sensor.varmepumpe_kjellerstue_power'].state) -
      parseFloat(hass.states['sensor.kjoleskap_kjokken_power'].state) -
      parseFloat(hass.states['sensor.vvb_vaskerom_power'].state) - 
      parseFloat(hass.states['sensor.vaskemaskin_vaskerom_power'].state) -
      parseFloat(hass.states['sensor.tv_hifi_stue_power'].state) -
      parseFloat(hass.states['sensor.stekeovn_kjokken_power'].state) -
      parseFloat(hass.states['sensor.mikrobolgeovn_kjokken_power'].state) -
      parseFloat(hass.states['sensor.gulvvarme_bad_electric_consumed_w'].state)
      -
      parseFloat(hass.states['sensor.gulvvarme_matheo_electric_consumed_w'].state)
      -
      parseFloat(hass.states['sensor.gulvvarme_pabygg_electric_consumed_w'].state)
      -
      parseFloat(hass.states['sensor.gulvvarme_emma_electric_consumed_w'].state)
      -
      parseFloat(hass.states['sensor.gulvvarme_gang_electric_consumed_w'].state)
  - entity: sensor.varmepumpe_stikk_stue_electric_consumption_w
    show:
      legend_value: false
  - entity: sensor.varmepumpe_kjellerstue_power
    show:
      legend_value: false
  - entity: sensor.kjoleskap_kjokken_power
    show:
      legend_value: false
  - entity: sensor.vvb_vaskerom_power
    show:
      legend_value: false
  - entity: sensor.vaskemaskin_vaskerom_power
    show:
      legend_value: false
  - entity: sensor.tv_hifi_stue_power
    show:
      legend_value: false
  - entity: sensor.stekeovn_kjokken_power
    show:
      legend_value: false
  - entity: sensor.mikrobolgeovn_kjokken_power
    show:
      legend_value: false
  - entity: sensor.oppvaskmaskin_kjokken_power
    show:
      legend_value: false
  - entity: sensor.gulvvarme_bad_electric_consumed_w
    show:
      legend_value: false
  - entity: sensor.gulvvarme_matheo_electric_consumed_w
    show:
      legend_value: false
  - entity: sensor.gulvvarme_pabygg_electric_consumed_w
    show:
      legend_value: false
  - entity: sensor.gulvvarme_emma_electric_consumed_w
    show:
      legend_value: false
  - entity: sensor.gulvvarme_gang_electric_consumed_w
    show:
      legend_value: false

I guess float_precision: 0 should do it.

Hallo RomRider, thanks for this marvelous effort, I discovered this thread few weeks ago and I cant stop reading it. I need for my Lovelace dashboard st. like a combination of apex line chart and history graph… I have found some samples here at the forum and so far I succeded to implement it… as a sample this pic:

image

But the HA history graph itself doesn’t have the option for time span like you prepared in the apexchart integration… is it plz somehow possible to get it included also?
I have noticed in the apexcharts .js documentation there is a kind of graph called “Timeline chart - group series”

image

and I hope this graph might be used for this purpose(?)

The goal is to get in one graph both - the numeric values and also non-numeric values (such as DHW water tank states - like: charging, discharging, charged… etc. or service allerts, like “heatpump running”, “blocked” “waiting” … etc. to be able to track the temperatures and also the states back in time.

So far I have implemented dynamic “hours-to-show” option and I only succeeded to combine the custom minigraph and historygraph together as the best result. This of course doesnt have the span option, but looks a bit better than the previous sample of apex and history combined:

I also play a bit with the animation or blinking effect to visualize the current state a bit better.
It would be great to have the span option (instead of just dynamic “hours-to-show” like I have now) implemented and keep the look as much as this last sample graph.

(one more sample - switched to 48 hours, and mouse hover on the history graph to see the details…)

Is there plz any way how to go furhter?
Thank you indeed.
Willy

You can track https://github.com/RomRider/apexcharts-card/issues/109. I think it is a prerequisite for what you want to do.

Thank you for the link, will follow that track… so far it seems no solution yet.
thx.
Willy

Thanks for providing add-ons like ApexCharts.

I’d like to use it to display the temperature of a BBQ controller and have a couple of questions.

  • Is there any possibility to set the series color dynamically based on a sensor value or attribute other than config-template-card? While this is in principal working, the graph is no longer updated upon new sensor values, in case it’s wrapped by a config-template-card. Adding the temperature sensors to the by the config-template-card watched entities results in glitches due to the full reload of the graph (entity values in the header switch to N/A)
  • The zoom is reset after each update of the sensor values (without config-template-card), is it possible to keep the zoom level also in case the graph is updated by new sensor values?
  • I’d like to display a whole grill session at once. Is it possible to display all data starting at a specific time point and display all data up to “now”? Or all data since a sensor was “unavailable”?

I appreciate any help, thanks :slight_smile:

Is it possible to have one series area gradient like below and then add another series as a line (not area) on top of it? Looks like gradient is being applied to both series.

image

How can I show datalabels with decimals?

Just figured it out.

float_precision: 2

Thanks!

image

I am trying to display electricity forecasts from Amber Electricity (Australia). However it is not displaying the forecast datetimes correctly.
Looking for some help. I’m sure it is something simple I am missing but cannot figure it out.
I am a noob wrt ApexCharts and JavaScript.

This is the sensor data;

sensor.amberelectricity_general_forecast
yaml

state_class: measurement
forecasts:
  - duration: 30
    date: '2022-02-14'
    nem_date: '2022-02-14T15:30:00+10:00'
    per_kwh: 0.25
    spot_per_kwh: 0.1
    start_time: '2022-02-14T05:00:01+00:00'
    end_time: '2022-02-14T05:30:00+00:00'
    renewables: 35
    spike_status: none
  - duration: 30
    date: '2022-02-14'
    nem_date: '2022-02-14T16:00:00+10:00'
    per_kwh: 0.26
    spot_per_kwh: 0.11
    start_time: '2022-02-14T05:30:01+00:00'
    end_time: '2022-02-14T06:00:00+00:00'
    renewables: 34
    spike_status: none
    range_min: 0.08
    range_max: 0.3
  - duration: 30
    date: '2022-02-14'
    nem_date: '2022-02-14T16:30:00+10:00'
    per_kwh: 0.27
    spot_per_kwh: 0.12
    start_time: '2022-02-14T06:00:01+00:00'
    end_time: '2022-02-14T06:30:00+00:00'
    renewables: 32
    spike_status: none
    range_min: 0.08
    range_max: 0.35
  - duration: 30
    date: '2022-02-14'
    nem_date: '2022-02-14T17:00:00+10:00'
    per_kwh: 0.26
    spot_per_kwh: 0.11
    start_time: '2022-02-14T06:30:01+00:00'
    end_time: '2022-02-14T07:00:00+00:00'
    renewables: 30
    spike_status: none
    range_min: 0.08
    range_max: 0.25
  - duration: 30
    date: '2022-02-14'
    nem_date: '2022-02-14T17:30:00+10:00'
    per_kwh: 0.27
    spot_per_kwh: 0.12
    start_time: '2022-02-14T07:00:01+00:00'
    end_time: '2022-02-14T07:30:00+00:00'
    renewables: 28
    spike_status: none
    range_min: 0.08
    range_max: 0.24
  - duration: 30
    date: '2022-02-14'
    nem_date: '2022-02-14T18:00:00+10:00'
    per_kwh: 0.27
    spot_per_kwh: 0.12
    start_time: '2022-02-14T07:30:01+00:00'
    end_time: '2022-02-14T08:00:00+00:00'
    renewables: 26
    spike_status: none
    range_min: 0.09
    range_max: 0.23
  - duration: 30
    date: '2022-02-14'
    nem_date: '2022-02-14T18:30:00+10:00'
    per_kwh: 0.29
    spot_per_kwh: 0.15
    start_time: '2022-02-14T08:00:01+00:00'
    end_time: '2022-02-14T08:30:00+00:00'
    renewables: 23
    spike_status: none
    range_min: 0.11
    range_max: 0.3
  - duration: 30
    date: '2022-02-14'
    nem_date: '2022-02-14T19:00:00+10:00'
    per_kwh: 0.29
    spot_per_kwh: 0.15
    start_time: '2022-02-14T08:30:01+00:00'
    end_time: '2022-02-14T09:00:00+00:00'
    renewables: 20
    spike_status: none
    range_min: 0.1
    range_max: 0.3
  - duration: 30
    date: '2022-02-14'
    nem_date: '2022-02-14T19:30:00+10:00'
    per_kwh: 0.34
    spot_per_kwh: 0.19
    start_time: '2022-02-14T09:00:01+00:00'
    end_time: '2022-02-14T09:30:00+00:00'
    renewables: 19
    spike_status: none
    range_min: 0.11
    range_max: 0.3
  - duration: 30
    date: '2022-02-14'
    nem_date: '2022-02-14T20:00:00+10:00'
    per_kwh: 0.35
    spot_per_kwh: 0.2
    start_time: '2022-02-14T09:30:01+00:00'
    end_time: '2022-02-14T10:00:00+00:00'
    renewables: 19
    spike_status: none
    range_min: 0.11
    range_max: 0.3
  - duration: 30
    date: '2022-02-14'
    nem_date: '2022-02-14T20:30:00+10:00'
    per_kwh: 0.28
    spot_per_kwh: 0.13
    start_time: '2022-02-14T10:00:01+00:00'
    end_time: '2022-02-14T10:30:00+00:00'
    renewables: 19
    spike_status: none
    range_min: 0.1
    range_max: 0.3
  - duration: 30
    date: '2022-02-14'
    nem_date: '2022-02-14T21:00:00+10:00'
    per_kwh: 0.27
    spot_per_kwh: 0.12
    start_time: '2022-02-14T10:30:01+00:00'
    end_time: '2022-02-14T11:00:00+00:00'
    renewables: 20
    spike_status: none
    range_min: 0.09
    range_max: 0.3
  - duration: 30
    date: '2022-02-14'
    nem_date: '2022-02-14T21:30:00+10:00'
    per_kwh: 0.26
    spot_per_kwh: 0.11
    start_time: '2022-02-14T11:00:01+00:00'
    end_time: '2022-02-14T11:30:00+00:00'
    renewables: 19
    spike_status: none
    range_min: 0.08
    range_max: 0.3
  - duration: 30
    date: '2022-02-14'
    nem_date: '2022-02-14T22:00:00+10:00'
    per_kwh: 0.26
    spot_per_kwh: 0.11
    start_time: '2022-02-14T11:30:01+00:00'
    end_time: '2022-02-14T12:00:00+00:00'
    renewables: 19
    spike_status: none
    range_min: 0.08
    range_max: 0.26
  - duration: 30
    date: '2022-02-14'
    nem_date: '2022-02-14T22:30:00+10:00'
    per_kwh: 0.25
    spot_per_kwh: 0.11
    start_time: '2022-02-14T12:00:01+00:00'
    end_time: '2022-02-14T12:30:00+00:00'
    renewables: 19
    spike_status: none
    range_min: 0.08
    range_max: 0.26
  - duration: 30
    date: '2022-02-14'
    nem_date: '2022-02-14T23:00:00+10:00'
    per_kwh: 0.24
    spot_per_kwh: 0.1
    start_time: '2022-02-14T12:30:01+00:00'
    end_time: '2022-02-14T13:00:00+00:00'
    renewables: 18
    spike_status: none
    range_min: 0.08
    range_max: 0.14
  - duration: 30
    date: '2022-02-14'
    nem_date: '2022-02-14T23:30:00+10:00'
    per_kwh: 0.25
    spot_per_kwh: 0.1
    start_time: '2022-02-14T13:00:01+00:00'
    end_time: '2022-02-14T13:30:00+00:00'
    renewables: 16
    spike_status: none
    range_min: 0.08
    range_max: 0.15
  - duration: 30
    date: '2022-02-14'
    nem_date: '2022-02-15T00:00:00+10:00'
    per_kwh: 0.25
    spot_per_kwh: 0.11
    start_time: '2022-02-14T13:30:01+00:00'
    end_time: '2022-02-14T14:00:00+00:00'
    renewables: 15
    spike_status: none
    range_min: 0.08
    range_max: 0.18
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T00:30:00+10:00'
    per_kwh: 0.25
    spot_per_kwh: 0.1
    start_time: '2022-02-14T14:00:01+00:00'
    end_time: '2022-02-14T14:30:00+00:00'
    renewables: 14
    spike_status: none
    range_min: 0.08
    range_max: 0.13
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T01:00:00+10:00'
    per_kwh: 0.24
    spot_per_kwh: 0.1
    start_time: '2022-02-14T14:30:01+00:00'
    end_time: '2022-02-14T15:00:00+00:00'
    renewables: 14
    spike_status: none
    range_min: 0.08
    range_max: 0.13
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T01:30:00+10:00'
    per_kwh: 0.24
    spot_per_kwh: 0.09
    start_time: '2022-02-14T15:00:01+00:00'
    end_time: '2022-02-14T15:30:00+00:00'
    renewables: 14
    spike_status: none
    range_min: 0.07
    range_max: 0.11
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T02:00:00+10:00'
    per_kwh: 0.23
    spot_per_kwh: 0.09
    start_time: '2022-02-14T15:30:01+00:00'
    end_time: '2022-02-14T16:00:00+00:00'
    renewables: 14
    spike_status: none
    range_min: 0.05
    range_max: 0.1
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T02:30:00+10:00'
    per_kwh: 0.23
    spot_per_kwh: 0.08
    start_time: '2022-02-14T16:00:01+00:00'
    end_time: '2022-02-14T16:30:00+00:00'
    renewables: 15
    spike_status: none
    range_min: 0.05
    range_max: 0.11
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T03:00:00+10:00'
    per_kwh: 0.23
    spot_per_kwh: 0.08
    start_time: '2022-02-14T16:30:01+00:00'
    end_time: '2022-02-14T17:00:00+00:00'
    renewables: 15
    spike_status: none
    range_min: 0.02
    range_max: 0.1
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T03:30:00+10:00'
    per_kwh: 0.23
    spot_per_kwh: 0.08
    start_time: '2022-02-14T17:00:01+00:00'
    end_time: '2022-02-14T17:30:00+00:00'
    renewables: 15
    spike_status: none
    range_min: 0.02
    range_max: 0.1
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T04:00:00+10:00'
    per_kwh: 0.23
    spot_per_kwh: 0.08
    start_time: '2022-02-14T17:30:01+00:00'
    end_time: '2022-02-14T18:00:00+00:00'
    renewables: 15
    spike_status: none
    range_min: 0.02
    range_max: 0.11
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T04:30:00+10:00'
    per_kwh: 0.23
    spot_per_kwh: 0.08
    start_time: '2022-02-14T18:00:01+00:00'
    end_time: '2022-02-14T18:30:00+00:00'
    renewables: 14
    spike_status: none
    range_min: 0.02
    range_max: 0.1
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T05:00:00+10:00'
    per_kwh: 0.23
    spot_per_kwh: 0.08
    start_time: '2022-02-14T18:30:01+00:00'
    end_time: '2022-02-14T19:00:00+00:00'
    renewables: 14
    spike_status: none
    range_min: 0.04
    range_max: 0.11
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T05:30:00+10:00'
    per_kwh: 0.25
    spot_per_kwh: 0.1
    start_time: '2022-02-14T19:00:01+00:00'
    end_time: '2022-02-14T19:30:00+00:00'
    renewables: 13
    spike_status: none
    range_min: 0.07
    range_max: 0.13
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T06:00:00+10:00'
    per_kwh: 0.25
    spot_per_kwh: 0.11
    start_time: '2022-02-14T19:30:01+00:00'
    end_time: '2022-02-14T20:00:00+00:00'
    renewables: 12
    spike_status: none
    range_min: 0.08
    range_max: 0.16
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T06:30:00+10:00'
    per_kwh: 0.28
    spot_per_kwh: 0.13
    start_time: '2022-02-14T20:00:01+00:00'
    end_time: '2022-02-14T20:30:00+00:00'
    renewables: 12
    spike_status: none
    range_min: 0.09
    range_max: 0.3
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T07:00:00+10:00'
    per_kwh: 0.27
    spot_per_kwh: 0.12
    start_time: '2022-02-14T20:30:01+00:00'
    end_time: '2022-02-14T21:00:00+00:00'
    renewables: 17
    spike_status: none
    range_min: 0.08
    range_max: 0.3
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T07:30:00+10:00'
    per_kwh: 0.26
    spot_per_kwh: 0.11
    start_time: '2022-02-14T21:00:01+00:00'
    end_time: '2022-02-14T21:30:00+00:00'
    renewables: 22
    spike_status: none
    range_min: 0.08
    range_max: 0.16
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T08:00:00+10:00'
    per_kwh: 0.24
    spot_per_kwh: 0.09
    start_time: '2022-02-14T21:30:01+00:00'
    end_time: '2022-02-14T22:00:00+00:00'
    renewables: 28
    spike_status: none
    range_min: 0.07
    range_max: 0.14
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T08:30:00+10:00'
    per_kwh: 0.24
    spot_per_kwh: 0.09
    start_time: '2022-02-14T22:00:01+00:00'
    end_time: '2022-02-14T22:30:00+00:00'
    renewables: 33
    spike_status: none
    range_min: 0.06
    range_max: 0.14
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T09:00:00+10:00'
    per_kwh: 0.23
    spot_per_kwh: 0.08
    start_time: '2022-02-14T22:30:01+00:00'
    end_time: '2022-02-14T23:00:00+00:00'
    renewables: 37
    spike_status: none
    range_min: 0.05
    range_max: 0.12
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T09:30:00+10:00'
    per_kwh: 0.23
    spot_per_kwh: 0.08
    start_time: '2022-02-14T23:00:01+00:00'
    end_time: '2022-02-14T23:30:00+00:00'
    renewables: 40
    spike_status: none
    range_min: 0.06
    range_max: 0.12
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T10:00:00+10:00'
    per_kwh: 0.22
    spot_per_kwh: 0.08
    start_time: '2022-02-14T23:30:01+00:00'
    end_time: '2022-02-15T00:00:00+00:00'
    renewables: 43
    spike_status: none
    range_min: 0.03
    range_max: 0.1
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T10:30:00+10:00'
    per_kwh: 0.22
    spot_per_kwh: 0.07
    start_time: '2022-02-15T00:00:01+00:00'
    end_time: '2022-02-15T00:30:00+00:00'
    renewables: 44
    spike_status: none
    range_min: 0.03
    range_max: 0.09
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T11:00:00+10:00'
    per_kwh: 0.22
    spot_per_kwh: 0.07
    start_time: '2022-02-15T00:30:01+00:00'
    end_time: '2022-02-15T01:00:00+00:00'
    renewables: 45
    spike_status: none
    range_min: 0.03
    range_max: 0.09
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T11:30:00+10:00'
    per_kwh: 0.22
    spot_per_kwh: 0.07
    start_time: '2022-02-15T01:00:01+00:00'
    end_time: '2022-02-15T01:30:00+00:00'
    renewables: 46
    spike_status: none
    range_min: 0.03
    range_max: 0.09
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T12:00:00+10:00'
    per_kwh: 0.21
    spot_per_kwh: 0.07
    start_time: '2022-02-15T01:30:01+00:00'
    end_time: '2022-02-15T02:00:00+00:00'
    renewables: 45
    spike_status: none
    range_min: 0.04
    range_max: 0.09
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T12:30:00+10:00'
    per_kwh: 0.22
    spot_per_kwh: 0.07
    start_time: '2022-02-15T02:00:01+00:00'
    end_time: '2022-02-15T02:30:00+00:00'
    renewables: 43
    spike_status: none
    range_min: 0.05
    range_max: 0.1
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T13:00:00+10:00'
    per_kwh: 0.23
    spot_per_kwh: 0.08
    start_time: '2022-02-15T02:30:01+00:00'
    end_time: '2022-02-15T03:00:00+00:00'
    renewables: 42
    spike_status: none
    range_min: 0.05
    range_max: 0.12
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T13:30:00+10:00'
    per_kwh: 0.24
    spot_per_kwh: 0.09
    start_time: '2022-02-15T03:00:01+00:00'
    end_time: '2022-02-15T03:30:00+00:00'
    renewables: 41
    spike_status: none
    range_min: 0.06
    range_max: 0.15
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T14:00:00+10:00'
    per_kwh: 0.24
    spot_per_kwh: 0.09
    start_time: '2022-02-15T03:30:01+00:00'
    end_time: '2022-02-15T04:00:00+00:00'
    renewables: 40
    spike_status: none
    range_min: 0.07
    range_max: 0.21
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T14:30:00+10:00'
    per_kwh: 0.25
    spot_per_kwh: 0.1
    start_time: '2022-02-15T04:00:01+00:00'
    end_time: '2022-02-15T04:30:00+00:00'
    renewables: 41
    spike_status: none
    range_min: 0.07
    range_max: 0.21
  - duration: 30
    date: '2022-02-15'
    nem_date: '2022-02-15T15:00:00+10:00'
    per_kwh: 0.25
    spot_per_kwh: 0.1
    start_time: '2022-02-15T04:30:01+00:00'
    end_time: '2022-02-15T05:00:00+00:00'
    renewables: 40
    spike_status: none
    range_min: 0.07
    range_max: 0.23
channel_type: general
unit_of_measurement: $/kWh
attribution: Data provided by Amber Electric
icon: mdi:transmission-tower
friendly_name: AmberElectricity - General Forecast

my card config yaml

type: custom:apexcharts-card
header:
  show: true
  title: Amber Electricty Forecast
  show_states: true
  colorize_states: true
series:
  - entity: sensor.amberelectricity_general_forecast
    float_precision: 2
    data_generator: |
      return entity.attributes.forecasts.map((entry) => {
        return [new Date(entry.nem_date), entry.per_kwh];
      });