type: custom:apexcharts-card
header:
show: true
title: Strømpris
show_states: true
colorize_states: true
yaxis:
- id: pris
min: 0
max: auto
decimals: 2
apex_config:
forceNiceScale: false
tickAmount: 20
- id: varme
min: 0
max: 1
decimals: 2
show: false
series:
- entity: sensor.nordpool
yaxis_id: pris
show:
in_header: true
name: Nordpool
type: line
curve: stepline
float_precision: 4
fill_raw: last
stroke_width: 2
opacity: 1
color: var(--primary-color)
extend_to: now
- entity: sensor.nordpool
yaxis_id: pris
show:
in_header: false
name: Pris
type: line
curve: stepline
float_precision: 4
stroke_width: 2
opacity: 1
color: var(--primary-color)
extend_to: now
data_generator: >
let p = entity.attributes.raw_today.map(p => [p.start,p.value]);
if(entity.attributes.raw_tomorrow != null &&
entity.attributes.raw_tomorrow.length > 0 &&
entity.attributes.raw_tomorrow[0].value != null)
{
p = p.concat( entity.attributes.raw_tomorrow.map(p => [p.start, p.value]));
}
return p;
- entity: sensor.nordpool
yaxis_id: pris
show:
in_header: false
name: Snitt
type: line
curve: straight
float_precision: 4
stroke_width: 1
opacity: 0.4
color: green
data_generator: >
return [[start, entity.attributes.average*0.9],[end,
entity.attributes.average*0.9]];
- entity: sensor.nordpool
yaxis_id: pris
show:
in_header: false
name: Snitt
type: line
curve: straight
float_precision: 4
stroke_width: 1
opacity: 0.4
color: green
data_generator: >
return [[start, entity.attributes.average*1.15],[end,
entity.attributes.average*1.15]];
- entity: sensor.nordpool
yaxis_id: pris
show:
in_header: false
name: Snitt
type: line
curve: straight
float_precision: 4
stroke_width: 1
opacity: 0.4
color: red
data_generator: >
return [[start, entity.attributes.average*1.4],[end,
entity.attributes.average*1.4]];
- entity: sensor.nordpool
yaxis_id: pris
show:
in_header: false
name: Snitt
type: line
curve: straight
float_precision: 4
stroke_width: 1
opacity: 0.4
color: gray
data_generator: >
return [[start, entity.attributes.average*0.6],[end,
entity.attributes.average*0.6]];
- entity: sensor.estimated_subsidy_gabriel_edlands_veg_16
yaxis_id: pris
name: Støtte
type: line
curve: smooth
float_precision: 2
stroke_width: 2
opacity: 1
color: green
extend_to: now
fill_raw: last
- entity: sensor.strompris_statistikk
yaxis_id: pris
name: Snitt 30 dager
type: line
curve: smooth
float_precision: 2
stroke_width: 2
opacity: 1
color: '#00CCFF'
extend_to: now
fill_raw: last
- entity: sensor.strompris_filtrert
yaxis_id: pris
name: Snitt 3 dager
type: line
curve: smooth
float_precision: 2
stroke_width: 2
opacity: 1
color: '#00CCFF'
extend_to: now
fill_raw: last
- entity: sensor.current_electricity_market_price
yaxis_id: pris
show:
in_header: true
name: Entso-e
type: line
curve: stepline
float_precision: 4
fill_raw: last
stroke_width: 2
opacity: 1
color: var(--primary-color)
extend_to: now
unit: NOK/kWh
- entity: sensor.current_electricity_market_price
yaxis_id: pris
show:
in_header: false
name: Pris
type: line
curve: stepline
float_precision: 4
stroke_width: 2
opacity: 1
color: var(--primary-color)
extend_to: now
unit: NOK/kWh
data_generator: |
return entity.attributes.prices.map(p => [p.time,p.price]);
- entity: sensor.nordpool_diff_triangle_10_normalize_max_min
transform: 'return x>0 ? 0 : 1;'
yaxis_id: varme
stroke_width: 1
type: area
curve: stepline
color: C1EADD
extend_to: now
show:
in_header: false
- entity: sensor.nordpool_diff_triangle_10_normalize_max_min
transform: 'return x>0 ? 1 : 0;'
yaxis_id: varme
stroke_width: 1
type: area
curve: stepline
color: FFD8C9
extend_to: now
show:
in_header: false
now:
show: true
graph_span: 3d
span:
start: day
offset: '-1d'
locale: nb
apex_config:
tooltip:
enabled: true
chart:
height: 400px
zoom:
enabled: true
toolbar:
show: true
tools:
zoom: true
zoomin: false
zoomout: false
pan: false
reset: true
legend:
show: false
dataLabels:
enabled: false
xaxis:
type: datetime
labels:
datetimeFormatter:
month: ddd
day: ddd
grid:
borderColor: LightSteelBlue
xaxis:
lines:
show: true