Skip to content

Commit 18bc9f8

Browse files
authored
Merge pull request #28 from gyrex/patch-1
Create jk-bms style dashboard
2 parents 04d7824 + 0158f47 commit 18bc9f8

File tree

1 file changed

+262
-0
lines changed

1 file changed

+262
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,262 @@
1+
type: vertical-stack
2+
title: Battery 1
3+
cards:
4+
- type: custom:stack-in-card
5+
keep:
6+
margin: false
7+
box_shadow: false
8+
background: false
9+
cards:
10+
- type: grid
11+
square: false
12+
columns: 1
13+
cards:
14+
- type: markdown
15+
content: >-
16+
<center>Time:&nbsp;<b><font color=#3090C7>{{
17+
states('sensor.bms1_total_runtime_formatted') | upper
18+
}}</font>
19+
- type: grid
20+
square: false
21+
columns: 3
22+
cards:
23+
- type: markdown
24+
content: >-
25+
<center>Charge:&nbsp;<b>{% if states('switch.bms1_charging')
26+
== 'on' %} <font color=#41CD52>{{
27+
states('switch.bms1_charging') | upper }}</font> {% else %}
28+
<font color=red>{{ states('switch.bms1_charging') | upper
29+
}}</font> {% endif %}
30+
- type: markdown
31+
content: >-
32+
<center>Discharge:&nbsp;<b> {% if
33+
states('switch.bms1_discharging') == 'on' %} <font
34+
color=#41CD52>{{ states('switch.bms1_discharging') | upper
35+
}}</font> {% else %} <font color=red>{{
36+
states('switch.bms1_discharging') | upper }}</font> {% endif
37+
%}
38+
- type: markdown
39+
content: >-
40+
<center>Balance:&nbsp;<b> {% if
41+
states('switch.bms1_balancing') == 'on' %} <font
42+
color=#41CD52>{{ states('switch.bms1_balancing') | upper
43+
}}</font> {% else %} <font color=red>{{
44+
states('switch.bms1_balancing') | upper }}</font> {% endif
45+
%}
46+
47+
- type: custom:stack-in-card
48+
keep:
49+
margin: false
50+
box_shadow: false
51+
background: false
52+
cards:
53+
- type: grid
54+
square: false
55+
columns: 2
56+
cards:
57+
- type: markdown
58+
content: >-
59+
<center><b><font color=#41CD52 size=6>{{
60+
states('sensor.bms1_battery_voltage') }} V</font></b><br>
61+
Battery Power:&nbsp;&nbsp;<font color=#41CD52>{{
62+
states('sensor.bms1_battery_power') }} W</font><br> Battery
63+
Capacity:&nbsp;&nbsp;<font color=#41CD52>{{
64+
states('number.bms1_battery_capacity_total_settings') }}
65+
Ah</font><br> Cycle Capacity:&nbsp;&nbsp;<font color=#41CD52>{{
66+
states('sensor.bms1_battery_capacity_total_charging_cycle') }}
67+
Ah</font><br> Ave. Cell Vol.:&nbsp;&nbsp;<font color=#41CD52>{{
68+
states('sensor.bms1_cell_average_voltage') }} V</font><br>
69+
Balance Cur.:&nbsp;&nbsp;<font color=#41CD52>{{
70+
states('sensor.bms1_balancing_current') }} A</font><br>
71+
Battery T1:&nbsp;&nbsp;<font color=#41CD52>{{
72+
states('sensor.bms1_temperature_sensor_1') }} °C</font>
73+
- type: markdown
74+
content: >-
75+
<center><b><font color=#41CD52 size=6>{{
76+
states('sensor.bms1_battery_current') }} A</font></b><br> Remain
77+
Battery:&nbsp;&nbsp;<font color=#41CD52>{{
78+
states('sensor.bms1_battery_capacity_state_of_charge') }} %</font><br> Remain
79+
Capacity:&nbsp;&nbsp;<font color=#41CD52>{{
80+
states('sensor.bms1_battery_capacity_remaining') }} Ah</font><br>
81+
Cycle Count:&nbsp;&nbsp;<font color=#41CD52>{{
82+
states('sensor.bms1_charging_cycles') }}</font><br> Delta
83+
Cell Vol.:&nbsp;&nbsp;<font color=#41CD52>{{
84+
states('sensor.bms1_cell_delta_voltage') }} V</font><br> MOS
85+
Temp.:&nbsp;&nbsp;<font color=#41CD52>{{
86+
states('sensor.bms1_temperature_powertube') }}
87+
°C</font><br> Battery T2:&nbsp;&nbsp;<font color=#41CD52>{{
88+
states('sensor.bms1_temperature_sensor_2') }} °C</font>
89+
90+
- type: custom:stack-in-card
91+
keep:
92+
margin: false
93+
box_shadow: false
94+
background: false
95+
cards:
96+
- type: grid
97+
square: false
98+
columns: 1
99+
cards:
100+
- type: markdown
101+
content: <center><b>Cells
102+
- type: grid
103+
square: false
104+
columns: 2
105+
cards:
106+
- type: markdown
107+
content: >-
108+
<center>01.&nbsp;&nbsp;&nbsp; {% if
109+
states('sensor.bms1_cell_voltage_max_cell_number') == '1' %} <font
110+
color="#3090C7">{{ states('sensor.bms1_cell_voltage_01') }}
111+
V</font> {% elif states('sensor.bms1_cell_voltage_min_cell_number') ==
112+
'1' %} <font color="red">{{
113+
states('sensor.bms1_cell_voltage_01') }} V</font> {% else %}
114+
{{ states('sensor.bms1_cell_voltage_01') }} V {% endif %}
115+
&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
116+
states('sensor.bms1_cell_resistance_01') }} Ω <br>
117+
02.&nbsp;&nbsp;&nbsp; {% if
118+
states('sensor.bms1_cell_voltage_max_cell_number') == '2' %} <font
119+
color="#3090C7">{{ states('sensor.bms1_cell_voltage_02') }}
120+
V</font> {% elif states('sensor.bms1_cell_voltage_min_cell_number') ==
121+
'2' %} <font color="red">{{
122+
states('sensor.bms1_cell_voltage_02') }} V</font> {% else %}
123+
{{ states('sensor.bms1_cell_voltage_02') }} V {% endif %}
124+
&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
125+
states('sensor.bms1_cell_resistance_02') }} Ω <br>
126+
03.&nbsp;&nbsp;&nbsp; {% if
127+
states('sensor.bms1_cell_voltage_max_cell_number') == '3' %} <font
128+
color="#3090C7">{{ states('sensor.bms1_cell_voltage_03') }}
129+
V</font> {% elif states('sensor.bms1_cell_voltage_min_cell_number') ==
130+
'3' %} <font color="red">{{
131+
states('sensor.bms1_cell_voltage_03') }} V</font> {% else %}
132+
{{ states('sensor.bms1_cell_voltage_03') }} V {% endif %}
133+
&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
134+
states('sensor.bms1_cell_resistance_03') }} Ω <br>
135+
04.&nbsp;&nbsp;&nbsp; {% if
136+
states('sensor.bms1_cell_voltage_max_cell_number') == '4' %} <font
137+
color="#3090C7">{{ states('sensor.bms1_cell_voltage_04') }}
138+
V</font> {% elif states('sensor.bms1_cell_voltage_min_cell_number') ==
139+
'4' %} <font color="red">{{
140+
states('sensor.bms1_cell_voltage_04') }} V</font> {% else %}
141+
{{ states('sensor.bms1_cell_voltage_04') }} V {% endif %}
142+
&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
143+
states('sensor.bms1_cell_resistance_04') }} Ω <br>
144+
05.&nbsp;&nbsp;&nbsp; {% if
145+
states('sensor.bms1_cell_voltage_max_cell_number') == '5' %} <font
146+
color="#3090C7">{{ states('sensor.bms1_cell_voltage_05') }}
147+
V</font> {% elif states('sensor.bms1_cell_voltage_min_cell_number') ==
148+
'5' %} <font color="red">{{
149+
states('sensor.bms1_cell_voltage_05') }} V</font> {% else %}
150+
{{ states('sensor.bms1_cell_voltage_05') }} V {% endif %}
151+
&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
152+
states('sensor.bms1_cell_resistance_05') }} Ω <br>
153+
06.&nbsp;&nbsp;&nbsp; {% if
154+
states('sensor.bms1_cell_voltage_max_cell_number') == '6' %} <font
155+
color="#3090C7">{{ states('sensor.bms1_cell_voltage_06') }}
156+
V</font> {% elif states('sensor.bms1_cell_voltage_min_cell_number') ==
157+
'6' %} <font color="red">{{
158+
states('sensor.bms1_cell_voltage_06') }} V</font> {% else %}
159+
{{ states('sensor.bms1_cell_voltage_06') }} V {% endif %}
160+
&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
161+
states('sensor.bms1_cell_resistance_06') }} Ω <br>
162+
07.&nbsp;&nbsp;&nbsp; {% if
163+
states('sensor.bms1_cell_voltage_max_cell_number') == '7' %} <font
164+
color="#3090C7">{{ states('sensor.bms1_cell_voltage_07') }}
165+
V</font> {% elif states('sensor.bms1_cell_voltage_min_cell_number') ==
166+
'7' %} <font color="red">{{
167+
states('sensor.bms1_cell_voltage_07') }} V</font> {% else %}
168+
{{ states('sensor.bms1_cell_voltage_07') }} V {% endif %}
169+
&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
170+
states('sensor.bms1_cell_resistance_07') }} Ω <br>
171+
08.&nbsp;&nbsp;&nbsp; {% if
172+
states('sensor.bms1_cell_voltage_max_cell_number') == '8' %} <font
173+
color="#3090C7">{{ states('sensor.bms1_cell_voltage_08') }}
174+
V</font> {% elif states('sensor.bms1_cell_voltage_min_cell_number') ==
175+
'8' %} <font color="red">{{
176+
states('sensor.bms1_cell_voltage_08') }} V</font> {% else %}
177+
{{ states('sensor.bms1_cell_voltage_08') }} V {% endif %}
178+
&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
179+
states('sensor.bms1_cell_resistance_08') }} Ω <br></center>
180+
- type: markdown
181+
content: >-
182+
<center>09.&nbsp;&nbsp;&nbsp; {% if
183+
states('sensor.bms1_cell_voltage_max_cell_number') == '9' %} <font
184+
color="#3090C7">{{ states('sensor.bms1_cell_voltage_09') }}
185+
V</font> {% elif states('sensor.bms1_cell_voltage_min_cell_number') ==
186+
'9' %} <font color="red">{{
187+
states('sensor.bms1_cell_voltage_09') }} V</font> {% else %}
188+
{{ states('sensor.bms1_cell_voltage_09') }} V {% endif %}
189+
&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
190+
states('sensor.bms1_cell_resistance_09') }} Ω <br>
191+
10.&nbsp;&nbsp;&nbsp; {% if
192+
states('sensor.bms1_cell_voltage_max_cell_number') == '10' %} <font
193+
color="#3090C7">{{ states('sensor.bms1_cell_voltage_10') }}
194+
V</font> {% elif states('sensor.bms1_cell_voltage_min_cell_number') ==
195+
'10' %} <font color="red">{{
196+
states('sensor.bms1_cell_voltage_10') }} V</font> {% else %}
197+
{{ states('sensor.bms1_cell_voltage_10') }} V {% endif %}
198+
&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
199+
states('sensor.bms1_cell_resistance_10') }} Ω <br>
200+
11.&nbsp;&nbsp;&nbsp; {% if
201+
states('sensor.bms1_cell_voltage_max_cell_number') == '11' %} <font
202+
color="#3090C7">{{ states('sensor.bms1_cell_voltage_11') }}
203+
V</font> {% elif states('sensor.bms1_cell_voltage_min_cell_number') ==
204+
'11' %} <font color="red">{{
205+
states('sensor.bms1_cell_voltage_11') }} V</font> {% else %}
206+
{{ states('sensor.bms1_cell_voltage_11') }} V {% endif %}
207+
&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
208+
states('sensor.bms1_cell_resistance_11') }} Ω <br>
209+
12.&nbsp;&nbsp;&nbsp; {% if
210+
states('sensor.bms1_cell_voltage_max_cell_number') == '12' %} <font
211+
color="#3090C7">{{ states('sensor.bms1_cell_voltage_12') }}
212+
V</font> {% elif states('sensor.bms1_cell_voltage_min_cell_number') ==
213+
'12' %} <font color="red">{{
214+
states('sensor.bms1_cell_voltage_12') }} V</font> {% else %}
215+
{{ states('sensor.bms1_cell_voltage_12') }} V {% endif %}
216+
&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
217+
states('sensor.bms1_cell_resistance_12') }} Ω <br>
218+
13.&nbsp;&nbsp;&nbsp; {% if
219+
states('sensor.bms1_cell_voltage_max_cell_number') == '13' %} <font
220+
color="#3090C7">{{ states('sensor.bms1_cell_voltage_13') }}
221+
V</font> {% elif states('sensor.bms1_cell_voltage_min_cell_number') ==
222+
'13' %} <font color="red">{{
223+
states('sensor.bms1_cell_voltage_13') }} V</font> {% else %}
224+
{{ states('sensor.bms1_cell_voltage_13') }} V {% endif %}
225+
&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
226+
states('sensor.bms1_cell_resistance_13') }} Ω <br>
227+
14.&nbsp;&nbsp;&nbsp; {% if
228+
states('sensor.bms1_cell_voltage_max_cell_number') == '14' %} <font
229+
color="#3090C7">{{ states('sensor.bms1_cell_voltage_14') }}
230+
V</font> {% elif states('sensor.bms1_cell_voltage_min_cell_number') ==
231+
'14' %} <font color="red">{{
232+
states('sensor.bms1_cell_voltage_14') }} V</font> {% else %}
233+
{{ states('sensor.bms1_cell_voltage_14') }} V {% endif %}
234+
&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
235+
states('sensor.bms1_cell_resistance_14') }} Ω <br>
236+
15.&nbsp;&nbsp;&nbsp; {% if
237+
states('sensor.bms1_cell_voltage_max_cell_number') == '15' %} <font
238+
color="#3090C7">{{ states('sensor.bms1_cell_voltage_15') }}
239+
V</font> {% elif states('sensor.bms1_cell_voltage_min_cell_number') ==
240+
'15' %} <font color="red">{{
241+
states('sensor.bms1_cell_voltage_15') }} V</font> {% else %}
242+
{{ states('sensor.bms1_cell_voltage_15') }} V {% endif %}
243+
&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
244+
states('sensor.bms1_cell_resistance_15') }} Ω <br>
245+
16.&nbsp;&nbsp;&nbsp; {% if
246+
states('sensor.bms1_cell_voltage_max_cell_number') == '16' %} <font
247+
color="#3090C7">{{ states('sensor.bms1_cell_voltage_16') }}
248+
V</font> {% elif states('sensor.bms1_cell_voltage_min_cell_number') ==
249+
'16' %} <font color="red">{{
250+
states('sensor.bms1_cell_voltage_16') }} V</font> {% else %}
251+
{{ states('sensor.bms1_cell_voltage_16') }} V {% endif %}
252+
&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
253+
states('sensor.bms1_cell_resistance_16') }} Ω <br></center>
254+
- type: entities
255+
entities:
256+
- entity: switch.bms1_balancing
257+
name: Balancer
258+
- entity: switch.bms1_charging
259+
name: Charging
260+
- entity: switch.bms1_discharging
261+
name: Discharging
262+
show_header_toggle: false

0 commit comments

Comments
 (0)