Skip to content

Fix load so far crash#3959

Merged
springfall2008 merged 5 commits into
mainfrom
fix/crash_load_zero
May 25, 2026
Merged

Fix load so far crash#3959
springfall2008 merged 5 commits into
mainfrom
fix/crash_load_zero

Conversation

@springfall2008
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings May 25, 2026 09:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a crash in PredBat’s output publishing path when “today”, “today so far”, or “today remaining” load totals can be None (e.g., missing/unaligned end-of-day timestamps), by guarding dp2() calls before publishing Home Assistant sensor attributes.

Changes:

  • Add None checks around dp2(load_today), dp2(load_so_far), and dp2(load_today_remaining) when setting attributes for predbat.load_energy_predicted.
  • Apply the same None checks for predbat.load_energy_adjusted.

Comment thread apps/predbat/output.py Outdated
Comment thread apps/predbat/output.py Outdated
springfall2008 and others added 4 commits May 25, 2026 10:49
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@springfall2008 springfall2008 merged commit eb9a5e1 into main May 25, 2026
1 check passed
@springfall2008 springfall2008 deleted the fix/crash_load_zero branch May 25, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants