Energy Dashboard fix, sub-device infrastructure, and a plugin-aware options dialog - #2279
Merged
wills106 merged 1 commit intoAug 22, 2026
Conversation
Bl00d-B0b
force-pushed
the
fix/energy-dashboard-remove-disabled-sensors
branch
from
August 12, 2026 11:32
adbe0ee to
f7347b6
Compare
Bl00d-B0b
added a commit
to Bl00d-B0b/homeassistant-solax-modbus
that referenced
this pull request
Aug 13, 2026
…en availability
The Gen4 dry-contact load-management controls become their own HA device
("<hub> Dry Contact", linked to the inverter via via_device, the same
pattern as the battery pack devices), and each entity only exists while
its full parent chain in the app's dependency tree is active:
Dry Contact Mode (0xC3 -> 0x12F): Generator Control | Load Management
Load Management (0xC2 -> 0x12E): Disabled | Manual Mode | Smart Save
Manual Mode switch (0xB6 -> 0x122): only in Manual Mode
Threshold On Feed-in Power (0xB7 -> 0x123) \
Threshold Off Consumption (0xB9 -> 0x125) |
Threshold Off Battery SoC (0xBA -> 0x126) | only in Smart Save
Minimum Per On Signal (0xBB -> 0x127) |
Maximum Per Day (0xBC -> 0x128) |
Schedule (0xBD -> 0x129) /
Work Start/End Time 1 and 2 (0xBE-0xC1 -> 0x12A-0x12D):
only while Schedule is enabled
All register mappings were verified live on an X3-Hybrid-G4 15kW by
changing each setting in the SolaX app and tracking the readback.
The dry-contact entities are managed dynamically by this tree, so the Dry
Contact Box option now only decides whether the sub-device exists at all;
it no longer sets the DCB feature bit on individual entities. Its label
drops the model suffix, since the option is offered only for plugins that
actually declare dry-contact entities.
Display names follow the app: Work Mode -> Load Management (option Manual
-> Manual Mode), Manual Mode Control -> Manual Mode, Feedin On Power ->
Threshold On Feed-in Power, Consume Off Power -> Threshold Off
Consumption, Switch Off SOC -> Threshold Off Battery SoC, Maximum Per Day
On -> Maximum Per Day, and the Work Stop Time readbacks become Work End
Time to match their time entities. Keys and entity ids are unchanged.
Other SolaX names are aligned with the cloud app at the same time: the
Self Use, Feed-In Priority and Backup families use "Min SoC" and "Charge
Battery to", "Feedin Priority" becomes "Feed-In Priority" everywhere
(including the remote control power-control options), Charge Start/End 1
become Force Charge Start/End and Discharge Start/End 1 become Allowed
Discharge Start/End, and Self Use Charge Battery to only appears while
Self Use night charge is enabled.
Stacked on wills106#2279, which adds the device_group/active_when infrastructure
this PR uses.
Bl00d-B0b
force-pushed
the
fix/energy-dashboard-remove-disabled-sensors
branch
from
August 13, 2026 05:37
41191ce to
23953c6
Compare
Bl00d-B0b
force-pushed
the
fix/energy-dashboard-remove-disabled-sensors
branch
from
August 13, 2026 05:41
23953c6 to
c38ce21
Compare
Bl00d-B0b
force-pushed
the
fix/energy-dashboard-remove-disabled-sensors
branch
from
August 13, 2026 11:16
c38ce21 to
1b83570
Compare
This was referenced Aug 13, 2026
…ptions dialog
Energy Dashboard: the refresh only marked sensors inactive when a feature
switch was turned off - the entity stayed alive and its registry entry was
never removed, so the device accumulated sensors stuck at unavailable
(grid-to-battery, home-consumption and PV-variant sensors). They are now
removed and their registry entries purged.
Generic sub-device infrastructure, used by follow-up PRs that move the
EPS, Parallel, External Generator and Dry Contact families into their own
devices: entity descriptions gain device_group (assigns the entity to a
named sub-device linked to the inverter with via_device, the same pattern
as the battery pack devices) and active_when ({sensor_key: allowed values}
evaluated against polled hub.data; keys not polled on a model never block
availability). The hub tracks gated entities and adds or removes them as
conditions change, with a two-poll hysteresis so a stale readback right
after a write cannot make entities flicker. A sub-device whose option is
switched off is removed from the registry instead of lingering. Switch and
number writes publish the written value immediately, as selects and times
already did. Numbers gain max_key, letting a sensor value override
native_max_value. The number, select, switch, time and sensor platforms
honour all of it. No entities move in this PR.
The options dialog no longer shows feature switches the selected plugin
does not implement, and all feature options now default to off for new
entries, including the Energy Dashboard virtual device.
Bl00d-B0b
force-pushed
the
fix/energy-dashboard-remove-disabled-sensors
branch
from
August 20, 2026 12:27
1b83570 to
841569e
Compare
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.
Base PR for the sub-device series (#2283 EPS, #2284 Parallel, #2285 External Generator, #2286 Dry Contact, plus #2277 and #2275 which stack on it). This PR moves no entities — it contains the shared fix and infrastructure, so each follow-up stays a small, single-topic review.
Energy Dashboard fix
Turning a feature switch off only marked the corresponding sensors inactive. The entity stayed alive and its registry entry was never removed, so the virtual device accumulated sensors stuck at
unavailable(grid-to-battery, home-consumption and the PV-variant sensors). They are now removed and their registry entries purged.Sub-device infrastructure (generic, usable by any plugin)
device_groupon an entity description assigns it to a named sub-device linked to the inverter withvia_device— the same pattern the battery pack devices already use.active_when({sensor_key: allowed values}) is evaluated against polledhub.data; a key that is not polled on a model never blocks availability.max_key, letting a sensor value overridenative_max_value.Options dialog
Feature switches the selected plugin does not implement are no longer shown (an EV charger no longer offers EPS or the Dry Contact Box, for example). The same option can gate different functionality per plugin — Parallel Mode covers the inverter master-slave group on the hybrid and the charger-parallel group on the EV charger (#2275). All feature options now default to off for new entries, including the Energy Dashboard virtual device.