JaccoR / hass-entso-e

Integration for Home Assistant to fetch day ahead energy prices from European countries via ENTSO-e Transparency Platform
159 stars 25 forks source link

Charting issue (ApexCharts) #78

Closed lazmo88 closed 1 year ago

lazmo88 commented 1 year ago

Hello, for some reason today ApexCharts example stopped working. As far as I can see data is updated and provided correctly, however the chart isn't reflecting the values.

Any thoughts?

Screenshot_2022-11-19-13-01-12-53_c3a231c25ed346e59462e84656a70e50 Screenshot_2022-11-19-13-01-38-20_c3a231c25ed346e59462e84656a70e50 Screenshot_2022-11-19-13-03-14-93_c3a231c25ed346e59462e84656a70e50

ikke-zelf commented 1 year ago

what browser this is taken from? Safari has issues with the apex-chart

JaccoR commented 1 year ago

Can't reproduce this. Is this still happening?

asdasddffgthhjtreresf commented 1 year ago

Still happening. Im using Chrome and Homeassistant mobileapp in android and the apex charts won't load until very late every other day. The nordpool hacs integration had this same problem earlier, but seems to work better than this now. That was the reason I started using this integration. I have these both running side by side now. Im using both with apexcharts.

jusii commented 1 year ago

I just installed this this morning, an hour ago, and same problem. But I think the issue is that the data shows 2022-11-30 as today and 2022-12-01 as tomorrow. And that's why the chart looks like that. EDIT: maybe this? https://github.com/JaccoR/hass-entso-e/issues/77 state_class: measurement prices_today:

... prices_tomorrow:

lazmo88 commented 1 year ago

Solution: https://community.home-assistant.io/t/custom-component-entso-e-day-ahead-energy-prices/467127/24?u=lazmo88

It is indeed issue with the today/tomorrow dates. Thanks to @RT1080 for pointing out solution 🙏

series:
  - entity: sensor.average_electricity_price_today_2
    show:
      legend_value: false
    stroke_width: 2
    float_precision: 3
    type: column
    opacity: 0.3
    color: '#1007f0'
    data_generator: |
      return entity.attributes.prices_today.map((record, index) => {
        return [record.time, record.price];
      });
  - entity: sensor.average_electricity_price_today_2
    show:
      legend_value: false
    stroke_width: 2
    float_precision: 3
    type: column
    opacity: 0.3
    color: '#07bef0'
    data_generator: |
      return entity.attributes.prices_tomorrow.map((record, index) => {
        return [record.time, record.price];
      });