forked from T3m3z/spotprices2ha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
current_electricity_price.yaml
82 lines (82 loc) · 1.81 KB
/
current_electricity_price.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
type: custom:apexcharts-card
graph_span: 48h
experimental:
color_threshold: true
show:
last_updated: true
header:
title: Electricity price
show: true
show_states: true
colorize_states: true
span:
start: day
yaxis:
- min: 0
decimals: 2
apex_config:
forceNiceScale: true
now:
show: true
label: Now
series:
- entity: sensor.shf_electricity_price_now
name: Average Price
unit: c/kWh
show:
in_header: false
extremas: false
type: line
color: blue
float_precision: 2
stroke_width: 2
data_generator: >
return [[start, entity.attributes.today_avg*100], [moment(end).subtract(1,
'days'), entity.attributes.today_avg*100], []];
- entity: sensor.shf_electricity_price_now
show:
in_header: false
extremas: true
legend_value: false
type: column
color: lightgray
float_precision: 2
unit: c/kWh
data_generator: |
var n = new Date(entity.attributes.data[0]["DateTime"]);
return entity.attributes.all_prices.map((d, index) => {
return [n.getTime()+index*3600000, entity.attributes.all_prices[index]*100];
});
color_threshold:
- value: 0
color: 368f39
- value: 10
color: a3b34d
- value: 20
color: ffd57e
- value: 30
color: f18c56
- value: 40
color: de425b
- entity: sensor.shf_electricity_price_now
show:
in_header: true
header_color_threshold: true
in_chart: false
type: line
color: lightgray
float_precision: 2
stroke_width: 0
transform: "return x*100"
unit: c/kWh
color_threshold:
- value: 0
color: 368f39
- value: 10
color: a3b34d
- value: 20
color: ffd57e
- value: 30
color: f18c56
- value: 40
color: de425b