Zonneplan ONE custom component

Installation of the Zonneplan integration was successful ::slight_smile:

Will all history from my Zonneplan account also be loaded? For now I only see today.

regards,
Bart

No, it will not add the history.

Hi there,

I’m really happy with the Zonneplan integration! As I’m not a programmer myself I was afraid I would not get Zonneplan into my ED. But I run into a few challenges.

First of all, I did read the user manual and tried to do everything by the book. But it could be, due to the huge lack of experience, that I just completely did it wrong. So here are my challenges:

Challenge 1:
I’m trying to get Zonneplan into the ‘return to grid’ setting. As you mentioned in the user manual you have create an integration for that. So I created the integration. Once I would like to add the ‘sensor.zonneplan_p1_electricity_production_kwh’ to the ‘return to grid’ setting, I get the error message:

Entiteit niet gedefinieerd

Controleer de integratie of je configuratie die voorziet in:

** sensor.zonneplan_p1_electricity_production_kwh*

So I removed the: “unit: kWh” line from the configuration, but I still get the same error message.
I’m probably doing something horribly wrong here. (Maybe trying to use the wrong entity? But which one do I use here?) Is there someone who can help me with this?

Challenge 2:
I have the same challenge with the Solar Energie Production field. I also tried the ‘sensor.zonneplan_p1_electricity_production_kwh’ enity here, but got the same error message back as described above.

So a long story cut short:
Which entity do I need to enter in the ‘Return to grid’ field?
Wich enitity do I need to enter in the ‘Solar Energy Production’ field?
What changes do I have to make to the configuration file to make this work.

Sorry if I’m asking the noob questions, I’m trying to learn as I go.

Thnx in advance!

I’ve setup the integration but the forecast per hour does not seem to be corresponding with the app.
The screenshot of HA show the next 8 hours forecast. This does not line up with the zonneplan app and actual prices.
Am I missing something here?

Hello,

I have installed Zonneplan one and enabled all sensors. I want to make the tariff sensors visible in a Bar Graph.

The only thing is, How do i create this graph. if i try to create a statistics graph the tariff sensors are not available.

Can anyone help me in the right direction?

Seems to be a known issue:

Today my integration is showing the error 403, message=‘Forbidden’, url=URL(‘https://app-api.zonneplan.nl/connections/1234567-7848482747/summary’)

Is the API not available anymore? Or is there a bug in the code?

Looks like Zonneplan changed the API. Need to check the this. Hope to find some time for this during the weekend.

1 Like

Great work on this intergration, moving to Zonneplan next week, already loving this.

App reports tarriffs deeper into the future then the 8 hrs I seem to get in HA.
Any chance this can be expanded?

The full available forcast is available as attribute of the Zonneplan current electricity tariff sensor.

See also Feature request: prices today and tomorrow · Issue #22 · fsaris/home-assistant-zonneplan-one · GitHub

I evidently need to open my eyes.
Thanks!

I worked on this today.
You only need the current tariff sensor, forecast data exists in the attributes.

You’ll want to install ApexCharts in home assistant via HACS, once completed you can add Custom: ApexChart cards to Lovelace.
I’m currently using this fairly crude bar graph:

image

Code for it:

type: custom:apexcharts-card
graph_span: 26h
span:
  start: day
  offset: +17H
header:
  title: Zonneplan Forecast
  show: true
now:
  show: true
  label: NOW
series:
  - entity: sensor.zonneplan_current_electricity_tariff
    unit: €/kWh
    type: column
    float_precision: 2
    data_generator: |
      return entity.attributes.forcast.map((entry) => {
         return [new Date(entry.datetime), entry.electricity_price / 10000000];
       });
yaxis:
  - id: '1'
    decimals: 2

I’m sure this can be done better, but i’ve got what I need for now and will make this pretty later.

2 Likes

Thx! Just what is was looking for! many thanks… ( have been struggling for some days :slight_smile: )

Schermafbeelding 2022-12-18 om 18.27.43

and code:

type: custom:apexcharts-card
apex_config:
  chart:
    height: 200px
experimental:
  color_threshold: true
graph_span: 30h
span:
  start: day
  offset: +4h
update_interval: +1h
header:
  title: Zonneplan Forecast
  show: true
now:
  show: true
  label: NU
series:
  - entity: sensor.zonneplan_current_electricity_tariff
    color_threshold:
      - value: 0
        color: lightgreen
      - value: 0.25
        color: green
      - value: 0.4
        color: red
    type: column
    float_precision: 2
    data_generator: |
      return entity.attributes.forcast.map((entry) => {
         return [new Date(entry.datetime), entry.electricity_price / 10000000];
       });
yaxis:
  - id: '1'
    decimals: 2
    min: 0.1
1 Like

Was trying to find the Zonneplan integration via HACS. I remember it was there few weeks ago but did not get around to install it. Now i don’t see it anymore. Any know reason for that? Before I add as custom repository, I just want to check

It should still be there.

It’s still on the list https://hacs-repositories.web.app/

1 Like

Thanks for this integration, my contract starts tomorrow so prepping for the transition from Frank Energie.

Question though, my integration shows everything (all entities including the 8hour forecast) except for the gas price- is this a known issue? Could it be because my contract is not yet active?

Whoops. My bad. Typo.

Contract is now active - still “unknown” - also logged at github.

In the mean time I setup a rest sensor which is updated at 6.10 am (and once more at 7.10am in case the data is not yet available).

For those with the same “challenge”:

platform: rest
resource: https://enever.nl/feed/gasprijs_vandaag.php
name: Gas price
scan_interval: 86400
json_attributes: data
value_template: "OK"
platform: template
sensors:
  calculated_gas_price:
    device_class: monetary
    unit_of_measurement: €/m³
    unique_id: “gas_price”
    value_template: '{% for i in states.sensor.gas_price.attributes.data %}{{ i.prijsZP}}{% endfor %}'
    friendly_name: Gas price