Skip to content

Growatt SPH sensor discovery fails — missing mix_* unique_id suffixes #111

Description

@johanzander

Problem

Auto-discovery maps 0 entities for Growatt SPH/MIX inverters. The ENTITY_SUFFIX_MAP in ha_api_controller.py only contains tlx_* prefixed keys (for MIN/TLX inverters) but is missing the corresponding mix_* keys used by SPH/MIX inverters.

Evidence

From debug log in #60:

Mapped 0 entities from registry (platforms=['growatt_server'])

The user's entity registry shows unique_id suffixes like:

  • mix_statement_of_charge
  • mix_battery_charge_lifetime
  • mix_battery_discharge_lifetime
  • mix_solar_generation_lifetime
  • mix_export_to_grid_lifetime
  • mix_import_from_grid_total
  • mix_load_consumption_lifetime

None of these match the existing tlx_* entries in ENTITY_SUFFIX_MAP.

Root Cause

ha_api_controller.py line ~2689 says "Both MIN and SPH use the same Growatt Server cloud entities" and reuses the same suffix map — but this is incorrect. The growatt_server HA integration uses different unique_id prefixes per inverter type: tlx_ for MIN/TLX and mix_ for SPH/MIX.

Fix

Add mix_* suffixes to ENTITY_SUFFIX_MAP alongside the existing tlx_* entries. The complete list can be derived from the debug log entity registry in #60.

Ref

Reported by @GraemeDBlue in #60.

Metadata

Metadata

Assignees

No one assigned

    Labels

    analyzedRoot-cause diagnosis posted, awaiting @claude-bot fixbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions