-
Notifications
You must be signed in to change notification settings - Fork 2
/
lovelace_dashboard.yaml
334 lines (333 loc) · 8.96 KB
/
lovelace_dashboard.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: custom:button-card
name: Cell Voltage Delta
size: 25%
entity: sensor.battery_bank_0_delta_cell_voltage
show_icon: true
show_name: true
show_state: true
show_label: false
label: >
[[[ return 'Average Cell: ' +
Number.parseFloat(states['sensor.battery_bank_0_average_cell_voltage'].state).toFixed(2)
+ ' V']]]
icon: mdi:delta
styles:
icon:
- color: |
[[[
if (entity.state < 0.010) return 'darkgreen';
if (entity.state < 0.020) return 'darkorange';
else return 'red';
]]]
card:
- font-size: 12px
- type: custom:button-card
name: Pack Voltage
size: 25%
entity: sensor.battery_bank_0_total_voltage
show_icon: true
show_name: true
show_state: true
show_label: true
icon: mdi:server
styles:
icon:
- color: |
[[[
if (entity.state > 50) return 'darkgreen';
if (entity.state > 55) return 'darkorange';
else return 'red';
]]]
card:
- font-size: 12px
- type: custom:button-card
name: |
[[[
if (entity.state < 0) return "Discharging";
else
return "Charging";
]]]
size: 25%
entity: sensor.battery_bank_0_power
show_icon: true
show_name: true
show_state: true
show_label: true
icon: |
[[[
if (entity.state < 0) return "mdi:battery-arrow-down-outline";
else
return "mdi:battery-arrow-up-outline";
]]]
styles:
icon:
- color: |
[[[
if (entity.state > 5000) return 'darkred';
if (entity.state > 1000) return 'darkorange';
if (entity.state < -5000) return 'darkred';
if (entity.state < -1000) return 'darkorange';
else return 'darkgreen';
]]]
card:
- font-size: 12px
- type: horizontal-stack
cards:
- type: custom:button-card
name: SOC
size: 25%
entity: sensor.battery_bank_0_state_of_charge
show_icon: true
show_name: true
show_state: true
show_label: true
icon: |
[[[
if (entity.state > 90) return "mdi:battery";
if (entity.state > 80) return "mdi:battery-90";
if (entity.state > 70) return "mdi:battery-80";
if (entity.state > 60) return "mdi:battery-70";
if (entity.state > 50) return "mdi:battery-60";
if (entity.state > 40) return "mdi:battery-50";
if (entity.state > 30) return "mdi:battery-40";
if (entity.state > 20) return "mdi:battery-30";
if (entity.state > 10) return "mdi:battery-20";
else
return "mdi:battery-alert-variant-outline";
]]]
styles:
icon:
- color: |
[[[
if (entity.state > 30 ) return 'darkgreen';
if (entity.state > 15 ) return 'yellow';
else return 'red';
]]]
card:
- font-size: 12px
- type: custom:button-card
name: SOH
size: 25%
entity: sensor.battery_bank_0_state_of_health
show_icon: true
show_name: true
show_state: true
show_label: true
styles:
icon:
- color: |
[[[
if (entity.state > 99) return 'darkgreen';
if (entity.state > 95) return 'darkorange';
else return 'red';
]]]
card:
- font-size: 12px
- type: custom:button-card
name: Charging Cycles
size: 25%
entity: sensor.battery_bank_0_charging_cycles
show_icon: true
show_name: true
show_state: true
show_label: true
styles:
icon:
- color: |
[[[
if (entity.state > 5000) return 'darkred';
else return 'darkgreen';
]]]
card:
- font-size: 12px
- type: custom:bar-card
direction: up
columns: 8
decimal: 3
max: 3.45
min: 3
height: 80px
severity:
- color: darkred
from: 3.45
to: 4
- color: darkorange
from: 3.4
to: 3.45
- color: darkgreen
from: 3.1
to: 3.4
- color: darkred
from: 2.5
to: 3.1
positions:
icon: 'off'
indicator: inside
name: outside
style: |-
bar-card-value {
margin-right: auto;
margin-left: auto;
margin-bottom: 35px;
font-size: 10px;
font-weight: normal;
text-shadow: 1px 1px #0005;
}
bar-card-name {
margin-right: auto;
margin-left: auto;
margin-bottom: 0px;
font-size: 10px;
font-weight: normal;
text-shadow: 1px 1px #0005;
}
entities:
- entity: sensor.battery_bank_0_cell_voltage_1
name: Cell 01
- entity: sensor.battery_bank_0_cell_voltage_2
name: Cell 02
- entity: sensor.battery_bank_0_cell_voltage_3
name: Cell 03
- entity: sensor.battery_bank_0_cell_voltage_4
name: Cell 04
- entity: sensor.battery_bank_0_cell_voltage_5
name: Cell 05
- entity: sensor.battery_bank_0_cell_voltage_6
name: Cell 06
- entity: sensor.battery_bank_0_cell_voltage_7
name: Cell 07
- entity: sensor.battery_bank_0_cell_voltage_8
name: Cell 08
- entity: sensor.battery_bank_0_cell_voltage_9
name: Cell 09
- entity: sensor.battery_bank_0_cell_voltage_10
name: Cell 10
- entity: sensor.battery_bank_0_cell_voltage_11
name: Cell 11
- entity: sensor.battery_bank_0_cell_voltage_12
name: Cell 12
- entity: sensor.battery_bank_0_cell_voltage_13
name: Cell 13
- entity: sensor.battery_bank_0_cell_voltage_14
name: Cell 14
- entity: sensor.battery_bank_0_cell_voltage_15
name: Cell 15
- entity: sensor.battery_bank_0_cell_voltage_16
name: Cell 16
- type: custom:apexcharts-card
graph_span: 24h
update_interval: 5min
yaxis:
- id: first
decimals: 0
min: ~-6000
max: ~6000
apex_config:
tickAmount: 8
- id: second
opposite: true
decimals: 0
min: 0
max: 100
apex_config:
tickAmount: 4
apex_config:
chart:
height: 300px
xaxis:
type: datetime
labels:
show: false
tooltip:
enabled: false
grid:
show: true
xaxis:
lines:
show: false
yaxis:
lines:
show: true
position: back
strokeDashArray: 0.2
legend:
show: true
all_series_config:
show:
legend_value: true
datalabels: false
extremas: false
in_brush: false
in_header: false
float_precision: 0
invert: false
fill_raw: 'null'
header:
show: false
title: Overblik
show_states: true
colorize_states: false
series:
- entity: sensor.battery_bank_0_state_of_charge
name: SOC
opacity: 1
stroke_width: 1.5
type: line
group_by:
duration: 1min
func: avg
show:
legend_value: true
name_in_header: true
in_header: raw
yaxis_id: second
float_precision: 1
color: gold
- entity: sensor.battery_bank_0_power
name: Power
opacity: 1
stroke_width: 1.5
type: line
group_by:
duration: 1min
func: max
show:
legend_value: true
name_in_header: true
in_header: raw
yaxis_id: first
color: orange
- entity: sensor.battery_bank_0_temperature_4
name: Temp
opacity: 0.8
stroke_width: 1.5
type: line
group_by:
duration: 1min
func: avg
show:
legend_value: true
name_in_header: true
in_header: raw
yaxis_id: second
float_precision: 1
color: dodgerblue
- entity: sensor.battery_bank_0_total_voltage
name: Pack
opacity: 0.8
stroke_width: 1.5
type: line
group_by:
duration: 1min
func: avg
show:
legend_value: true
name_in_header: true
in_header: raw
yaxis_id: second
float_precision: 1
color: red