Skip to content

Conversation

@brickatius
Copy link

@brickatius brickatius commented Jan 14, 2026

PR Description

This PR improves support for LuxPower inverters when using Predbat Freeze Charging and Freeze Export, focusing on documentation clarity, configuration correctness, and stable runtime behaviour.

Summary of changes

Documentation

  • Revises the LuxPower section of Inverter Setup to fully document how Freeze Charging and Freeze Export are implemented for LuxPower inverters.

  • Explains the required Home Assistant helpers and automations.

  • Introduces and documents the new maintain_freeze_charge_status inverter option, including why it is required for LuxPower.

Configuration

Updates the luxpower.yaml example template to:

  • Enable Freeze Charging / Freeze Export where supported.

  • Reference battery_min_soc from the LuxPython integration to avoid discrepancies between user configuration and inverter state.

  • Reference battery_rate_max from an 'input_number' helper rather than a hard-coded value.

  • Adds maintain_freeze_charge_status to the inverter configuration options and documents its purpose.

Runtime behaviour

  • Updates inverter.py to support maintain_freeze_charge_status.

  • When enabled, Predbat suppresses expected warnings caused by manipulating scheduled_charge_enable during Freeze Charging.

  • This prevents predbat.status from transitioning into Warn: states during normal Freeze Charging operation, allowing existing automations (e.g. Freeze exit handling) to behave reliably.

  • Suppression only applies during Freeze Charging and does not affect normal charging behaviour or genuine error conditions.

Rationale

  • LuxPower inverters do not provide native Freeze Charging support and rely on controlled manipulation of scheduled_charge_enable. During Freeze Charging, this can legitimately cause Predbat to observe a mismatch between expected and reported state, resulting in warnings that are expected but disruptive.

  • maintain_freeze_charge_status ensures Predbat treats these cases as expected behaviour only while Freeze Charging is active, keeping predbat.status stable and avoiding unintended automation triggers.

Notes

No functional changes to Predbat planning logic.

Changes are opt-in and limited to inverters that enable maintain_freeze_charge_status.

Fixes #2916

@brickatius
Copy link
Author

brickatius commented Jan 15, 2026

The Code-quality workflow shows "completed with no jobs" and the PR is marked as "Review required / merging blocked"
Could @springfall2008 or maybe @gcoan approve the workflow run so checks can proceed. Thanks

@gcoan
Copy link
Collaborator

gcoan commented Jan 15, 2026

There is something very strange about the code changes Richard @brickatius

image

The entire inverter.py, luxpower.yaml and inverter_setup.md are being marked as being replaced by your versions

image

Which can't be merged in because you will revert any other changes that have been made to those modules since you copied them, and there's no revision history.

I suspect something about the way you have done the edits.

What I do is:

  • create my own fork of predbat
  • edit and commit changes to the files in my own fork - github tracks the changes I make
  • create a PR, this picks up the changes and identifies any clashing discrepancies for resolution

I think you have uploaded new file versions into your fork which is why it's all gone wrong in the PR. You'll have to go back, re-take a fork, edit each file, copy/paste your edits into that fork, then create a new PR and it should then all work

@brickatius
Copy link
Author

Thanks Geoffrey. I realise my mistake. I should have done edits to the file in my branch rather than replacing the whole thing. 'Upload files' is clearly only for new files. Doh! I'll start again.

@brickatius
Copy link
Author

Closing due to errors in PR.

@brickatius brickatius closed this Jan 15, 2026
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.

Freeze charge - LuxPower inverters.

2 participants