Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zonneplan prices (current and forecast) are of yesterday instead of today #27

Closed
loedeman opened this issue Nov 17, 2022 · 14 comments
Closed

Comments

@loedeman
Copy link

Recently, Zonneplan started providing the past day in the Home Screen chart. It seems the integration uses those prices now as current and forecast prices. This makes using the integration impossible 🤔😉… Could you please have a look into this?

@loedeman
Copy link
Author

3C27C6B7-2109-481B-8353-E5BD8A5E98D7
872AEB0C-5853-421F-8E04-A97BA41762B9
CC6FD6C5-BB2B-4269-A8E4-161A41A966BE

@loedeman
Copy link
Author

loedeman commented Nov 17, 2022

Dit is de JSON van de uurprijzen API call. Er staan 57 items in de lijst (en hij begint nu idd met 24 uur geleden :-) )...
Zonneplan hourly rates.txt

@loedeman
Copy link
Author

I created a PR for this issue ;-). #28

@fsaris
Copy link
Owner

fsaris commented Nov 17, 2022

Tnx for the pr

Can you also verify this gives the expected values in the morning (before 13.00)? See also #22 (comment)

@loedeman
Copy link
Author

I will look into that when I wake up tomorrow 😉! Will keep you posted!

@loedeman
Copy link
Author

Just checked, the fix also works for the morning (before 1PM). Have a look at the current price data...
Zonneplan hourly rates (before 1PM).txt

@nl0pvm
Copy link

nl0pvm commented Nov 19, 2022

I know this is open source but.... it would be nice if this is released ASAP. As currently all zonneplan API dependent integrations are broken and switching based on yesterday's price data :P

@loedeman
Copy link
Author

I know this is open source but.... it would be nice if this is released ASAP. As currently all zonneplan API dependent integrations are broken and switching based on yesterday's price data :P

I could not agree more - patience is a real virtue though 😀. It should just be a push of the button, isn’t it?

@fsaris fsaris closed this as completed in da15eaa Nov 19, 2022
fsaris added a commit that referenced this issue Nov 19, 2022
@fsaris
Copy link
Owner

fsaris commented Nov 19, 2022

It's released 😉

Tnx @loedeman for the fix

@lenwar
Copy link

lenwar commented Nov 20, 2022

Apologies to hijack this topic but:

@loedeman how did you manage those graphs? I’ve been poking around for weeks to get something like that. Would you mind sharing your yaml?

@loedeman
Copy link
Author

Apologies to hijack this topic but:

@loedeman how did you manage those graphs? I’ve been poking around for weeks to get something like that. Would you mind sharing your yaml?

Hi @lenwar sure, here are the YAMLs for the Lovelace components:

type: custom:apexcharts-card
experimental:
  color_threshold: true
apex_config:
  legend:
    show: false
header:
  show: true
  title: Elektriciteitsprijs komende 8 uur
  standard_format: true
graph_span: 8h
span:
  offset: +8h
yaxis:
  - decimals: 2
series:
  - entity: sensor.zonneplan_forcast_tariff_hour_8
    name: Forecast
    curve: stepline
    float_precision: 2
    offset: '-8h'
    show:
      offset_in_name: false
    color_threshold:
      - value: -1
        color: green
      - value: 0.2
        color: green
      - value: 0.3
        color: orange
      - value: 0.4
        color: red

... and ...

type: custom:apexcharts-card
experimental:
  color_threshold: true
apex_config:
  legend:
    show: false
header:
  show: true
  show_states: true
graph_span: 168h
yaxis:
  - id: elec
    decimals: 2
  - id: gas
    opposite: true
    decimals: 2
series:
  - entity: sensor.zonneplan_current_electricity_tariff
    name: Elektriciteitsprijs
    yaxis_id: elec
    curve: stepline
    stroke_width: 2
    float_precision: 2
    color_threshold:
      - value: -1
        color: green
      - value: 0.2
        color: green
      - value: 0.3
        color: orange
      - value: 0.4
        color: red
    show:
      header_color_threshold: true
  - entity: sensor.zonneplan_current_gas_tariff
    name: Gasprijs
    yaxis_id: gas
    curve: stepline
    opacity: 0.7
    stroke_width: 3
    float_precision: 2
    fill_raw: last
    color_threshold:
      - value: 0
        color: green
      - value: 0.75
        color: green
      - value: 1
        color: blue
      - value: 1.5
        color: gray
    show:
      header_color_threshold: true

@lenwar
Copy link

lenwar commented Nov 21, 2022

Wow, that simple... Thanks!! :)

@lenwar
Copy link

lenwar commented Nov 22, 2022

@loedeman
Just a small FYI: I noticed that I had to change the offset to +7 as the values were one hour off in comparison to the Zonneplan app.

@loedeman
Copy link
Author

@lenwar As far as I can see, not in my install :-) . But happy for you if that fixes things at your end ;-) .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants