Skip to content

fix: split Growatt suffix map for MIN vs SPH discovery (#111)#114

Merged
johanzander merged 3 commits into
mainfrom
fix/sph-discovery-suffix-map
Jun 9, 2026
Merged

fix: split Growatt suffix map for MIN vs SPH discovery (#111)#114
johanzander merged 3 commits into
mainfrom
fix/sph-discovery-suffix-map

Conversation

@johanzander

Copy link
Copy Markdown
Owner

ENTITY_SUFFIX_MAP was a single shared map for both MIN and SPH inverters. It only had tlx_* sensor keys (MIN) and missed the mix_* keys that SPH inverters use via growatt_server. This caused discovery to map 0 sensors for SPH users.

Split into GROWATT_MIN_SUFFIX_MAP (tlx_* + number/switch entities) and GROWATT_SPH_SUFFIX_MAP (mix_* sensors only, no number/switch). Discovery now runs both maps and picks the platform with more matches.

Also fixes CI scenario files for SPH that were copy-pasted from MIN with wrong entity names, wrong unique_ids, and detected_platform: null.

Closes #111

johanzander and others added 3 commits June 9, 2026 19:12
ENTITY_SUFFIX_MAP was a single shared map for both MIN and SPH
inverters. It only had tlx_* sensor keys (MIN) and missed the
mix_* keys that SPH inverters use via growatt_server. This caused
discovery to map 0 sensors for SPH users.

Split into GROWATT_MIN_SUFFIX_MAP (tlx_* + number/switch entities)
and GROWATT_SPH_SUFFIX_MAP (mix_* sensors only, no number/switch).
Discovery now runs both maps and picks the platform with more matches.

Also fixes CI scenario files for SPH that were copy-pasted from MIN
with wrong entity names, wrong unique_ids, and detected_platform: null.

Closes #111

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The ci-wizard-growatt-cloud-octopus scenario (issue #60) had MIN-style
sensor entity names while the entity registry correctly used mix_*
unique_ids. Fixed sensor states to match entity registry entity_ids,
removed MIN-only sensors (local_load_power, lifetime_system_production,
lifetime_self_consumption), added missing lifetime_import entity, and
renamed file to ci-wizard-growatt-sph-cloud-octopus for clarity.

Also added TODO for consolidating the two Growatt MIN/SPH detection
paths (_parse_ha_metadata vs discover_sensors_from_registry), and
updated stale ENTITY_SUFFIX_MAP references in existing TODO entries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sensor entity names in ci-wizard-growatt-sph-cloud-octopus.json were
MIN-style (battery_1_charging_w, import_power, internal_wattage) but
entity registry had SPH entity_ids (battery_charge, import_from_grid,
wattage_pv_all). Fixed sensors to match registry, removed MIN-only
sensors, added missing lifetime_import registry entry and
required_sensors_growatt_server_sph. Updated stale ENTITY_SUFFIX_MAP
references in TODO.md and added consolidation TODO for the two
MIN/SPH detection paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@johanzander johanzander merged commit c67489d into main Jun 9, 2026
7 checks passed
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.

Growatt SPH sensor discovery fails — missing mix_* unique_id suffixes

1 participant