Hello…
I have managed to create two APEX graphs.
One pulls the data from NordPool (Energy Price today) and the second data is Energy Consumption per hour (kWh)
Now, I would like to have third graph that basically shown the COST per hour. Practically multiplying those two graph value each hour.
So
Energy Price (EUR/hour) * Energy Consumption (kWh) = Hourly Cost
But don’t know HOW?
Config: Energy Price (EUR/hour)
type: custom:apexcharts-card
graph_span: 24h
header:
title: Energy price today (snt/kWh)
show: true
span:
start: day
now:
show: true
label: Now
series:
entity: sensor.nordpool_kwh_fi_eur_3_10_024
type: column
data_generator: |
return entity.attributes.raw_today.map((start, index) => {
return [new Date(start["start"]).getTime(), entity.attributes.raw_today[index]["value"]];
});
Config: Energy Consumption (kWh)
type: custom:apexcharts-card
graph_span: 24h
span:
start: day
header:
title: Energy Consumption (kWh)
show: true
apex_config:
legend:
position: top
fontSize: 14px
itemMargin:
horizontal: 10
vertical: 5
now:
show: true
label: Now
all_series_config:
type: column
unit: Wh
float_precision: 0
opacity: 0.7
show:
legend_value: false
group_by:
func: avg
duration: 1h
fill: zero
series:
entity: sensor.power_mains
name: Mains