Untitled
unknown
plain_text
10 months ago
1.3 kB
72
Indexable
type: custom:apexcharts-card
apex_config:
chart:
height: 350px
all_series_config:
unit: " kr."
experimental:
color_threshold: true
header:
title: Elpriser pr. time (kr/kWh)
show: true
standard_format: true
show_states: false
colorize_states: true
now:
show: true
label: Nu
graph_span: 1d
span:
start: day
offset: "-0h"
yaxis:
- min: 0
apex_config:
tickAmount: 5
series:
- entity: sensor.energi_data_service
type: column
name: Inkl. afgifter
data_generator: |
var today = entity.attributes.raw_today.map((start, index) => {
return [new Date(start["hour"]).getTime(), entity.attributes.raw_today[index]["price"]];
});
if (entity.attributes.tomorrow_valid) {
var tomorrow = entity.attributes.raw_tomorrow.map((start, index) => {
return [new Date(start["hour"]).getTime(), entity.attributes.raw_tomorrow[index]["price"]];
});
var data = today.concat(tomorrow);
} else {
var data = today
}
return data;
float_precision: 2
color_threshold:
- value: 0
color: green
- value: 1.75
color: orange
- value: 2
color: red
- value: 2.5
color: darkred
show:
extremas: time
legend_value: false
Editor is loading...
Leave a Comment