Skip to content

Add CONF_API_TYPE to DATA_KEYS in config_data.py - #128

Open
danielguedon wants to merge 1 commit into
radical-squared:Custom-componentfrom
danielguedon:Custom-component
Open

danielguedon wants to merge 1 commit into
radical-squared:Custom-componentfrom
danielguedon:Custom-component

Conversation

@danielguedon

Copy link
Copy Markdown

Persist the selected API type in the config entry to prevent falling back to AquaTempOld after restart.

Persist the selected API type in the config entry to prevent falling back to AquaTempOld after restart.
@danielguedon

Copy link
Copy Markdown
Author

Additional details from debugging and testing:

Environment:

  • Aqua Temp integration: v3.0.37
  • Home Assistant Core: 2026.8.3
  • API type selected: Aqua Temp (current API)
  • Heat pump: Heiwa Blue HBHP2-95-V1
  • Device shared with a dedicated secondary Aqua Temp account

Observed behavior:
Selecting "Aqua Temp" during configuration successfully validates the credentials, but the selected API type was not persisted in the Home Assistant config entry.

Because remap_entry_data() only persists keys listed in DATA_KEYS, CONF_API_TYPE was missing from entry.data.

On the next initialization, ConfigData.update() therefore falls back to:

data.get(CONF_API_TYPE, str(APIType.AquaTempOld))

The integration then uses the legacy AquaTemp API instead of the selected current API, causing authentication to fail even though the same credentials work in the Aqua Temp app.

Tested fix:
Adding CONF_API_TYPE to DATA_KEYS makes the selected API type persist correctly.

After applying this change and reconfiguring the integration, the config entry contains:

"api_type": "aqua_temp"

I then reloaded the integration and performed a full Home Assistant restart. The integration continued to use the current Aqua Temp API and the heat pump entities remained available.

So far, this one-line change completely resolves the issue on my installation.

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.

1 participant