Nord Pool
The Nord Pool integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more] integrates Nord Pool Group
The integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [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 integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more]. This integration provides spot prices for your selected market, which you can, as an example, use in a template模板是一种自动化定义,可以包括动作或触发值数据的变量。这允许自动化生成动态动作。 [Learn more] to calculate prices for your energy dashboard.
配置
要将 Nord Pool hub 添加到您的 Home Assistant 实例中,请使用此 My 按钮:
手动配置步骤
如果上述 My 按钮不起作用,您也可以手动执行以下步骤:
-
浏览到您的 Home Assistant 实例。
-
转到
设置 > 设备与服务。 -
在右下角,选择
Add Integration 按钮。 -
从列表中选择 Nord Pool。
-
按照屏幕上的说明完成设置。
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
从Home Assistant中移除集成实例
- 前往 设置 > 设备与服务 并选择集成卡片。
- 从设备列表中,选择要删除的集成实例。
- 在条目旁边,选择三个点
菜单。然后,选择 删除。