Repository navigation
Conversation
…e-register values Bit 1 of the Energy Storage Control Switch (register 43110) does not persist as a user-set value on this inverter firmware family: a Modbus write succeeds and is acknowledged, but the device silently clears it within one poll cycle. This produced the reported "Timed Charge bounces off" behaviour. Confirmed live and cross-referenced against wills106/homeassistant-solax-modbus, which never exposes this bit as a control either and drives all TOU enablement through register 43707. - Remove the bit-1 switch entity; expose it read-only as binary_sensor.solis_timed_charge_status via a new binary_sensor platform (SolisBinaryStatusSensor + get_binary_sensors). - Replace the Work Mode select's bit-conflict logic with the 8 field-tested whole-register values from solax_modbus (1/17/33/37/ 41/49/64/96), none of which set bit 1. - Drift baselines unchanged: the bit-1 unique_id simply moves from the switch platform to the binary_sensor platform (same register+bit). BREAKING: the bit-1 Timed Charge switch entity is replaced by a read-only binary_sensor, and the Work Mode select's option strings change entirely.
Contributor
|
Failed to generate code suggestions for PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root-causes and fixes the reported "Mode - Timed Charge bounces off" behaviour.
Root cause (firmware, not a code bug): bit 1 of the Energy Storage Control Switch (register 43110) does not persist as a user-set value on this inverter firmware family. A Modbus write to set it succeeds and is acknowledged by the device, but the next poll (~6s later) reads it back cleared, with every other bit untouched. Confirmed live, and cross-referenced against wills106/homeassistant-solax-modbus (
plugin_solis_fb00.py) — which the reporting user wrote the relevant part of — that never exposes this bit as a controllable option and drives all real TOU enablement through register43707's per-slot switches (already implemented here).Changes
Mode - Timed Chargeswitch entity; exposed the bit read-only asbinary_sensor.solis_timed_charge_statusvia a newbinary_sensorplatform (SolisBinaryStatusSensor,get_binary_sensors,Platform.BINARY_SENSORadded toPLATFORMS).conflicts_with/requireslogic (whose interaction with bit 1 was the source of the bounce) with the 8 field-tested whole-registeron_valueoptions copied from solax_modbus:1, 17, 33, 37, 41, 49, 64, 96— none of which set bit 1.unique_idmoves from the switch platform to the binary_sensor platform (identicalregister+bit), so noknown_sensors_*.jsonregeneration; addedget_binary_sensorscoverage to the generator + drift test so the new platform is tracked.tou.md,sensors.md).For anyone on a shipped release (≤ v0.1.16):
binary_sensor.solis_timed_charge_status).Work Modeselect's valid option strings change entirely (now the 8 solax values, e.g.Self-Use,Feed-in priority,Off-Grid Mode, …).Flagging for a prominent changelog note — you may want a minor-version bump rather than a routine patch.
Test plan
tests/test_binary_status_sensor.py(new): read-only entity has no write methods, bit update setsis_on, ignores other register / wrong controller,device_infodelegatestests/test_solis_select_entity.py: Work Mode now writes/resolves each of the 8 whole-register valuestests/test_ac_coupling.py,tests/test_switch_conflicts_requires.py: bit-1 switch removaltests/test_sensor_drift.py: passes against existing baselines (bit-1 uid moved platforms)ruff check/ruff format --checkcleanLive verification on the real inverter to follow after merge.