-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMobile Dashboard using Mushroom
288 lines (284 loc) · 10.6 KB
/
Mobile Dashboard using Mushroom
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
type: vertical-stack
cards:
- type: custom:mushroom-title-card
title: Now
- type: horizontal-stack
cards:
- type: custom:mushroom-template-card
primary: '{{ states(''sensor.h6_grid_consumption'') | round(2) }}'
secondary: Grid
icon: mdi:transmission-tower-import
icon_color: blue
entity: sensor.h6_grid_consumption
tap_action:
action: more-info
- type: custom:mushroom-template-card
primary: '{{ states(''sensor.pv_power_h6'') | round(2) }}'
secondary: Solar
icon: mdi:solar-power-variant
icon_color: accent
entity: sensor.pv_power_h6
tap_action:
action: more-info
- type: custom:mushroom-template-card
primary: '{{ states(''sensor.h6_battery_discharge'') | round(2) }}'
secondary: Discharge
icon: mdi:battery-arrow-down
icon_color: teal
entity: sensor.h6_battery_discharge
tap_action:
action: more-info
- type: horizontal-stack
cards:
- type: custom:mushroom-template-card
primary: '{{ states(''sensor.h6_load_power'') | round(2) }}'
secondary: Load
icon: mdi:home-lightning-bolt
icon_color: cyan
entity: sensor.h6_load_power
tap_action:
action: more-info
- type: custom:mushroom-template-card
primary: '{{ states(''sensor.h6_feed_in'') | round(2) }}'
secondary: Export
icon: mdi:transmission-tower-export
icon_color: purple
entity: sensor.h6_feed_in
tap_action:
action: more-info
- type: custom:mushroom-template-card
primary: '{{ states(''sensor.h6_battery_charge'') | round(2) }}'
secondary: Charge
icon: mdi:battery-arrow-up
icon_color: pink
entity: sensor.h6_battery_charge
tap_action:
action: more-info
- type: custom:mushroom-title-card
title: Totals
- type: horizontal-stack
cards:
- type: custom:mushroom-template-card
primary: '{{ states(''sensor.h6_grid_consumption_energy_today'') | round(1) }}'
secondary: Grid
icon: mdi:transmission-tower-import
icon_color: blue
entity: sensor.h6_grid_consumption_energy_today
tap_action:
action: more-info
- type: custom:mushroom-template-card
primary: '{{ states(''sensor.h6_solar_energy_today'') | round(1) }}'
secondary: Solar
icon: mdi:solar-power-variant
icon_color: accent
entity: sensor.h6_solar_energy_today
tap_action:
action: more-info
- type: custom:mushroom-template-card
primary: '{{ states(''sensor.h6_battery_discharge_today'') | round(1) }}'
secondary: Discharge
icon: mdi:battery-arrow-down
icon_color: teal
entity: sensor.h6_battery_discharge_today
tap_action:
action: more-info
- type: horizontal-stack
cards:
- type: custom:mushroom-template-card
primary: '{{ states(''sensor.h6_load_energy_today'') | round(1) }}'
secondary: Load
icon: mdi:home-lightning-bolt
icon_color: cyan
entity: sensor.h6_load_energy_today
tap_action:
action: more-info
- type: custom:mushroom-template-card
primary: '{{ states(''sensor.h6_feed_in_energy_today'') | round(1) }}'
secondary: Export
icon: mdi:transmission-tower-export
icon_color: purple
entity: sensor.h6_feed_in_energy_today
tap_action:
action: more-info
- type: custom:mushroom-template-card
primary: '{{ states(''sensor.h6_battery_charge_today'') | round(1) }}'
secondary: Charge
icon: mdi:battery-arrow-up
icon_color: pink
entity: sensor.h6_battery_charge_today
tap_action:
action: more-info
- type: custom:mushroom-title-card
title: Battery
- type: horizontal-stack
cards:
- type: custom:mushroom-template-card
primary: '{{ states(''sensor.h6_battery_soc'') | round(0) }} %'
secondary: SOC
icon: mdi:battery-charging-50
icon_color: teal
entity: sensor.h6_battery_soc
tap_action:
action: more-info
- type: custom:mushroom-template-card
primary: '{{ states(''sensor.h6_bms_kwh_remaining'') | round(1) }}'
secondary: Remaining
icon: mdi:battery-charging-50
icon_color: teal
entity: sensor.h6_bms_kwh_remaining
tap_action:
action: more-info
- type: custom:mushroom-template-card
primary: '{{ states(''sensor.battery_capacity'') | round(1) }}'
secondary: Capacity
icon: mdi:battery-charging-100
icon_color: indigo
entity: sensor.battery_capacity
tap_action:
action: more-info
- type: custom:mushroom-title-card
title: Solar
- type: horizontal-stack
cards:
- type: custom:mushroom-template-card
primary: '{{ states(''sensor.solcast_pv_forecast_forecast_today'') | round(1) }}'
secondary: Today
icon: mdi:solar-power
icon_color: accent
entity: sensor.solcast_pv_forecast_forecast_today
tap_action:
action: more-info
badge_icon: ''
- type: custom:mushroom-template-card
primary: >-
{{ states('sensor.solcast_pv_forecast_forecast_remaining_today') |
round(1) }}
secondary: Remaining
icon: mdi:solar-power
icon_color: accent
entity: sensor.solcast_pv_forecast_forecast_remaining_today
tap_action:
action: more-info
- type: custom:mushroom-template-card
primary: >-
{{ states('sensor.solcast_pv_forecast_forecast_tomorrow') | round(1)
}}
secondary: Tomorrow
icon: mdi:solar-power
icon_color: accent
entity: sensor.solcast_pv_forecast_forecast_tomorrow
tap_action:
action: more-info
- type: custom:mushroom-title-card
title: Rates
- type: horizontal-stack
cards:
- type: custom:mushroom-template-card
primary: >-
{{
states('sensor.octopus_energy_electricity_XXX_XXX_current_rate')
| round(2) }}
secondary: Current
icon: mdi:currency-gbp
icon_color: blue
entity: >-
sensor.octopus_energy_electricity_XXX_XXX_current_rate
tap_action:
action: more-info
badge_icon: mdi:currency-gbp
- type: custom:mushroom-template-card
primary: >-
{{
states('sensor.octopus_energy_electricity_XXX_XXX_current_accumulative_cost')
| round(2) }}/{{
((states('sensor.octopus_energy_electricity_XXX_XXX_current_accumulative_cost')|float
-
states('sensor.octopus_energy_electricity_XXX_XXX_current_standing_charge')|float
) / states('sensor.h6_grid_consumption_energy_today')|float) |
round(2) }}
secondary: Total/Average
icon: mdi:currency-gbp
icon_color: blue
entity: >-
sensor.octopus_energy_electricity_XXX_XXX_current_accumulative_cost
tap_action:
action: more-info
badge_icon: mdi:currency-gbp
- type: custom:mushroom-template-card
primary: >-
{{
states('sensor.octopus_energy_electricity_XXX_XXX_next_rate')
| round(2) }}
secondary: Next
icon: mdi:currency-gbp
icon_color: blue
entity: sensor.octopus_energy_electricity_XXX_XXX_next_rate
tap_action:
action: more-info
badge_icon: mdi:currency-gbp
- type: custom:mushroom-title-card
title: Auto Charging
- type: horizontal-stack
cards:
- type: custom:mushroom-template-card
primary: >-
{{
states('binary_sensor.octopus_energy_target_half_hourly_charge_slots')
}}
secondary: Morning
icon: mdi:battery-charging-50
icon_color: teal
entity: binary_sensor.octopus_energy_target_half_hourly_charge_slots
tap_action:
action: more-info
- type: custom:mushroom-template-card
primary: >-
{{ states('binary_sensor.octopus_energy_target_cheap_slots_afternoon')
}}
secondary: Afternoon
icon: mdi:battery-charging-50
icon_color: teal
entity: binary_sensor.octopus_energy_target_cheap_slots_afternoon
tap_action:
action: more-info
- type: custom:mushroom-template-card
primary: >-
{{
states('binary_sensor.octopus_energy_target_cheap_slots_all_day_4pm')
}}
secondary: Cheap
icon: mdi:battery-charging-50
icon_color: teal
entity: binary_sensor.octopus_energy_target_cheap_slots_all_day_4pm
tap_action:
action: more-info
- type: horizontal-stack
cards:
- type: custom:mushroom-template-card
primary: >-
{% set day_of_week = now().weekday() %}
{% set day_values =
[states('sensor.load_am_1')|float,states('sensor.load_am_2')|float,states('sensor.load_am_3')|float,states('sensor.load_am_4')|float,states('sensor.load_am_5')|float,states('sensor.load_am_6')|float,states('sensor.load_am_0')|float]
%}
{{ day_values[day_of_week] | round(2) }}
secondary: Load AM
icon: mdi:home-lightning-bolt
icon_color: cyan
- type: custom:mushroom-template-card
primary: |2
{% set day_of_week = now().weekday() %} {% set day_values =
[states('sensor.load_day_1')|float-states('sensor.load_am_1')|float,states('sensor.load_day_2')|float-states('sensor.load_am_2')|float,states('sensor.load_day_3')|float-states('sensor.load_am_3')|float,states('sensor.load_day_4')|float-states('sensor.load_am_4')|float,states('sensor.load_day_5')|float-states('sensor.load_am_5')|float,states('sensor.load_day_6')|float-states('sensor.load_am_6')|float,states('sensor.load_day_0')|float-states('sensor.load_am_0')|float]
%} {{ day_values[day_of_week] | round(2) }}
secondary: Load PM
icon: mdi:home-lightning-bolt
icon_color: cyan
- type: custom:mushroom-template-card
primary: >-
{% set day_of_week = now().weekday() %}
{% set day_values =
[states('sensor.load_day_1')|float,states('sensor.load_day_2')|float,states('sensor.load_day_3')|float,states('sensor.load_day_4')|float,states('sensor.load_day_5')|float,states('sensor.load_day_6')|float,states('sensor.load_day_0')|float]
%}
{{ day_values[day_of_week] | round(2) }}
secondary: Load Day
icon: mdi:home-lightning-bolt
icon_color: cyan