This integration will periodically pull the dynamic grid prices from the Belgian Ecopower API. 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 knowledge of the ecopower prices. I also have a prototype integration for Entsoe that could be used.
This API provides the actual day-ahead prices that Ecopower will charge for a dynamic contract.
This custom integration should appear soon in the HACS default store. As long as this is not visible, go to HACS > integrations tab, click on the 3 dots in the top right corner, select custom repositories and add the https://github.com/infradom/ecopower_dynamic_grid_prices url to the repositories, with category 'integration'. A restart is required to load the integration and make it visible.
You can also install this also manually by copying the custom_components/ecopower_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' (bottom right), type or select EcopowerPrices A config dialog will be displayed.
This integration will create entitites for the Ecopower 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. Besides the ecopower consumption and injection entities, it also creates backup entities (just to verify the correct scaling of the backup entity) Additional entities will be created in future versions to make your automations easier.
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 - Ecopower Injection
show: true
span:
start: day
offset: +0d
now:
show: true
label: Now
yaxis:
- decimals: 2
series:
- entity: sensor.ecopower_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