Skip to content

Commit

Permalink
Option to maintain history.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Hale committed Apr 3, 2024
1 parent d297fa3 commit 2c737ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ So, by default, anything below £0.10 is mapped to Super Off-Peak, between £0.1

`multiday` - current day rates are used to span one part of the week, and next day rates are used to span the rest (not compatible with in-app editor).

`maintain_history`: keep previous schedules, don't calculate schedule afresh (default: false).


### Computed thresholds

Expand Down
4 changes: 3 additions & 1 deletion src/apps/powerwall/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ def update_powerwall_tariff():

IMPORT_RATES.reset()
EXPORT_RATES.reset()
WEEK_SCHEDULES.reset()

if not pyscript.app_config.get("maintain_history", False):
WEEK_SCHEDULES.reset()


def get_breaks(config_key, default_value=None, required=True):
Expand Down

0 comments on commit 2c737ef

Please sign in to comment.