EnergyZero

The EnergyZero integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] integrates the EnergyZero API platform with Home Assistant.

The integration makes it possible to retrieve the dynamic energy/gas prices from EnergyZero to gain insight into the price trend of the day and to adjust your consumption accordingly.

Partners who are a reseller from EnergyZero:

Configuration

To add the EnergyZero service to your Home Assistant instance, use this My button:

Manual configuration steps

If the above My button doesn’t work, you can also perform the following steps manually:

  • Browse to your Home Assistant instance.

  • Go to Settings > Devices & services.

  • In the bottom right corner, select the Add Integration button.

  • From the list, select EnergyZero.

  • Follow the instructions on screen to complete the setup.

Use cases

With the energy dashboard you can use the current hour price entity to calculate how much the electricity or gas has cost each hour based on the prices from EnergyZero. Or use one of the actions in combination with a template sensor to show the prices for the next 24 hours in a chart on your dashboard.

Data updates

The integration will poll the EnergyZero API every 10 minutes to update the data in Home Assistant.

Known limitations

The prices retrieved via the API are bare prices including VAT, however an energy company also charges other rates such as energy tax and purchase costs. The integration has no configuration option to add these values, but you could create a template sensor for this.

Sensors

The EnergyZero integration creates several sensor entities for both gas and electricity prices.

Energy market price

Every day around 14:00 UTC time, the new prices are published for the following day.

  • 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

Gas market price

For the dynamic gas prices, only entities are created that display the current and next hour price because the price is always fixed for 24 hours; new prices are published every morning at 05:00 UTC time.

List of actions

The EnergyZero integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] provides the following actions. Each link below opens a dedicated page with examples, parameters, and a step-by-step UI walkthrough.

  • Get energy prices (energyzero.get_energy_prices) Requests energy prices from EnergyZero.

  • Get gas prices (energyzero.get_gas_prices) Requests gas prices from EnergyZero.

For an overview of every action across all integrations, see the actions reference.

Templates

Create template sensors to display the prices in a chart or to calculate the all-in hour price.

Prices sensor with response data

To use the response data from the actions, you can create a template sensor that updates every hour.

template:
  - trigger:
      - trigger: time_pattern
        hours: "*"
    action:
      - action: energyzero.get_energy_prices
        response_variable: prices
        data:
          config_entry: 1b4a46c6cba0677bbfb5a8c53e8618b0
          incl_vat: true
    sensor:
      - name: Energy prices
        device_class: timestamp
        state: "{{ now() }}"
        attributes:
          prices: '{{ prices }}'

All-in price sensor

To calculate the all-in hour price, you can create a template sensor that calculates the price based on the current price, energy tax, and purchase costs.

template:
  - sensor:
      - name: EnergyZero all-in current price
        unique_id: allin_current_price
        icon: mdi:cash
        unit_of_measurement: "€/kWh"
        state_class: measurement
        state: >
          {% set energy_tax = PUT_HERE_THE_PRICE %}
          {% set purch_costs = PUT_HERE_THE_PRICE %}
          {% set current_price = states('sensor.energyzero_today_energy_current_hour_price') | float(0) %}
          {{ (current_price + energy_tax + purch_costs) | round(2) }}

Removing the integration

This integration follows standard integration removal steps. If you also use the template sensors, you need to remove them manually.

To remove an integration instance from Home Assistant

  1. Go to Settings > Devices & services and select the integration card.
  2. From the list of devices, select the integration instance you want to remove.
  3. Next to the entry, select the three dots menu. Then, select Delete.