infradom / dynamic_grid_prices

Dynemic Grid Prices
MIT License
3 stars 0 forks source link

dynamic_grid_prices

Integration for the HomeAssistant platform

Work in progress ! Although I am using this software in my installation, FOR THE TIME BEING, IT IS PROBABLY INSUFFIIENTLY TESTED

This software:

This integration will periodically pull the dynamic grid prices from the https://transparency.entsoe.eu API platform. Alternatively, or as a backup source, a Nordpool integration instance can be used as data source. I know similar integrations exist, but this one wont need a dependency on node-red. The Nordpool integration is a good alternative, but has no simple options to scale injection and consumption prices in one instance.

Entsoe data source:

This integration uses entsoe as data source, so you will need to create a entsoe platform login and request an API token so that the integration can access the day-ahead-prices. The Entsoe data source is generic and does not know your energy company's markup costs. Extra cost and scaling factors can be applied for both consumption and injection. If you do not want to use Entsoe as data source, leave the API token field empty and select the backup source flag.

Backup Nordpool data source:

This integration can use a Nordpool integration instance as backup data source. The Nordpool data souce can even be used as main source if no Entsoe API token is specified. You first need to install the Nordpool integration and configure an instance that expresses the cost in cost/Mwh, as the scaling factors are shared with the Entsoe source.

Installation

This custom integration cannot be installed through HACS yet, as we feel it is still too experimental. You can install it manually by copying the contents of the custom_components/dynamic_grid_prices folder to your home assistant's config/custom_components folder. A restart your HA software may be required. Then under settings->devices&services, press the 'add integration button', type or select DynGridPrices A config dialog will be displayed.

Configuration parameters:

Note that depending on the taxation, these simple scaling formulas may not correctly provide the real price in your country. They just allow us to have rough feeling of the consumption and injection price. The VAT scaling parameters are entered as 1.06 for 6% VAT

Entities created:

This integration will create several entities for the different Entsoe price and the derived injection and consumption prices. The entities contain an attribute list with the detailed day-ahead prices (per hour or per 15 minutes). The attribute list is made compatible with the NordPool attributes, but the tomorrow entries have been added to the today list. Additional entities will be created in future versions to make your automations easier.

Apexchart Pricing Dashboard Card:

The integration makes it easy to create an apexchart graph using the raw_today attribute For information on how to instaal custom:apexchart, see the appropriate website. My very simple initial try uses this yaml code:

type: custom:apexcharts-card
experimental:
  color_threshold: true
graph_span: 48h
header:
  title: Electricity Price - Injection
  show: true
span:
  start: day
  offset: +0d
now:
  show: true
  label: Now
yaxis:
  - decimals: 2
series:
  - entity: sensor.dynamic_grid_prices_injection_price
    type: column
    float_precision: 3
    data_generator: |
      return entity.attributes.raw_today.map((entry) => {
        return [new Date(entry.start), entry.value];
      });
    color_threshold:
      - value: 0
        color: green
        opacity: 1
      - value: 0.3
        color: yellow
      - value: 0.4
        color: red

Disclaimer:

Errors in this software can have a significant impact on your electricity bill. The authors cannot be held liable for any financial or other damage caused by the use of this software.