Zonneplan ONE custom component

The entity: Zonneplan P1 electricity production should also be in kWh and not in W(att). I see that you now have the wrong dimension used. You don’t have to convert the numbers, it is already in kWh.
Correct me if I am wrong.

See Energy production in the Energy dashboard · Issue #8 · fsaris/home-assistant-zonneplan-one · GitHub this value is in watt that’s also visible in the Zonneplan app that way. But you can add a additional sensor to your configuration that calculates a energy kWh value based on the production W value.

  - platform: integration
    source: sensor.zonneplan_p1_electricity_production
    name: electricity_production
    unit: kWh
    unit_prefix: k
    round: 2

See also Integration - Riemann sum integral - Home Assistant

1 Like

Thanks for making this component! I’ve installed it and it is working. Only one thing I do not understand is, which sensor do I configure as the “return to the grid” sensor? Currently it only shows the solar pannel output in the energy overview. See screenshot

Seams that you added the additional sensor for the solar production already

That’s what you delivered back to the grid.

Zonneplan yield total is what you’re panels produced
Zonneplan P1 electricity consumption today is what you used from the grid

Ah, tanks! So I’ve misinterpreted them. I’m going to reconfigure them :slight_smile:

1 Like

I had an ‘unauthorized’ error twice over the past few weeks. Removing the integration and re-adding it solved the problem by going through the authentication flow again. Are there more people that have seen this? Could this be related to using both app and HAS, or maybe due to polling the API too often?

Did you see some error in the logs? If a new login token is requested (is done automatically by the integration when old token is almost expired) but the response couldn’t be processed correctly by HA you get this error to.

I don’t it’s related to the polling rate etc. I was in contact with Zonneplan regarding this integration and I know some of the devs there also use/tried it. If the rate was to high I would have expected a message from them to improve the integration.

It’s still on my list to add a notification when token has expired with a option to redo the authentication process. HA integrated some helpers for this a while back.

Stumbled on this integration by searching for a component to retrieve the hourly energy prices from the zonneplan app. It is a new energy contract option Zonneplan released a few weeks ago.
I will certainly use this component since next week my solar panels will be mounted.

Do you know if it is possible to also retrieve the energy prices per hour for the coming 24 hours?
I would like to use this to start/stop the charching of my EV, so based on the energy price per hour and/or overcapacity on the solarpanels.

1 Like

If this info is available in de Zonneplan app then it should be possible to add this to the integration

Sorry for the late reply, but wanted first to add the integration of my car and Zonneplan to HA. This was successful!

In the Zonneplan app the data is available, see image below.
The app shows the tariff per hour for the next hours (this is updated once a day around noon.
Is this something you could add to this integration/API?

Found the API call that provides this data.

It provides all the data you find on the “Live” tab in the app.

  • current actual usage
  • if the current tariff type is high, normal or low
  • the value from the graph (hourly rates)

And from these last values the lowest hourly rate is shown below as “Slim verbruiken” and the highest as “Verbruik vermijden”.

How would you want to have these values as sensors in HA so you could use the for an automation? Would say that all the marked as green hours would be interesting.

Maybe I can find some example integration that also provides prediction data to look how this can be provided to HA

1 Like

Nice! So the data could be made available. I am kind of new to HA. But ilI think it should be a sensor. I think it should be the same as with the solar power forcast. There they also have sensors for the forecast for the coming hours.

Can you have a look at this issue? Thx.

Created a first update with the current tariff info. See version 0.0.7

Please update to version 0.0.8 :slight_smile:

1 Like

Looking very nice already! Only 2 questions.

  1. It seems to be that all the new entities are double?
  2. Would it be possible to also add the tarrifs for the next X hours? In the Zonneplan app I can see the tarrifs for the next (max) 24 hours. But I think the next 8 hours should be enough for my implementation.

Not sure what happened there. Are the additional entities “broken”? What you could try to do is removing the integration and re-adding it again. That should cleanup the double entities.

Will add the forecast for the next 8 hours. We have the tariff group (low, normal and high) and a tariff value.

Just curious, what kind of automation do you have in mind using this for? Or is it just that you want to see the forecast in HA

Will try to reinstall it, the additional entities are not broken but just double. So the tariff group and value both have a “_2” entities. And the device “Usage” is double. But both seem to work and give the correct values.

I would like to use it to determine when the best moment would be to charge my electric car. So depending on overproduction on solar power and/or low tariff on energy.

Thanks you for building this integration and expanding it to my needs :slight_smile:

FYI: the sensor.current.tariff does not have the correct unit of measure to use within the energy dashboard, see error message:

Unexpected unit of measurement

Translation Error: The intl string context variable "currency" was not provided to the string "The following entities do not have the expected units of measurement ''{currency}/kWh'', ''{currency}/Wh'' or ''{currency}/MWh'':"

* sensor.current_tariff (€)

Would be nice if that could be changed in a next version release.

I added some forecast sensors to current main version. Could you check if these work for you? GitHub - fsaris/home-assistant-zonneplan-one: Unofficial Zonneplan ONE + connect integration for Home Assistant

Regarding the currency message. Did you set your currency on Configuration -> Settings?

Nice! The tariff and tariff group for next 8 hours are werking great!
Now I can start to try make a nice automation arround it! Thanks again!

Regarding the unit of measure; I do have set my currency in the settings set to EUR.
I think the issue is that either Zonneplan app of yourself are adding a unit of measeure “currency” to the entity “current tariff”. The standard energy dashboard intergration in HA wants a unit of measure "currency / kWh or Wh or mWh. In this case it should be kWh.