Student Techlife Student Techlife
  • Categories
    • Student Life
    • Technology
    • Home Assistant
    • 3D Printing
    • DIY
  • My House
  • My Projects
    • Home Assistant Glow
    • NIPKaart
    • Teddy Bear Hunting
    • NFC Scanner
  • Who am I?
  • Contact
0
817 Followers
168 Followers
Student Techlife Student Techlife Student Techlife
  • Categories
    • Student Life
    • Technology
    • Home Assistant
    • 3D Printing
    • DIY
  • My House
  • My Projects
    • Home Assistant Glow
    • NIPKaart
    • Teddy Bear Hunting
    • NFC Scanner
  • Who am I?
  • Contact
  • Home Assistant
  • Integration

EnergyZero market prices with new integration in Home Assistant

  • January 11, 2023
  • Klaas Schoute

Recently we made the switch from a variable energy contract to a dynamic energy contract (ANWB Energie) with a different energy price every hour. In this blog, we’re going to talk about a new integration I’ve been working on for the past month that will be available with the Home Assistant 2023.2 release.

The company logo of EnergyZero

That new integration is EnergyZero, a company where other parties can purchase their electricity/gas according to day-ahead market prices. Well-known partners who work with EnergyZero are, for example:

  • ANWB Energie
  • Mijndomein Energie
  • Energie VanOns

All the companies mentioned above are also available as a virtual integration in Home Assistant.

The idea of dynamic prices is that you can benefit more quickly from changes in the energy market. If you adjust your own energy consumption to consumption in the cheap hours, you could save quite a bit of money. However, there is always a risk because the price can also suddenly become more expensive on average, but in general you would be cheaper than a variable energy contract*.

*at least applicable to our situation

The integration

The integration consists of 2 services, one for gas and one for electricity.

Electricity market prices

screenshot of the electricity sensor entities

The price can be different every hour and the new prices for the next day are published every afternoon around 14:00 UTC time. The following different types of entities are created:

  • The current and next hour electricity market price
  • Average electricity price of the day
  • Lowest energy price
  • Highest energy price
  • Time of day when the price is highest
  • Time of day when the price is at its lowest
  • Percentage of the current price compared to the maximum price of the day

Gas market prices

For gas service, only the current and next hour entity are created, because the prices only change once every 24 hours, so it would not really be necessary to show the min and max, for example. The new price will be published every morning around 05:00 UTC time.

More concrete information about this new integration can also be found in the documentation.

All-in price sensor template

The prices shown in the entities are raw prices that only include the 21% VAT. To determine the current all-in price you can use the template sensor below, which add the energy tax and storage costs.

- sensor:
    - name: EnergyZero all-in current energy price
      unique_id: allin_energy_current_price
      icon: mdi:cash
      unit_of_measurement: "€/kWh"
      state_class: measurement
      device_class: monetary
      state: >
        {% set energy_tax = 0.1524 %}
        {% set storage = 0.02118 %}
        {% set current_price = states('sensor.energyzero_today_energy_current_hour_price') | float %}
        {{ (current_price + energy_tax + storage) | round(4) }}

Personally, I use this entity in the Energy Dashboard to see if the calculated price in Home Assistant corresponds to what is stated in the ANWB Energie app.

You can make a similar template sensor for gas, but the added costs will be slightly different:

- sensor:
    - name: EnergyZero all-in current gas price
      unique_id: allin_gas_current_price
      icon: mdi:cash
      unit_of_measurement: "€/m³"
      state_class: measurement
      device_class: monetary
      state: >
        {% set energy_tax = 0.5927 %}
        {% set storage = 0.08275 %}
        {% set current_price = states('sensor.energyzero_today_gas_current_hour_price') | float %}
        {{ (current_price + energy_tax + storage) | round(4) }}

It may be possible that adjustments are still needed to these templates, so far a comparison between the ANWB Energie app and the Energy Dashboard in Home Assistant shows a small difference.

Please note that the integration does not support the mapping of every hour in Apexcharts via the attributes, this method is a workaround that creates a bulk load of data in the state machine and is not accepted in core.

Who knows, maybe there will be better support for this in the future.

Package on PyPi

Do you want to collect the EnergyZero data in your own way and process it in another project? Then take a look at the repository of the python package, that is also on PyPi. The integration in Home Assistant also uses this package.

Alternatives

In the meantime I’m also working on a similar integration for easyEnergy and if you still want that hourly graph in an Apexchart, try the custom integration of ENTSO-e or Nordpool.

Share
Tweet
Share
Klaas Schoute

Interaction technology (UX/UI) student who loves home automation, drones, open source projects and likes to take you on his adventure to the perfect smart student house.

Related Topics
  • energy
  • integration
  • market prices
Previous Article
  • Projects
  • Technology

Let’s contribute! Hacktoberfest 2022

  • October 2, 2022
  • Klaas Schoute
View Post
You May Also Like
View Post
  • College
  • Home Assistant
  • Student Life

It’s a long time ago

  • Klaas Schoute
  • June 3, 2022
View Post
  • Home Assistant

First integration in Home Assistant!

  • Klaas Schoute
  • June 2, 2021
View Post
  • DIY
  • Home Assistant

Blitzwolf LT11 with ESPHome

  • Klaas Schoute
  • March 11, 2021
Green light in the bathroom
View Post
  • Home Assistant
  • Student Life

How I save water while showering🚿

  • Klaas Schoute
  • December 25, 2020
View Post
  • Home Assistant
  • Student Life
  • Technology

Is this going to be the future?

  • Klaas Schoute
  • November 4, 2020
View Post
  • Home Assistant
  • Student Life
  • Technology

Hello? What is your emergency? 🆘

  • Klaas Schoute
  • February 12, 2020
View Post
  • College
  • Home Assistant
  • Student Life
  • Technology

My cookingplate died 🍳

  • Klaas Schoute
  • December 30, 2019
View Post
  • Home Assistant
  • Student Life
  • Technology

Back to normal business 👨‍💻

  • Klaas Schoute
  • September 1, 2019
3 comments
  1. Erik says:
    January 22, 2023 at 15:09

    Thanks for the work you put in the integration for HA.
    Is it possible to add an extra feature for the addition costs (see Nordpool HACS integration)?

    Kind regards,

    Erik

    Reply
    1. Klaas Schoute says:
      January 22, 2023 at 15:17

      The feature was considered, but ultimately decided not to add it because the additional costs are not given by the API.
      See also this post on the community forum: https://community.home-assistant.io/t/hourly-electricity-prices-netherlands/485842/67

      ./Klaas

      Reply
      1. Kurt says:
        January 28, 2023 at 11:57

        Hoi Erik, Klaas,

        Allereerst wil ik me aansluiten bij de complimenten en dank voor de bestaande intergraties en het energy dashboard.

        Voor Erik, mss kijken op YT ik zag daar oplossingen langskomen met een hulp getal en/of template sensoren om die ‘extra kosten’ toe te voegen boven op het basis tarief. Smart home junkie kanaal oid meen ik.

        Aan Klaas, kwam via een opmerking in de Victron Community weer terug op jouw spoor. Gebruik(te) vorig jaar HA met Zuijdwijks slimme meter in parallel met P1meter van ztatz.nl om de ‘stroom die over is’ via transformator en Victron PV in een batterij te laden en later te ontladen met wat slimmer stekkers. Toch een MWh in huis gehouden. Dus kon je energie Dashboard goed gebruiken 👊🏼

        Voor dit jaar het idee om dat te verbeteren met een multiplus II en minder omzet verliezen.

        Ik ben (nog) geen programmeur en was aan het zoeken in bestaande oplossingen, want wijs worden van bestaand werk geeft hopelijk wat sneller overzicht en/of resultaat. Kwam bij Shelly-Victron/Venus code uit van Fabian Lauer, zag daar jou remark.

        Nu groeit idee twee eigenlijk sneller dan de upgrade: het moet mogelijk zijn om vanuit P1monitor of Esphome-dsmr die data te trekken en op te laten halen/plaatsen in dbus-Venus OS.

        Daarmee zou ik/men in de toekomst het aankopen en plaatsen van een speciale gridmeter besparen en koppelt de bestaande DSMR aan VenusOS, als invoer voor een ESS.

        Hopelijk kom ik na genoeg zelfstudie tot inzicht om deze informatie stroom opgang te krijgen en iets bij te dragen aan onze community.

        Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Author
Klaas Schoute
Interaction technology (UX/UI) student who loves home automation, drones, open source projects and likes to take you on his adventure to the perfect smart student house.
Recent Posts
  • EnergyZero market prices with new integration in Home Assistant January 11, 2023
  • Let’s contribute! Hacktoberfest 2022 October 2, 2022
  • 🅿️ NIPKaart project update August 22, 2022
  • It’s a long time ago June 3, 2022
  • First integration in Home Assistant! June 2, 2021
Instagram
klaasnicolaas
Iedereen een gelukkig nieuwjaar! 🥂
Finally received my @chonkerkeys last week, now online meetings are even more fun! 😁
Wauw wat een mooie show! Als je nog niet geweest moet je zeker gaan, kan nog t/m december 2022 (is alweer verlengd). #soldaatvanoranje #valkenburg #theaterhangaar
Die momenten tussen de sets dat je even met de 🥎 wil spelen 😅 #tennis #rookie #new #sport #training
Follow


Student Techlife Student Techlife
  • Categories
  • My House
  • My Projects
  • Who am I?
  • Contact
Make a student life smarter

Input your search keywords and press Enter.