Repository navigation
Expand file tree
/
Copy pathapps.yaml
More file actions
518 lines (390 loc) · 16.4 KB
/
Copy pathapps.yaml
File metadata and controls
518 lines (390 loc) · 16.4 KB
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
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
pred_bat:
module: predbat
class: PredBat
# ---------------------------------------------------------------
# General
# ---------------------------------------------------------------
prefix: predbat
timezone: Europe/London
currency_symbols:
- "£"
- "p"
threads: auto
forecast_hours: 48
days_previous:
- 28
# ---------------------------------------------------------------
# Tariff comparison
#
# Compare:
# 1. Intelligent Octopus Go import / Outgoing Fixed export
# 2. Intelligent Octopus Go import / Agile Outgoing export
# 3. Octopus Flux import / Flux export
#
# DNO region H = Southern England / SSE.
# These comparisons do not change the tariff PredBat uses for normal
# operation; they are separate what-if simulations for the Compare page.
# ---------------------------------------------------------------
dno_region: "H"
compare_list:
- id: "igo_fixed"
name: "Intelligent GO import / Fixed export"
rates_import_octopus_url: "https://api.octopus.energy/v1/products/INTELLI-FIX-12M-25-08-29/electricity-tariffs/E-1R-INTELLI-FIX-12M-25-08-29-{dno_region}/standard-unit-rates/"
rates_export_octopus_url: "https://api.octopus.energy/v1/products/OUTGOING-VAR-24-10-26/electricity-tariffs/E-1R-OUTGOING-VAR-24-10-26-{dno_region}/standard-unit-rates/"
- id: "edf_goelectric"
name: "EDF GoElectric 12m v2 / Export Exclusive 15p"
rates_import:
- start: "23:00:00"
end: "06:00:00"
rate: 6.99
- start: "06:00:00"
end: "23:00:00"
rate: 33.80
rates_export:
- rate: 15.0
- id: "eon_nextdrivesmart"
name: "Next Drive Smart v7.0 / Next Export Exclusive 13p"
rates_import:
- start: "00:00:00"
end: "06:00:00"
rate: 8.00
- start: "06:00:00"
end: "00:00:00"
rate: 30.72
rates_export:
- rate: 13.0
- id: "igo_agile"
name: "Intelligent GO import / Agile export"
rates_import_octopus_url: "https://api.octopus.energy/v1/products/INTELLI-FIX-12M-25-08-29/electricity-tariffs/E-1R-INTELLI-FIX-12M-25-08-29-{dno_region}/standard-unit-rates/"
rates_export_octopus_url: "https://api.octopus.energy/v1/products/AGILE-OUTGOING-19-05-13/electricity-tariffs/E-1R-AGILE-OUTGOING-19-05-13-{dno_region}/standard-unit-rates/"
- id: "flux"
name: "Octopus Flux import / Flux export"
rates_import_octopus_url: "https://api.octopus.energy/v1/products/FLUX-IMPORT-23-02-14/electricity-tariffs/E-1R-FLUX-IMPORT-23-02-14-{dno_region}/standard-unit-rates/"
rates_export_octopus_url: "https://api.octopus.energy/v1/products/FLUX-EXPORT-23-02-14/electricity-tariffs/E-1R-FLUX-EXPORT-23-02-14-{dno_region}/standard-unit-rates/"
# ---------------------------------------------------------------
# Load ML prediction
#
# LoadML replaces the normal days_previous load forecast while
# enabled. Temperature forecasting is included as an ML input.
# ---------------------------------------------------------------
load_ml_enable: true
load_ml_source: true
load_ml_max_days_history: 42
load_ml_database_days: 90
temperature_enable: true
# ---------------------------------------------------------------
# AlphaESS custom inverter - Modbus only
# ---------------------------------------------------------------
num_inverters: 1
inverter_type: "ALPHAESS_MODBUS"
inverter:
name: "AlphaESS SMILE-G3 Modbus"
has_rest_api: false
has_mqtt_api: false
has_service_api: true
output_charge_control: "power"
charge_control_immediate: false
current_dp: 1
charge_discharge_with_rate: true
has_charge_enable_time: false
has_discharge_enable_time: false
has_target_soc: false
target_soc_used_for_discharge: false
has_reserve_soc: false
has_timed_pause: false
time_button_press: false
support_charge_freeze: true
support_discharge_freeze: true
has_ge_inverter_mode: false
has_fox_inverter_mode: false
has_idle_time: false
has_time_window: false
charge_time_format: "S"
charge_time_entity_is_option: false
can_span_midnight: true
clock_time_format: "%Y-%m-%d %H:%M:%S"
num_load_entities: 1
soc_units: "%"
write_and_poll_sleep: 2
# PredBat writes these helpers to select the requested charge/export
# power. Home Assistant automations can map them to the AlphaESS controls.
charge_rate:
- input_number.predbat_alphaess_charge_rate_w
discharge_rate:
- input_number.predbat_alphaess_export_rate_w
# ---------------------------------------------------------------
# AlphaESS Modbus control
# ---------------------------------------------------------------
charge_start_service:
# Release any active 0 kW Dispatch freeze first
- service: switch.turn_off
entity_id: switch.alphaess_inverter_dispatch
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_export
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_discharging
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_import
- service: number.set_value
entity_id: number.alphaess_inverter_force_charging_stop_at_soc
value: "{target_soc}"
- service: number.set_value
entity_id: number.alphaess_inverter_force_charging_duration
value: 480
- service: switch.turn_on
entity_id: switch.alphaess_inverter_force_charging_hold
- service: switch.turn_on
entity_id: switch.alphaess_inverter_force_charging
# ---------------------------------------------------------------
# Charge Freeze
#
# User preference: do not force-charge from grid, but continue normal
# self-consumption. PV supplies the house first, surplus PV may charge
# the battery, and the battery may discharge to cover house demand when
# PV is insufficient.
#
# AlphaESS Dispatch Mode 1 = Battery only Charges from PV.
# The Dispatch power register is shared between modes, so set it
# explicitly rather than inheriting a stale value from another hold.
# ---------------------------------------------------------------
charge_freeze_service:
# Stop all existing forced battery modes first
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_charging
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_charging_hold
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_export
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_discharging
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_import
- service: switch.turn_off
entity_id: switch.alphaess_inverter_dispatch
- service: select.select_option
entity_id: select.alphaess_inverter_dispatch_mode
option: "Battery only Charges from PV (1)"
# Negative Dispatch power permits up to 8 kW of PV battery charging.
- service: number.set_value
entity_id: number.alphaess_inverter_dispatch_power
value: -8.0
- service: number.set_value
entity_id: number.alphaess_inverter_dispatch_duration
value: 480
- service: switch.turn_on
entity_id: switch.alphaess_inverter_dispatch
charge_stop_service:
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_charging
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_charging_hold
# Release any active Charge Freeze / Dispatch hold
- service: switch.turn_off
entity_id: switch.alphaess_inverter_dispatch
discharge_start_service:
# Release any active 0 kW Dispatch freeze first
- service: switch.turn_off
entity_id: switch.alphaess_inverter_dispatch
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_charging
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_charging_hold
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_export
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_import
# The accompanying script uses the final percentage displayed by PredBat
# while Exporting and falls back to this supplied value during start-up.
- service: script.predbat_alphaess_export_stop_soc
target_soc: "{target_soc}"
- service: number.set_value
entity_id: number.alphaess_inverter_force_discharging_duration
value: 480
- service: switch.turn_on
entity_id: switch.alphaess_inverter_force_discharging
# ---------------------------------------------------------------
# Freeze Export (PredBat discharge freeze)
#
# When the PredBat plan shows "Freeze Export", PredBat calls
# discharge_freeze_service. When that period ends, it calls
# discharge_stop_service.
#
# User preference: prevent battery charging, while continuing normal
# self-consumption. PV supplies the house first; if PV is insufficient
# the battery may discharge to cover house demand. Surplus PV is exported
# rather than stored.
#
# AlphaESS Dispatch Mode 19 = No Battery Charge.
# The Dispatch power register is shared between modes, so set it
# explicitly rather than inheriting Charge Freeze's -8 kW value.
# ---------------------------------------------------------------
discharge_freeze_service:
# Stop all existing forced battery modes first
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_charging
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_charging_hold
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_export
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_discharging
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_import
- service: switch.turn_off
entity_id: switch.alphaess_inverter_dispatch
- service: select.select_option
entity_id: select.alphaess_inverter_dispatch_mode
option: "No Battery Charge (19)"
- service: number.set_value
entity_id: number.alphaess_inverter_dispatch_power
value: 0
- service: number.set_value
entity_id: number.alphaess_inverter_dispatch_duration
value: 480
- service: switch.turn_on
entity_id: switch.alphaess_inverter_dispatch
discharge_stop_service:
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_export
- service: switch.turn_off
entity_id: switch.alphaess_inverter_force_discharging
# Release any active Discharge Freeze / Dispatch hold
- service: switch.turn_off
entity_id: switch.alphaess_inverter_dispatch
# ---------------------------------------------------------------
# AlphaESS Modbus battery state
# ---------------------------------------------------------------
soc_percent:
- sensor.alphaess_inverter_battery_state_of_charge
soc_max:
- 13.68
# ---------------------------------------------------------------
# AlphaESS Modbus live power
# ---------------------------------------------------------------
battery_power:
- sensor.alphaess_inverter_battery_power
battery_power_invert: false
pv_power:
- sensor.alphaess_inverter_current_pv_production
load_power:
- sensor.alphaess_inverter_current_house_load
load_power_invert: false
grid_power:
- sensor.alphaess_inverter_grid_power
grid_power_invert: true
# ---------------------------------------------------------------
# AlphaESS Modbus daily energy
# ---------------------------------------------------------------
# Replace this with your own incrementing kWh house-load-today sensor.
# This example name is produced by a separate Modbus-derived template sensor.
load_today:
- sensor.alphaess_inverter_predbat_experimental_modbus_house_load_today
import_today:
- sensor.alphaess_inverter_today_s_energy_from_grid
export_today:
- sensor.alphaess_inverter_today_s_energy_feed_to_grid
pv_today:
- sensor.alphaess_inverter_today_s_pv_generation
# PredBat uses a low discharge rate while holding an export freeze.
inverter_freeze_export_discharge_rate: 240
# ---------------------------------------------------------------
# Battery / inverter characteristics
# ---------------------------------------------------------------
battery_rate_max:
- 8000
inverter_limit:
- 8000
inverter_limit_charge:
- 8000
inverter_limit_discharge:
- 8000
inverter_limit_export:
- 8000
battery_min_soc:
- 20
battery_scaling:
- 1.0
battery_scaling_auto: true
balance_inverters_seconds: 0
# ---------------------------------------------------------------
# Clock skew
# ---------------------------------------------------------------
inverter_clock_skew_start: 0
inverter_clock_skew_end: 0
inverter_clock_skew_discharge_start: 0
inverter_clock_skew_discharge_end: 0
clock_skew: 0
# ---------------------------------------------------------------
# Solcast forecast from Home Assistant
# ---------------------------------------------------------------
pv_forecast_today: sensor.solcast_pv_forecast_forecast_today
pv_forecast_tomorrow: sensor.solcast_pv_forecast_forecast_tomorrow
pv_forecast_d3: sensor.solcast_pv_forecast_forecast_day_3
pv_forecast_d4: sensor.solcast_pv_forecast_forecast_day_4
# ---------------------------------------------------------------
# EV / Intelligent Octopus Go
#
# One EV only: Volkswagen ID.3.
# This prevents PredBat creating a second phantom car/slot.
# ---------------------------------------------------------------
num_cars: 1
# ---------------------------------------------------------------
# Optional EV data. This example deliberately omits car_charging_now:
# connect a reliable charger-state entity only if your setup needs it.
# VW ID.3 battery size (kWh). PredBat requires one decimal place.
car_charging_battery_size:
- 82.0
# Current VW ID.3 state of charge and target charge level from
# the BottlecapDave Octopus Energy integration. These improve
# PredBat's estimate of how much EV charging remains.
car_charging_soc:
- sensor.octopus_energy_xxxxxx_intelligent_state_of_charge
car_charging_limit:
- number.octopus_energy_xxxxxx_intelligent_charge_target
# ---------------------------------------------------------------
# Octopus Energy - Home Assistant BottlecapDave integration
#
# PredBat does NOT connect directly to the Octopus API for its normal
# live tariff operation.
#
# Tariff rates and Intelligent Octopus Go information are read
# entirely from the BottlecapDave Home Assistant integration.
#
# The separate compare_list above uses Octopus API URLs only for
# PredBat's tariff comparison simulations.
# ---------------------------------------------------------------
metric_octopus_import: sensor.octopus_energy_electricity_xxxxxx_current_rate
metric_octopus_export: sensor.octopus_energy_electricity_xxxxxx_export_current_rate
metric_standing_charge: sensor.octopus_energy_electricity_xxxxxx_current_standing_charge
# ---------------------------------------------------------------
# Intelligent Octopus Go handling is installation-specific.
# Add the standard PredBat octopus_* fields only when they match your
# integration and tariff behaviour.
octopus_slot_low_rate: false
octopus_slot_max: 12
combine_charge: true
calculate_export_during_charge: false
# ---------------------------------------------------------------
# PredBat watch list
#
# Re-run PredBat when an optional configured EV state-of-charge entity
# changes. List-valued configuration references use the +[...] syntax.
# ---------------------------------------------------------------
watch_list:
- "+[car_charging_soc]"
# ---------------------------------------------------------------
# Axle Energy VPP
#
# Store the real API key only in Home Assistant secrets.yaml:
# axle_api_key: your-real-key
# axle_control remains false so PredBat continues to control AlphaESS
# through the custom Modbus services above during Axle events.
# ---------------------------------------------------------------
axle_api_key: !secret axle_api_key
axle_pence_per_kwh: 100
axle_automatic: true
axle_control: false
# ---------------------------------------------------------------
# Scaling
# ---------------------------------------------------------------
import_export_scaling: 1.0