Skip to content

Instantly share code, notes, and snippets.

@JkJ076
Created December 28, 2022 15:43
Show Gist options
  • Save JkJ076/21d44e36f6fba04147f4a4c280d9c40b to your computer and use it in GitHub Desktop.
Save JkJ076/21d44e36f6fba04147f4a4c280d9c40b to your computer and use it in GitHub Desktop.
type: custom:apexcharts-card
now:
show: true
label: ''
color: red
graph_span: 48h
apex_config:
chart:
height: 250px
legend:
showForSingleSeries: true
plotOptions:
bar:
borderRadius: 0
yaxis:
min: 0
decimalsInFloat: 2
tickAmount: 10
forceNiceScale: true
xaxis:
labels:
datetimeFormatter:
hour: HH
all_series_config:
show:
offset_in_name: false
header:
title: Dagens och morgondagens elpriser
show: true
show_states: true
colorize_states: true
span:
start: day
offset: +0h
series:
- entity: sensor.nordpool_kwh_se4_sek_2_00_0
type: column
float_precision: 2
stroke_width: 1
name: Idag
unit: Öre/kWh
show:
in_header: false
legend_value: false
extremas: false
data_generator: |
return entity.attributes.today.map((price, index) => {
return [new Date().setHours(index,0,0), price];
});
color: green
- entity: sensor.nordpool_kwh_se4_sek_2_00_0
type: column
extend_to: false
name: Imorgon
unit: Öre/kWh
offset: '-24h'
float_precision: 2
opacity: 1
stroke_width: 1
show:
in_header: false
legend_value: false
extremas: false
data_generator: |
return entity.attributes.tomorrow.map((price, index) => {
return [new Date().setHours(index,0,0), price];
});
- entity: sensor.nordpool_kwh_se4_sek_2_00_0
attribute: min
type: column
color: green
float_precision: 2
stroke_width: 2
name: Dagens lägsta
group_by:
duration: 1d
show:
in_chart: false
legend_value: false
- entity: sensor.nordpool_kwh_se4_sek_2_00_0
attribute: average
type: column
color: black
float_precision: 2
stroke_width: 2
name: Snittpris idag
group_by:
duration: 1d
show:
in_chart: false
legend_value: false
- entity: sensor.nordpool_kwh_se4_sek_2_00_0
attribute: max
type: column
color: red
float_precision: 2
stroke_width: 2
name: Dagens högsta
group_by:
duration: 1d
show:
in_chart: false
legend_value: false
- entity: sensor.nordpool_kwh_se4_sek_2_00_0
name: Just nu
color: orange
type: column
show:
in_chart: false
float_precision: 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment