Skip to content

fix calculation of dimming surplus - #3362

Merged
LKuemmel merged 3 commits into
openWB:masterfrom
LKuemmel:io
May 12, 2026
Merged

LKuemmel merged 3 commits into
openWB:masterfrom
LKuemmel:io

Conversation

@LKuemmel

@LKuemmel LKuemmel commented May 12, 2026 •

Copy link
Copy Markdown
Contributor
  • nur PV-Überschuss
  • WR gibt seinen Eigenverbrauch aus
  • PV & Speicher-Entladung
  • Speicher wird aktiv geladen
  • Speicher gesperrt
  • IO (Dimm-Kit)
  • EEBus

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts how “dimming surplus” is calculated for controllable-consumer dimming via IO, and simplifies the setup logic by always factoring the computed surplus into the available import power limit.

Changes:

  • Introduces calc_dimming_surplus() to derive surplus from PV and battery power values.
  • Updates setup() to use the new surplus calculation and simplifies the import-power-left computation.
  • Enhances debug logging to include both the surplus and the remaining dimming power.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@LKuemmel
LKuemmel requested a review from Copilot May 12, 2026 08:56
@LKuemmel
LKuemmel marked this pull request as ready for review May 12, 2026 08:56
@LKuemmel LKuemmel added the bug Something isn't working label May 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@benderl benderl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mit Simulator erfolgreich getestet!

@LKuemmel
LKuemmel merged commit 1ed2f8e into openWB:master May 12, 2026
5 checks passed
@LKuemmel
LKuemmel deleted the io branch May 12, 2026 11:45
ndrsnhs pushed a commit to ndrsnhs/core that referenced this pull request Aug 24, 2026
* fix calculation of dimming surplus

* fix

* improve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants