Skip to content

feat(galevo): support heat pump menu items and filter invalid menu values - #195

Merged
astrinh0 merged 3 commits into
fustom:mainfrom
to3k:feat/galevo-hp-menu-items
Nov 15, 2026
Merged

astrinh0 merged 3 commits into
fustom:mainfrom
to3k:feat/galevo-hp-menu-items

Conversation

@to3k

@to3k to3k commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add GALEVO heat pump / hybrid MenuItemNames constants (CH_BACKUP_RESISTANCE_1 = 337, HP_MODE = 340, HP_OUTSIDE_AIR_TEMP = 341, HP_WATER_FLOW_TEMP = 348, CH_FLOW_TEMP = 349) along with base_values() and heat_pump_values().
  • Allow AristonAPI.get_menu_items / async_get_menu_items to accept an optional menu_items query string (defaulting to MenuItemNames.base_values(), i.e. 124,119), preventing HTTP 500 errors on non-HP gateways when querying heat pump IDs (related to fustom/ariston-remotethermo-home-assistant-v3#508).
  • In AristonGalevoDevice, query MenuItemNames.heat_pump_values() in a separate batch only when HP_SYS or HYBRID_SYS is enabled, retaining cached values on transient HTTP 500/550 errors.
  • Filter invalid (error: true, None) and disconnected-probe sentinel values (max / negative min, e.g. 3276.0) in _get_menu_item_by_id and populate custom_features[menu_item.name].
  • Fall back ch_flow_temp_value and ch_flow_temp_unit to MenuItemNames.CH_FLOW_TEMP (349) when DeviceProperties.CH_FLOW_TEMP is not present in dataItems (as on GALEVO heat pump and hybrid systems).

Testing

  • Verified against a live GALEVO heat pump (Nimbus, hpSys: true) and full unit test suite (86 tests passing, 99% total coverage, 100% on galevo_device.py and const.py).

@astrinh0

Copy link
Copy Markdown
Collaborator

@to3k solve the conflits please

@astrinh0 astrinh0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required — preserve valid readings at their limits. _is_menu_item_available rejects every non-enum value equal to its reported max, and every negative value equal to min. Those bounds can be legitimate readings; for example, pump modulation at its maximum would disappear. Limit this filter to documented sentinel values and test a valid boundary reading.

Required — handle the string mode value used by the new test. hp_mode_value calls int(value). The new test supplies "Standby" for HP_MODE, but tests only the generic getter; reading hp_mode_value would raise ValueError. Test that property with the string value and handle it, or establish that the API cannot return one.

@to3k
to3k requested a review from astrinh0 November 15, 2026 20:03
@to3k

to3k commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the thorough review @astrinh0! I have merged the latest main (0.19.15) and addressed both points in 8442caf:

  • _is_menu_item_available now filters only documented gateway sentinel values (3276.0, 3276.7, -3276.8, -3277.0), preserving valid boundary readings at min/max (with unit tests for PUMP_MODULATION at 100.0 and negative min boundary).
  • hp_mode_value now safely handles non-numeric/string mode values and is tested directly against "Standby".

@astrinh0
astrinh0 merged commit 55bc859 into fustom:main Nov 15, 2026
5 checks passed
@astrinh0

Copy link
Copy Markdown
Collaborator

Merged

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.

2 participants