Some YAML help for the Apex Charts card?

hey folks, wondering if there are any YAML experts here. I am trying to learn on YouTube as much as I can, but I’m stumped on this one.
I’m in Ontario (Canada) and have the Ontario energy Board Integration loaded. In that, my electricity provider is listed with my time of use rates. I have put in the following YAML code to try to get an hourly cost breakdown for each day of the electricity I use. I got this off of a YouTube video.
It doesn’t error on me, but it says “loading” and has said so all day. My totally uneducated guess is that the attributes in my Provider, do not match that in the line of code. I am guessing it is in the data generator area?
Anyway, if anyone can help I’d appreciate it. Below is the YAML code I have, and below that I will try to put the attributes of my electricity company in HA, as well as the “loading” screen.

**Edit: My apologies, I did not read the posting rules (been a long day). I have edited below. This has not yet worked for me, I am trying it for the first time. Nothing appears in the logs (likely as I am not getting an error).


Here is the YAML

type: custom:apexcharts-card
graph_span: 24h
  title: Energy Price Today
  show: true
  start: day
  show: true
  label: Now
  - entity: sensor.westario_power_inc_residential_rate
    color: green
    type: column
    float_precision: 2
    data_generator: |
      return, index) => {
        return {new Date(time).getTime(), entity.attributes.prices
  - decimals: 2
      tickAmount: 10;

Please do not post pictures of text. Paste the config and format it correctly for the forum, see: How to help us help you - or How to ask a good question

my apologies, I will fix.

1 Like

This part is used when you have a series of data in your attributes (e.g like a weather forecast). The sreen shots of the entity donot show that and I doubt that this type of entity has that data (but I can be wrong of course). I see that your sensor updates the state so what happens if you just omit this part…alike:

  - entity: sensor.westario_power_inc_residential_rate

Another tip is…start small when you are new to things, donot add yaxis, attributes, colors etc…any typo or wrong attrib risks it to not work. First get a graph with data, then add esthetics