infradom / dynamic_grid_prices

Dynemic Grid Prices
MIT License
2 stars 0 forks source link

Integration does not show prices anymore (due to update or change of ENTSOE API ???) #2

Open chribat opened 2 days ago

chribat commented 2 days ago

Since a few days, the integration does not show the prices anymore. I guess this is due to a server/API update on ENTSOE website. Would it be possible to correct the integration so that it works again?

infradom commented 2 days ago

I also noticed a strange behaviour since a couple of days, but I still got prices, maybe because my backup source still works. I will have a look, hopefully I can solve it quickly ...

infradom commented 2 days ago

I cannot yet reproduce your problem. I will retry on the latest HA version to see if the error appears then.

image
infradom commented 2 days ago

one more note: the strange behavior I talked about (23 data points instead of 24) seems to be gone today. Maybe entsoe corrected a bug that was introduced a couple of days ago .. I continue to try to reproduce ...

infradom commented 2 days ago

correction: the strang behavior is still there:

image

(a hole in the data around midnight, and a loopback at the end)

chribat commented 2 days ago

image

I reconfigured and generated a new API key. Now, it seems to work again. Congratulations for the very nice graph above. I would be interested to have it. I also use Solcast for prediction (Ecopower, SolarEdge, Battery...). Which integration do you use for polling Solcast data?

infradom commented 2 days ago

I use the solcast-solar integration (https://github.com/BJReplay/ha-solcast-solar), but as solcast limits the number of requests, I have configured a small automation that triggers the solcast periodic fetch: (every 2 hours during day): alias: Solcast description: "" mode: single triggers:

infradom commented 2 days ago

The graph code (with the bug):

type: custom:apexcharts-card
experimental:
  color_threshold: true
graph_span: 47h
header:
  title: Ecopower Injection Price (Day Ahead) vs Solar Forecast
  show: true
span:
  start: day
all_series_config:
  show:
    legend_value: false
    datalabels: false
    extremas: false
    in_brush: true
  extend_to: false
  stroke_width: 2
  float_precision: 3
  type: area
  invert: false
  fill_raw: last
now:
  show: true
  label: Now
series:
  - entity: sensor.solcast_pv_forecast_forecast_today
    type: line
    color: "#ffcfff"
    show:
      extremas: true
    float_precision: 3
    yaxis_id: "2"
    data_generator: |
      return entity.attributes.detailedForecast.map((start, index) => {
        return [new Date(start["period_start"]).getTime(), entity.attributes.detailedForecast[index]["pv_estimate"]];
      })
  - entity: sensor.solcast_pv_forecast_forecast_tomorrow
    type: line
    color: "#ffcfff"
    show:
      extremas: true
    float_precision: 3
    yaxis_id: "2"
    data_generator: |
      return entity.attributes.detailedForecast.map((start, index) => {
        return [new Date(start["period_start"]).getTime(), entity.attributes.detailedForecast[index]["pv_estimate"]];
      }) ;
  - entity: sensor.dynamic_grid_prices_injection_price
    type: line
    curve: stepline
    show:
      extremas: true
    float_precision: 3
    extend_to: false
    yaxis_id: "1"
    data_generator: |
      return entity.attributes.raw_today.map((start, index) => {
        return [new Date(start["start"]).getTime(), entity.attributes.raw_today[index]["value"]];
      });
    color_threshold:
      - value: 0.45
        color: "#04822E"
      - value: 0.4
        color: "#12A141"
      - value: 0.35
        color: "#79B92C"
      - value: 0.3
        color: "#C4D81D"
      - value: 0.25
        color: "#F3DC0C"
      - value: 0.2
        color: "#EFA51E"
      - value: 0.15
        color: "#E76821"
      - value: 0.1
        color: "#DC182F"
  - entity: sensor.solax_pv_power_total
    type: area
    color: "#8080ff"
    show:
      extremas: true
    transform: return x / 1000;
    float_precision: 3
    yaxis_id: "2"
yaxis:
  - id: "1"
    min: ~0
    align_to: 0.1
    decimals: 2
    apex_config:
      title:
        text: €/kWh
      tickAmount: 4
  - id: "2"
    min: ~0
    align_to: 0.1
    decimals: 0
    opposite: true
    apex_config:
      title:
        text: kW
      tickAmount: 4
apex_config:
  xaxis:
    type: datetime
    tooltip:
      enabled: false
  chart:
    height: 500px
  legend:
    show: false
    floating: true
    offsetY: 25