Nord Pool
The Nord Pool integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] integrates Nord Pool Group
The integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] provides the public market prices displayed on the Nord Pool Auction page
Most European energy is traded via the Nord Pool Group marketplace. If your energy provider doesn’t have a dedicated Home Assistant integration and you have a spot-price-based contract, you can use the Nord Pool integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more]. This integration provides spot prices for your selected market, which you can, as an example, use in a templateA template is an automation definition that can include variables for the action or data from the trigger values. This allows automations to generate dynamic actions. [Learn more] to calculate prices for your energy dashboard.
Configuration
To add the Nord Pool hub 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.
-
In the bottom right corner, select the
Add Integration button. -
From the list, select Nord Pool.
-
Follow the instructions on screen to complete the setup.
Only a single integration entry is supported. To modify the settings, you can use the reconfigure option from the integration entry.
EUR is the base currency for market prices. If you choose another currency, you can find the conversion rate in the Exchange rate
sensor.
All prices are displayed as [Currency]/kWh
.
Data fetching and limitations
Data is polled from the Nord Pool API on an hourly basis, exactly on the hour, to ensure the price sensors are displaying the correct price.
If polling cannot happen because of no connectivity or a malfunctioning API, it will wait a retry a few times before failing.
The user can use the homeassistant.update_entity
action to manually try again later, in the case the user has solved the connectivity issue.
Troubleshooting
This service is reliant on an internet connection and that the Nord Pool API is available. Here are the things you can try before raising an issue:
- Check that internet is available from your Home Assistant instance.
- Check that the Nord Pool API is available by clicking here
. You should get a JSON back with the title Unauthorized
. - Use
curl
in a terminal on your Home Assistant instance using the same URL as previously opened in the browser.curl https://dataportal-api.nordpoolgroup.com/api/DayAheadPrices
Sensors
The integration will create entities showing today’s energy prices for the configured market area. Only the base energy price is shown. VAT and other additional costs are not included.
Main sensors
Sensor | Type | Description |
---|---|---|
Current price | [Currency]/kWh | The current (hourly) energy price. |
Previous price | [Currency]/kWh | The price of the previous hour. |
Next price | [Currency]/kWh | The price of the next hour. |
Daily average | [Currency]/kWh | The average of today’s energy prices. |
Lowest price | [Currency]/kWh | Today’s lowest price (start and end time are provided in state attributes) |
Highest price | [Currency]/kWh | Today’s highest price (start and end time are provided in state attributes) |
Peak & off-peak sensors
Additional sensors are provided for peak and off-peak blocks.
- Peak refers to the price of the period from 8am to 8pm.
- Off-peak 1 refers to the price of the time period from midnight to 8am.
- Off-peak 2 refers to the average price of the time period from 8pm to midnight.
Sensor | Type | Description |
---|---|---|
[peak/off-peak] highest price | [Currency]/kWh | The hightest hourly price during the given timeframe. |
[peak/off-peak] lowest price | [Currency]/kWh | The lowest hourly price during the given timeframe. |
[peak/off-peak] average | [Currency]/kWh | The average price of the given timeframe. |
[peak/off-peak] time from | Datetime | The start date/time of the given timeframe. |
[peak/off-peak] time until | Datetime | The end date/time of the given timeframe. |
The block price sensors are not enabled by default.
Diagnostic sensors
Sensor | Type | Description |
---|---|---|
Currency | [Currency] | The configured currency. |
Exchange rate | Integer | The exchange rate between the configure currency and Euro’s. |
Last updated | Datetime | The time when the market prices were last updated. |
Actions
Get price for date
The integration entities provide price information only for the current date. Use the “Get price for date” action to retrieve pricing information for any date within the last two months or for tomorrow.
The areas and currency parameters are optional. If omitted, the values configured in the integration will be used.
See examples how to use in a trigger template sensor.
Select one market area to create output for. If omitted it will use the areas from the configuration entry.
The public API only allows us to see past pricing information for up to 2 months.
Tomorrow’s prices are typically released around 13:00 CET, and trying to get them before that time will generate an error that needs to be considered in such a case.
Example action with data
action: nordpool.get_prices_for_date
data:
config_entry: 1234567890a
date: "2024-11-10"
areas:
- SE3
- SE4
currency: SEK
Examples
A template sensor to add VAT and fixed cost is useful to get the actual energy cost in the energy dashboard.
UI Template
Create a helper using the UI.
- Go to Settings > Devices & Services and at the top, choose the Helpers tab.
- In the bottom right corner, select Create helper.
- Select Template and Template a sensor.
- Enter the fields as shown below.
The template below takes the current price attributes, adds 0.1293 EUR as fixed costs and adds 21% VAT.
YAML Template
A template sensor to add VAT and a fixed cost from an helper entity input_number.add_fixed_cost
.
template:
- sensor:
- name: "Nordpool"
unit_of_measurement: "EUR/kWh"
state_class: measurement
state: >
# create a variable with the current price
{% set cost = states('sensor.nord_pool_nl_current_price') | float(0) %}
# create a variable with the additional fixed cost
{% set add_cost = states('input_number.add_fixed_cost') | float(0) %}
# Add cost and additional fixed cost. Add VAT (25%) by multiplying with 1.25 and round to 2 digits:
{{ ((cost + add_cost) * 1.25) | round(2, default=0) }}
Tomorrow’s lowest price
Using a trigger template, you can create a template sensor to calculate tomorrow’s lowest price which also puts the list of all prices in the attributes of the sensor. All prices are returned in [Currency]/MWh.
You need to replace the config_entry
with your own Nord Pool config entry id.
Below example will convert the action call response to kWh prices in the selected currency and add all prices for tomorrow as a list in an attribute.
template:
- trigger:
- trigger: time_pattern
minutes: /10
- trigger: homeassistant
event: start
action:
- action: nordpool.get_prices_for_date
data:
config_entry: 01JEDAR1YEHJ6DZ376MP24MRDG
date: "{{ now().date() + timedelta(days=1) }}"
areas: SE3
currency: SEK
response_variable: tomorrow_price
sensor:
- name: Tomorrow lowest price
unique_id: se3_tomorrow_low_price
state: >
{% if not tomorrow_price %}
unavailable
{% else %}
{% set data = namespace(prices=[]) %}
{% for state in tomorrow_price['SE3'] %}
{% set data.prices = data.prices + [(state.price / 1000)] %}
{% endfor %}
{{min(data.prices)}}
{% endif %}
attributes:
data: >
{% if not tomorrow_price %}
[]
{% else %}
{% set data = namespace(prices=[]) %}
{% for state in tomorrow_price['SE3'] %}
{% set data.prices = data.prices + [{'start':state.start, 'end':state.end, 'price': state.price/1000}] %}
{% endfor %}
{{data.prices}}
{% endif %}
Energy Dashboard
To use the Nordpool integration in the Energy dashboard, when configuring grid consumption and production, use the Use an entity with current price option.
Remove the integration
To remove an integration instance from Home Assistant
- Go to Settings > Devices & services and select the integration card.
- From the list of devices, select the integration instance you want to remove.
- Next to the entry, select the three-dot
menu. Then, select Delete.