NordPool-core integration with ApexCharts?

We have now NordPool integration in HA Core, which is great thing itself. Previously we had to use NordPool custom integration, which is great integration generally. However, moving to Core integration from HACS version broke my ApexCharts graphs on NordPool prices (today and tomorrow).

Tried to understand data_generator of ApexCharts, it was no-go for me. Naturally I changed data generator to read new NordPool sensor, however, it returns values slighlty differently comapred to HACS Nordpool? For example, whole day and next day are returned as part of sensor.average_electricity_price_today

Has anyone changed to Core-version of NordPool integration and working ApexCharts config to share? Thanks in advance!

2 Likes

It seems I made mistake about sensor.average_electricity_price_today, it’s sensor by Entso-e platform, I had it also installed because of redundancy.

Could you provide your code that works to show the prices of today and tomorrow ?

Mine is no longer working and I get only today or tomorrow.

  series:
    - entity: sensor.nordpool_kwh_ger_eur_4_10_0
      name: "\_PREIS"
      unit: "\_CENT / kWh"
      yaxis_id: first
      show:
        in_header: before_now
        name_in_header: false
        extremas: true
      color_threshold:
        - value: 17.5
          color: 4DD0E1
        - value: 20
          color: 26A69A
        - value: 22.5
          color: 4CAF50
        - value: 25
          color: 7CB342
        - value: 30
          color: FBC02D
        - value: 35
          color: EF6C00
        - value: 40
          color: B71C1C
      type: line
      curve: stepline
      extend_to: false
      stroke_width: 4
      float_precision: 1
      data_generator: |
        return entity.attributes.raw_today.map((start, index) => {
          return [new Date(start["start"]).getTime(), entity.attributes.raw_today[index]["value"]];
        });
1 Like

Have you managed to solve it? I’m also having the same issue. I can’t find a way to show the prices in a chart (preferably Apexcharts) for yesterday and today.

My solution was to continue using Entso-e platform (from HACS), integrated Nordpool isn’t mature enough IMO. I’ll give it a try later, when it has more features. With Entso-e, it’s easy to work with Apex Charts.