Skip to content

Solis fix for reserve#3659

Merged
springfall2008 merged 1 commit intomainfrom
solis3
Mar 25, 2026
Merged

Solis fix for reserve#3659
springfall2008 merged 1 commit intomainfrom
solis3

Conversation

@springfall2008
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 25, 2026 20:31
Copy link
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

Updates the SolisCloud integration to better align reserve/min-SoC behavior and Home Assistant switch state conventions, plus bumps the Predbat version.

Changes:

  • Adjust SolisCloud auto-configuration to use reserve_soc as battery_min_soc.
  • Publish SolisCloud switch entities using on/off states instead of 1/0.
  • Bump Predbat version to v8.34.13.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
apps/predbat/solis.py Updates SolisCloud auto-config reserve/min-SoC mapping and normalizes published switch states to HA conventions.
apps/predbat/predbat.py Version bump reflecting the Solis changes.

#self.set_arg("soc_max", [f"sensor.{self.prefix}_solis_{device}_battery_capacity" for device in devices])

# Reserve and limits
# Reserve isn't writable (so we don't use it for SolisCloud) instead we use it as the min SOC
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

The new comment says the reserve SOC “isn't writable”, but this integration does support writing reserve_soc via number_event (it maps reserve_soc to SOLIS_CID_BATTERY_RESERVE_SOC and calls read_and_write_cid). This makes the comment misleading for future maintainers.

Consider rewording to clarify that Predbat's core reserve functionality is disabled for SolisCloud (see INVERTER_DEF["SolisCloud"]["has_reserve_soc"] == False), and that reserve_soc is being reused as battery_min_soc for planning purposes (or remove the “isn't writable” claim).

Suggested change
# Reserve isn't writable (so we don't use it for SolisCloud) instead we use it as the min SOC
# Predbat core reserve is disabled for SolisCloud; reuse reserve_soc as battery_min_soc for planning instead

Copilot uses AI. Check for mistakes.
@springfall2008 springfall2008 merged commit 02b6007 into main Mar 25, 2026
5 checks passed
@springfall2008 springfall2008 deleted the solis3 branch March 25, 2026 21:03
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