Skip to content

Commit

Permalink
Fixes for metric self sufficiency (#1226)
Browse files Browse the repository at this point in the history
* Fixes for metric self sufficiency

* [pre-commit.ci lite] apply automatic fixes

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
  • Loading branch information
springfall2008 and pre-commit-ci-lite[bot] authored Jun 19, 2024
1 parent 2f5dfe0 commit dc967e6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions apps/predbat/predbat.py
Original file line number Diff line number Diff line change
Expand Up @@ -6348,6 +6348,7 @@ def sort_window_by_price_combined(self, charge_windows, discharge_windows, stand
if self.carbon_enable:
carbon_intensity = self.carbon_intensity.get(window["start"] - self.minutes_now, 0)
average += carbon_intensity * self.carbon_metric / 1000.0
average += self.metric_self_sufficiency
if secondary_order:
average_export = self.dp2((self.rate_export.get(window["start"], 0) + self.rate_export.get(window["end"] - PREDICT_STEP, 0)) / 2)
else:
Expand Down

0 comments on commit dc967e6

Please sign in to comment.