Last month I wrote a blog about the EnergyZero integration, but this month we are going to talk about a new integration for easyEnergy! In this blog more information about the new integration, which will be available from the Home Assistant 2023.3 (March) release.
easyEnergy is a company with dynamic energy contracts where you can buy/sell electricity/gas according to day-ahead market prices, since 2018 the company has been taken over by energy supplier NieuweStroom.
Why then does the integration still carry the name easyEnergy?
Currently, both companies display energy prices on their websites that come from the easyEnergy API. Should this ever change in the future, I will reconsider whether everything should be renamed to the name of the new API source.
The integration
The integration consists of 3 services, one for gas and two for electricity. This is partly because the API returns separate prices for what you use (buy) or what you return (sell). At the moment there is no service for gas that you return (sell), because I don’t know of any case where this applies.
Electricity market prices (usage / return)
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:
- Th
e
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 for the day will take effect in the 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. The templates below are based on added prices that easyEnergy communicates, you may still have to adjust them for your own situation.
Templates were last updated on: 21-12-2023
- sensor:
- name: easyEnergy all-in current energy price
unique_id: allin_energy_current_price
icon: mdi:cash
unit_of_measurement: "€/kWh"
state_class: measurement
state: >
{% set energy_tax = 0.15245 %}
{% set storage = 0.02178 %}
{% set gvo = 0.00908 %}
{% set current_price = states('sensor.easyenergy_today_energy_usage_current_hour_price') | float | default(None) %}
{{ (current_price + energy_tax + storage + gvo) | round(4) }}
You can make a similar template sensor for gas, but the added costs will be slightly different:
- sensor:
- name: easyEnergy all-in current gas price
unique_id: allin_gas_current_price
icon: mdi:cash
unit_of_measurement: "€/m³"
state_class: measurement
state: >
{% set energy_tax = 0.59266 %}
{% set storage = 0.1089 %}
{% set region = 0.01903 %}
{% set current_price = states('sensor.easyenergy_today_gas_current_hour_price') | float | default(None) %}
{{ (current_price + energy_tax + storage + region) | round(4) }}
hourly price service calls
From Home Assistant version 2024.1, the easyEnergy integration has a number of service calls, with which you can request an array of hourly prices from easyEnergy and use them in an Apexchart.
The documentation of these service calls can be found here and to make it a bit easier for you, I’ve created a GitHub gist with code to create a trigger template sensor. This allows you to create template sensors for today and tomorrow. where the hourly price data is stored as an attribute in the template sensor. You will also find code to create a simple version of the above Apexcharts in your dashboard.
Package on PyPi
Do you want to collect the easyEnergy 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.