fsaris / home-assistant-zonneplan-one

Unofficial Zonneplan integration for Home Assistant
https://github.com/fsaris/home-assistant-zonneplan-one
MIT License
108 stars 18 forks source link

Feature request: prices today and tomorrow #22

Closed tieskuh closed 1 year ago

tieskuh commented 2 years ago

Hi,

Thank you very much for creating this integration. Would it be possible to get the prices for today (24 hrs) and tomorrow (24 hrs) instead of only the next 8 hours. I can see this data is available in the app. I currently get this data from the Nordpool integration: https://github.com/custom-components/nordpool but these prices differ a little bit from the Zonneplan prices somehow (I add the Zonneplan additional costs to the kWh price).

This is what I am trying to achieve: image

This are the Nordpool attributes: nordpool sensor.txt

fsaris commented 2 years ago

Need to check if the Zonneplan API provides this info. I assume it does if you see this info in there app.

fsaris commented 2 years ago

Would it be possible to get the prices for today (24 hrs) and tomorrow (24 hrs) instead of only the next 8 hours. I can see this data is available in the app.

I'm not seeing this data in the app. Probably because Zonneplan isn't by energy supplier.

The API call's I currently know only give a forecast up to 24 hours. Not sure anymore when this switches to the next day. But ended up with only adding 8 hours because other data isn't always available.

Here the discussion about the 8 hours https://community.home-assistant.io/t/zonneplan-one-custom-component/283435/38

Are you sure you can see up to 48hours of forecast in the app?

tieskuh commented 2 years ago

Hi Frans,

Until 13:00 you can see the tarifs for the current day. At 13:00 the prices for the next day are published in the app. At that point you can see the prices for the remaining 11 hours of the current day and the prices for the 24 hours of tomorrow.

It would be nice to have the prices for the current day (all 24 hours) and the next day (when available around 13:00).

PS: perhaps you looked at the data before 13:0 today tomorrow 0

fsaris commented 2 years ago

@tieskuh ah, indeed now there are forecast for tomorrow to.

But not sure how to convert this into sensors that give a meaningful value? Because half of the time the sensors will have no value. Around 12h I could fill the forecast for tomorrow. How would you want those sensors to be named?

jstelten commented 2 years ago

Hi,

Thank you very much for creating this integration. Would it be possible to get the prices for today (24 hrs) and tomorrow (24 hrs) instead of only the next 8 hours. I can see this data is available in the app. I currently get this data from the Nordpool integration: https://github.com/custom-components/nordpool but these prices differ a little bit from the Zonneplan prices somehow (I add the Zonneplan additional costs to the kWh price).

This is what I am trying to achieve: image

This are the Nordpool attributes: nordpool sensor.txt

Zou je de yaml van de rechter grafiek met me kunnen delen of een mooie grafiek met de data van Zonneplan? Ben pas begonnen met HA en dus nog even mn weg vinden om de data op de juiste manier te tonen en te bereken :)

tieskuh commented 1 year ago

Hi, Thank you very much for creating this integration. Would it be possible to get the prices for today (24 hrs) and tomorrow (24 hrs) instead of only the next 8 hours. I can see this data is available in the app. I currently get this data from the Nordpool integration: https://github.com/custom-components/nordpool but these prices differ a little bit from the Zonneplan prices somehow (I add the Zonneplan additional costs to the kWh price). This is what I am trying to achieve: image This are the Nordpool attributes: nordpool sensor.txt

Zou je de yaml van de rechter grafiek met me kunnen delen of een mooie grafiek met de data van Zonneplan? Ben pas begonnen met HA en dus nog even mn weg vinden om de data op de juiste manier te tonen en te bereken :)

Maar natuurlijk. Ik gebruik daarvoor de apexcharts-card.

vandaag.txt morgen.txt

tieskuh commented 1 year ago

@tieskuh ah, indeed now there are forecast for tomorrow to.

But not sure how to convert this into sensors that give a meaningful value? Because half of the time the sensors will have no value. Around 12h I could fill the forecast for tomorrow. How would you want those sensors to be named?

Nordpool has all the prices in a single sensor:

This works great but as mentioned, the prices aren't completely the same as the Zonneplan tariffs. Therefore it would be great to have this data from Zonneplan.

current_price: 0.2717888
average: 0.23410536666666668
off_peak_1: 0.2382763375
off_peak_2: 0.20174492500000002
peak: 0.231014825
min: 0.1774209
max: 0.2754793
unit: kWh
currency: EUR
country: Netherlands
region: NL
low price: false
tomorrow_valid: true
today: 0.2519932, 0.2478671, 0.2347749, 0.2278658, 0.2278658, 0.2331293, 0.2408733, 0.2418413, 0.2425915, 0.2444428, 0.2356945, 0.2251433, 0.2217069, 0.2089293, 0.2229169, 0.2367956, 0.2524893, 0.2717888, 0.2754793, 0.2673602, 0.2229895, 0.2090624, 0.1975069, 0.1774209
tomorrow: 0.1435893, 0.1177316, 0.129154, 0.1148881, 0.1529789, 0.1190989, 0.1467353, 0.1242293, 0.1295291, 0.1483083, 0.1565363, 0.1638931, 0.2182463, 0.1603357, 0.1792359, 0.1793932, 0.1863386, 0.2633793, 0.2511583, 0.2512793, 0.2182463, 0.2071385, 0.1880326, 0.1531846
raw_today: 
- start: '2022-11-05T00:00:00+01:00'
  end: '2022-11-05T01:00:00+01:00'
  value: 0.2519932
- start: '2022-11-05T01:00:00+01:00'
  end: '2022-11-05T02:00:00+01:00'
  value: 0.2478671
- start: '2022-11-05T02:00:00+01:00'
  end: '2022-11-05T03:00:00+01:00'
  value: 0.2347749
- start: '2022-11-05T03:00:00+01:00'
  end: '2022-11-05T04:00:00+01:00'
  value: 0.2278658
- start: '2022-11-05T04:00:00+01:00'
  end: '2022-11-05T05:00:00+01:00'
  value: 0.2278658
- start: '2022-11-05T05:00:00+01:00'
  end: '2022-11-05T06:00:00+01:00'
  value: 0.2331293
- start: '2022-11-05T06:00:00+01:00'
  end: '2022-11-05T07:00:00+01:00'
  value: 0.2408733
- start: '2022-11-05T07:00:00+01:00'
  end: '2022-11-05T08:00:00+01:00'
  value: 0.2418413
- start: '2022-11-05T08:00:00+01:00'
  end: '2022-11-05T09:00:00+01:00'
  value: 0.2425915
- start: '2022-11-05T09:00:00+01:00'
  end: '2022-11-05T10:00:00+01:00'
  value: 0.2444428
- start: '2022-11-05T10:00:00+01:00'
  end: '2022-11-05T11:00:00+01:00'
  value: 0.2356945
- start: '2022-11-05T11:00:00+01:00'
  end: '2022-11-05T12:00:00+01:00'
  value: 0.2251433
- start: '2022-11-05T12:00:00+01:00'
  end: '2022-11-05T13:00:00+01:00'
  value: 0.2217069
- start: '2022-11-05T13:00:00+01:00'
  end: '2022-11-05T14:00:00+01:00'
  value: 0.2089293
- start: '2022-11-05T14:00:00+01:00'
  end: '2022-11-05T15:00:00+01:00'
  value: 0.2229169
- start: '2022-11-05T15:00:00+01:00'
  end: '2022-11-05T16:00:00+01:00'
  value: 0.2367956
- start: '2022-11-05T16:00:00+01:00'
  end: '2022-11-05T17:00:00+01:00'
  value: 0.2524893
- start: '2022-11-05T17:00:00+01:00'
  end: '2022-11-05T18:00:00+01:00'
  value: 0.2717888
- start: '2022-11-05T18:00:00+01:00'
  end: '2022-11-05T19:00:00+01:00'
  value: 0.2754793
- start: '2022-11-05T19:00:00+01:00'
  end: '2022-11-05T20:00:00+01:00'
  value: 0.2673602
- start: '2022-11-05T20:00:00+01:00'
  end: '2022-11-05T21:00:00+01:00'
  value: 0.2229895
- start: '2022-11-05T21:00:00+01:00'
  end: '2022-11-05T22:00:00+01:00'
  value: 0.2090624
- start: '2022-11-05T22:00:00+01:00'
  end: '2022-11-05T23:00:00+01:00'
  value: 0.1975069
- start: '2022-11-05T23:00:00+01:00'
  end: '2022-11-06T00:00:00+01:00'
  value: 0.1774209

raw_tomorrow: 
- start: '2022-11-06T00:00:00+01:00'
  end: '2022-11-06T01:00:00+01:00'
  value: 0.1435893
- start: '2022-11-06T01:00:00+01:00'
  end: '2022-11-06T02:00:00+01:00'
  value: 0.1177316
- start: '2022-11-06T02:00:00+01:00'
  end: '2022-11-06T03:00:00+01:00'
  value: 0.129154
- start: '2022-11-06T03:00:00+01:00'
  end: '2022-11-06T04:00:00+01:00'
  value: 0.1148881
- start: '2022-11-06T04:00:00+01:00'
  end: '2022-11-06T05:00:00+01:00'
  value: 0.1529789
- start: '2022-11-06T05:00:00+01:00'
  end: '2022-11-06T06:00:00+01:00'
  value: 0.1190989
- start: '2022-11-06T06:00:00+01:00'
  end: '2022-11-06T07:00:00+01:00'
  value: 0.1467353
- start: '2022-11-06T07:00:00+01:00'
  end: '2022-11-06T08:00:00+01:00'
  value: 0.1242293
- start: '2022-11-06T08:00:00+01:00'
  end: '2022-11-06T09:00:00+01:00'
  value: 0.1295291
- start: '2022-11-06T09:00:00+01:00'
  end: '2022-11-06T10:00:00+01:00'
  value: 0.1483083
- start: '2022-11-06T10:00:00+01:00'
  end: '2022-11-06T11:00:00+01:00'
  value: 0.1565363
- start: '2022-11-06T11:00:00+01:00'
  end: '2022-11-06T12:00:00+01:00'
  value: 0.1638931
- start: '2022-11-06T12:00:00+01:00'
  end: '2022-11-06T13:00:00+01:00'
  value: 0.2182463
- start: '2022-11-06T13:00:00+01:00'
  end: '2022-11-06T14:00:00+01:00'
  value: 0.1603357
- start: '2022-11-06T14:00:00+01:00'
  end: '2022-11-06T15:00:00+01:00'
  value: 0.1792359
- start: '2022-11-06T15:00:00+01:00'
  end: '2022-11-06T16:00:00+01:00'
  value: 0.1793932
- start: '2022-11-06T16:00:00+01:00'
  end: '2022-11-06T17:00:00+01:00'
  value: 0.1863386
- start: '2022-11-06T17:00:00+01:00'
  end: '2022-11-06T18:00:00+01:00'
  value: 0.2633793
- start: '2022-11-06T18:00:00+01:00'
  end: '2022-11-06T19:00:00+01:00'
  value: 0.2511583
- start: '2022-11-06T19:00:00+01:00'
  end: '2022-11-06T20:00:00+01:00'
  value: 0.2512793
- start: '2022-11-06T20:00:00+01:00'
  end: '2022-11-06T21:00:00+01:00'
  value: 0.2182463
- start: '2022-11-06T21:00:00+01:00'
  end: '2022-11-06T22:00:00+01:00'
  value: 0.2071385
- start: '2022-11-06T22:00:00+01:00'
  end: '2022-11-06T23:00:00+01:00'
  value: 0.1880326
- start: '2022-11-06T23:00:00+01:00'
  end: '2022-11-07T00:00:00+01:00'
  value: 0.1531846

unit_of_measurement: EUR/kWh
icon: mdi:flash
friendly_name: nordpool_kwh_nl_eur_7_10_021
image
fsaris commented 1 year ago

@tieskuh in current main version the forcast is now available as attribute of the Zonneplan current electricity tariff sensor

tieskuh commented 1 year ago

@tieskuh in current main version the forcast is now available as attribute of the Zonneplan current electricity tariff sensor

Great! Many thanks!!