• Stars
    star
    443
  • Rank 97,835 (Top 2 %)
  • Language
    Python
  • Created about 5 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This component allows you to pull in the energy prices into Home-Assistant.

Nord Pool integration for Home Assistant

Donate "Buy Me A Coffee"

Nord Pool is a service provider that operates an electricity market and power system services, including the exchange of electricity on a spot market Nordics and Baltic countries.

This integration provides the spot market (hourly) electricity prices for the Nordic, Baltic and part of Western Europe.

The Nordpool sensor provides the current price with today's and tomorrow's prices as attributes. Prices become available around 13:00.

ApexCharts card is recommended for visualization of the data in Home Assistant.

Table of Contents

Installation
Usage
Other
Troubleshooting

Getting started

Installation

Option 1: HACS

  • Follow Open your Home Assistant instance and open a repository inside the Home Assistant Community Store. and install it

  • Restart Home Assistant

    or

  • Go to HACS -> Integrations,

  • Select +,

  • Search for nordpool and install it,

  • Restart Home Assistant

Option 2: Manual

Download the latest release

cd YOUR_HASS_CONFIG_DIRECTORY    # same place as configuration.yaml
mkdir -p custom_components/nordpool
cd custom_components/nordpool
unzip nordpool-X.Y.Z.zip
mv nordpool-X.Y.Z/custom_components/nordpool/* .  

Usage

Configuration Variables

Configuration Required Description
Region yes Country/region to get the energy prices for. See Country/region codes below for details.
Currency no Default: local currency
Currency used to fetch the prices from the API.
Include VAT no Default: true
Add Value Added Taxes (VAT) or not.
Decimal precision no Default: 3
Energy price rounding precision.
Low price percentage no Default: 1
Percentage of average price to set the low price attribute.
IF hour_price < average * low_price_cutoff
THEN low_price = True
ELSE low_price = False
Price in cents no Default: false
Display price in cents in stead of (for example) Euros.
Energy scale no Default: kWh
Price displayed for MWh, kWh or Wh.
Additional Cost no default {{0.0|float}}
Template to specify additional cost to be added. See Additional Costs for more details.

Option 1: UI

  • Go to Settings -> Devices & Services
  • Select + Add Integration
  • Search for nordpool and select it
  • Fill in the required values and press Submit

Tip: By default, the integration will create a device with the name nordpool_<energy_scale>_<region>_<currency>_<some-numbers>. It is recommended to rename the device and all its entities to nordpool. If you need to recreate your sensor (for example, to change the additional cost), all automations and dashboards keep working.

Option 2: YAML

Set up the sensor using in configuration.yaml.

Minimal configuration:

sensor:
  - platform: nordpool
    region: "Kr.sand" 

Example configuration:

sensor:
  - platform: nordpool
    # Country/region to get the energy prices for. 
    region: "Kr.sand"
    
    # Override HA local currency used to fetch the prices from the API.
    currency: "EUR"
    
    # Add Value Added Taxes (VAT)?
    VAT: True
    
    # Energy price rounding precision.
    precision: 3
    
    # Percentage of average price to set the low price attribute
    # low_price = hour_price < average * low_price_cutoff
    low_price_cutoff: 0.95

    # Display price in cents in stead of (for example) Euros.
    price_in_cents: false

    # Price displayed for MWh, kWh or Wh
    price_type: kWh

    # Template to specify additional cost to be added to the tariff.
    # The template price is in EUR, DKK, NOK or SEK (not in cents).
    # For example: "{{ current_price * 0.19 + 0.023 | float}}" 
    additional_costs: "{{0.0|float}}"

Regions

See the Nord Pool region map for details

Country Region code
Austria AT
Belgium BE
Denmark DK1,
DK2
Estonia EE
Finland FI
France FR
Germany DE-LU
Great-Britain Not yet available in this version
Latvia LV
Lithuania LT
Luxenburg DE-LU
Netherlands NL
Norway Oslo (NO1)
Kr.sand (NO2)
Tr.heim / Molde (NO3)
Tromso (NO4)
Bergen (NO5)
Poland Not yet available in this version
Sweden SE1,
SE2,
SE3,
SE4

Additional costs

The idea behind additional_costs is to allow the users to add costs related to the official price from Nordpool:

  • Add simple or complex tariffs
  • Calculate VAT

There are two special special arguments in that can be used in the template (in addition to all default from Homeassistant):

  • now(): this always refer to the current hour of the price
  • current_price: price for the current hour. This can be used for example be used to calculate your own VAT or add overhead cost.

Note: When configuring Nordpool using the UI, things like VAT and additional costs cannot be changed. If your energy supplier or region changes the additional costs or taxes on a semi-regular basis, the YAML configuration or a helper (example 4) work best.

Example 1: Overhead per kWh

Add 1,3 cents per kWh overhead cost to the current hour's price

{{ 0.013 | float }}

Example 2: Percentage (VAT)

Add 19 % VAT of the current hour's price

{{ (current_price * 0.19) | float }}

Example 3: Overhead and VAT

Add 1,3 cents per kWh overhead cost, 0.002 flat tax and 19% VAT to the current hour's price

{{ (0.013 + 0.002 + (current_price * 0.19)) | float }}

Example 4: Helper

Add 21% tax and overhead cost stored in a helper

'''{{ (current_price * 0.21) + states('input_number.additionele_kosten') | float(0) }}'''

Example 5: Seasonal peek and off-peek overhead

{% set s = {
    "hourly_fixed_cost": 0.5352,
    "winter_night": 0.265,
    "winter_day": 0.465,
    "summer_day": 0.284,
    "summer_night": 0.246,
    "cert": 0.01
}
%}
{% if now().month >= 5 and now().month < 11 %}
    {% if now().hour >= 6 and now().hour < 23 %}
        {{ s.summer_day + s.hourly_fixed_cost + s.cert | float }}
    {% else %}
        {{ s.summer_night + s.hourly_fixed_cost + s.cert|float }}
    {% endif %}
{% else %}
    {% if now().hour >= 6 and now().hour < 23 %}
        {{ s.winter_day + s.hourly_fixed_cost + s.cert | float }}
    {% else %}
        {{ s.winter_night + s.hourly_fixed_cost + s.cert | float }}
    {% endif %}
{% endif %}

Other

One sensor per hour

By default, one sensor is created with the current energy price. The prices for other hours are stored in the attributes of this sensor. Most example code you will find uses the default one sensor option, but you can run the create_template script to create separate sensors for every hour. See the help options with python create_template --help. You can run the script on any system where Python is installed (install the required packages pyyaml and click using pip install pyyaml click)

Troubleshooting

Debug logging

Add this to your configuration.yaml and restart Home Assistant to debug the component.

logger:
  logs:
    nordpool: debug
    custom_components.nordpool: debug
    custom_components.nordpool.sensor: debug
    custom_components.nordpool.aio_price: debug

More Repositories

1

ble_monitor

BLE monitor for passive BLE sensors
Python
1,875
star
2

remote_homeassistant

Links multiple home-assistant instances together
Python
884
star
3

pyscript

Pyscript adds rich Python scripting to HASS
Python
851
star
4

custom_updater

[DEPRECATED]๐Ÿ“ฆ A component which allows you to track and update custom cards/components and python_scripts
Python
166
star
5

grocy

Custom Grocy integration for Home Assistant
Python
156
star
6

feedparser

๐Ÿ“ฐ RSS Feed Integration
Python
134
star
7

sensor.unifigateway

High level health status of UniFi Security Gateway devices via UniFi Controller
Python
127
star
8

weatheralerts

A sensor that gives you weather alerts from alerts.weather.gov.
Python
125
star
9

climate.programmable_thermostat

Programmable thermostat that let you have a smart thermostat on budget.
Python
113
star
10

places

Component to integrate with OpenStreetMap Reverse Geocode (places)
Python
110
star
11

media_player.braviatv_psk

Sony Bravia TV (Pre-Shared Key) component for Home Assistant
Python
106
star
12

sensor.rpi_power

A Custom component for Home-Assistant that checks if your Raspberry Pi power supply is giving enough voltage from the kernel.
Python
103
star
13

sensor.airthings_wave

hassio support for Airthings Wave BLE environmental radon sensor.
Python
100
star
14

sensor.plex_recently_added

โ–ถ๏ธ Plex component to feed Upcoming Media Card.
Python
82
star
15

authenticated

A platform which allows you to get information about sucessfull logins to Home Assistant.
Python
82
star
16

breaking_changes

Component to show potential breaking_changes in the current published version based on your loaded components
Python
81
star
17

zaptec

zaptec charger custom component for home assistant
Python
63
star
18

sensor.trakt

๐Ÿ“บ Trakt Integration for Upcoming Media Card
Python
60
star
19

sensor.radarr_upcoming_media

๐ŸŽฌ Radarr component to feed Upcoming Media Card.
Python
57
star
20

youtube

A platform which give you info about the newest video on a channel
Python
55
star
21

sensor.sonarr_upcoming_media

๐Ÿ“บ Sonarr component to feed Upcoming Media Card.
Python
53
star
22

healthchecksio

Update and display the status of your healthchecks.io checks.
Python
51
star
23

sensor.avanza_stock

Custom component to get stock data from Avanza for Home Assistant
Python
46
star
24

sensor.ssh

SSH Generic Sensor
Python
43
star
25

sensor.untappd

๐Ÿป Untappd Integration
Python
36
star
26

readme

Use Jinja and data from Home Assistant to generate your README.md file
Python
33
star
27

information

๐Ÿ“œ Information about this organization
31
star
28

sensor.stadtreinigung_hamburg

Stadtreinigung Hamburg - get garbage collection dates in Hamburg - custom component for Home Assistant
Python
25
star
29

sensor.yandex_maps

A platform which give you the time it will take to drive.
Python
25
star
30

combined

A camera platform that give you a combined feed of your defined camera entities.
Python
24
star
31

wienerlinien

A sensor that give you information about next departure from spesified stop.
Python
21
star
32

templatesensor

Add template sensors from the UI.
Python
19
star
33

uilogs

DEPRECATED: Custom panel that show colorful logs for Home Assistant (core), and the supervisor (if you have it).
TypeScript
18
star
34

sensor.nintendo_wishlist

A sensor that monitors a Nintendo Switch wish list for when games are on sale.
Python
17
star
35

sensor.personalcapital

๐Ÿ’ต Personal Capital Integration for Bank Account Monitoring
Python
15
star
36

switch.hadockermon

A switch platform that interact with ha-dockermon.
Python
14
star
37

unsplash

A camera platform that give you random images from Unsplash presented as a camera feed.
Python
13
star
38

gpodder

๐ŸŽง gPodder Integration for Podcast Feed Monitoring
Python
13
star
39

sensor.owlintuition

A set of sensors to integrate the OWL Intuition devices network
Python
11
star
40

sensor.file_restore

Improved file sensor component that let you read the whole last line content.
Python
11
star
41

usps_mail

A component that give you to info about incoming letters and packages from USPS.
Python
9
star
42

sensor.custom_aftership

A component which allows you to get information about pending parcels.
Python
8
star
43

sensor.tautulli

A platform which allows you to get information from Tautulli.
Python
8
star
44

sensor.avfallsor

Simple sensor for avfallsor
Python
8
star
45

brewdog

๐Ÿป Display information about random beers from Brewdog as a sensor in Home Assistant, you can use this in a push notification next time you visit a bar.
Python
7
star
46

sensor.kodi_recently_added

Kodi component to feed the Upcoming Media Card for Home Assistant.
Python
7
star
47

config_check

Run the CLI config_check from a service call.
Python
7
star
48

ups

The ups platform allows one to track deliveries by the UPS
Python
6
star
49

fedex

The fedex platform allows one to track deliveries by FedEx
Python
5
star
50

sensor.launchlibrary

Get info about next space launches
Python
4
star
51

climate.e_thermostaat

E-Thermostaat (ICY) component for Home Assistant
Python
3
star
52

custom_components

[archived] Use this instead: https://github.com/custom-components/custom_updater
Python
3
star
53

camera.multisource

A camera platform that generate a camera feed from multiple sources.
Python
2
star
54

srp_energy

The srp_energy integration shows information from Srp hourly energy usage report for their customers
Python
2
star
55

hassbian_config

A custom component which allows you to controll some hassbian-config functions from Home Assistant.
Python
2
star
56

sensor.ruter

A sensor platform that gives you information about next departures.
Python
2
star
57

lists

Python
2
star
58

sensor.wifi-scanner

A Wi-Fi scanner sensor
Python
2
star
59

sensor.versions

Deprecated.
Python
2
star
60

sensor.custom_cards

This sensor is no longer needed
Python
1
star
61

sytadin

The sytadin sensor platform allows you to monitor traffic details from Sytadin
Python
1
star
62

sickchill

Taps into Sickchill Api so you can perform basic commands
Python
1
star
63

complimentr

Component to integrate with complimentr.
Python
1
star
64

binary_sensor.hadockermon

A custom binary_sensor platform which allows you get sensor data from ha-dockermon.
Python
1
star