Is it possible to put value in the “now lable”?
Can somebody help me with the additional costs for the Norpool intergation. I use the ENTSO-e atm and when I use the template for the extra costs from ENTSO-e in Nordpool I get a higher price. I think the integration adds te price.
My template:
{% set s = {
“bijz_accijns”: 0.50329,
“energiebijdrage”: 0.002042,
“kost_gsc”: 0.01166,
“kost_wkk”: 0.00430,
“fluvius”: 0.0459,
“btw”: 1.06,
“marge_procentueel”: 1.038,
“marge_per_kwh”: 0.0393
} %}
{{((((current_price * s.marge_procentueel) + s.marge_per_kwh) + s.bijz_accijns + s.energiebijdrage + s.kost_gsc + s.kost_wkk + s.fluvius) * s.btw) | float}}
I just wanted to share my integration with lovelace. Works also in light mode but colors need to be adjusted.
- type: "custom:apexcharts-card"
graph_span: 1d
span:
start: hour
offset: -4h
experimental:
color_threshold: true
all_series_config:
color_threshold:
- value: -1
color: "#6EFDEF"
- value: 0
color: "#6EFD99"
- value: 10
color: "#FDE86E"
- value: 20
color: "#FD6E6E"
type: column
series:
- entity: sensor.***YOUR NORDPOOL SENSOR***
data_generator: |
return entity.attributes.raw_today.map((entry) => {
return [new Date(entry.start), entry.value];
});
show:
in_header: false
- entity: sensor.***YOUR NORDPOOL SENSOR***
data_generator: |
const now = new Date();
let latestData = entity.attributes.raw_today[0];
entity.attributes.raw_today.forEach(entry => {
const entryDate = new Date(entry.start);
if (entryDate <= now && (!latestData || entryDate > new Date(latestData.start))) {
latestData = entry;
}
});
return [[new Date(latestData.start), latestData.value]];
show:
in_header: true
name_in_header: false
in_chart: false
now:
show: true
label: Now
header:
show: true
title: Electricity Price
show_states: true
This is a good color pallet. The colors are equally spread based on human perception of color differences (with the exception of the first color which was added manually to stand out).
- value: 0
color: '#2085e3'
- value: 0.05
color: '#04822e'
- value: 0.1
color: '#12A141'
- value: 0.15
color: '#79B92C'
- value: 0.2
color: '#C4D81D'
- value: 0.25
color: '#F3DC0C'
- value: 0.3
color: '#F4C616'
- value: 0.35
color: '#EFA51E'
- value: 0.4
color: '#E76821'
- value: 0.5
color: '#E33F20'
- value: 0.6
color: '#DC182F'
This may be a bit old thread but I had great help designing my chart highly customizable ApexChart and wanted to share it back with the community.
Sorry for my lack of HA knowledge here, but suppose I’m not interested in displaying the average price of next 3 hours, but rather just have it available as a numerical value (an Entity?) to be able to use the value to change the color of a light to show the wife (and me) if it’s time to do laundry and run the dishwasher. The color change depending on current price I’ve managed, but the price for next hour I can’t access with my skill-set. It’s better than nothing, but with low price now and very high price the next hour, it misses the point.
Maybe this helps: GitHub - TheFes/cheapest-energy-hours: Jinja macro to find the cheapest energy prices
I’m not using it myself but it looks useful.