Skip to content

Read BSB heat pump state and skip a missing room sensor - #7

Merged
wojciech-aniol merged 3 commits into
mainfrom
bsb-heat-pump-state
Oct 25, 2026
Merged

wojciech-aniol merged 3 commits into
mainfrom
bsb-heat-pump-state

Conversation

@wojciech-aniol

@wojciech-aniol wojciech-aniol commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

BSB heat pumps (Elco Aerotop) get is_heating_pump_on_value from hpOn, so the integration can show the heat pump state (plan 22).
BSB zones get get_zone_heat_request_value from heatOrCoolReq, so "heating" shows only for a zone that asks for heat.
A BSB zone without a working room sensor now has no measured temperature (None) instead of 0 °C.
Device lookup errors are logged with _LOGGER.error, so the log no longer ends with "NoneType: None". Patch release, no label.

Changes

  • AristonBsbDevice.is_heating_pump_on_value: same name as GALEVO, reads hpOn, None when the key is missing. Data from fustom#173 has "hpOn": true and "flame": false.
  • AristonBsbDevice.get_zone_heat_request_value(zone): same name as GALEVO, reads the zone's heatOrCoolReq, None when missing.
  • AristonBsbDevice.get_measured_temp_value: None when hasRoomSens is exactly false, when roomTempError is true, or when roomTemp is missing (was 0). A missing hasRoomSens keeps the old behaviour, so the integration's BSB test data is unchanged. Return type is now float | None.
  • __init__.py: all five _LOGGER.exception calls sat outside an except block (fustom#70). The plan named two in _get_device; the same bug was in the third one there ("No device found") and in Ariston.async_discover / async_hello, so all five are _LOGGER.error now. Both "not connected" logs now say "Call async_connect() first".

Not ported

fustom#176: it adds IsHpOn to the GALEVO data item list (one unknown item can make the whole request answer HTTP 500) and makes every zone read zone 1's room temperature.

Integration impact

  • climate.py hvac_action already reads getattr(device, "is_heating_pump_on_value", False) and get_zone_heat_request_value. After the bump a BSB heat pump zone shows "heating" when hpOn and its heatOrCoolReq are true, and "idle" when the pump runs for hot water only. A gas BSB boiler heating hot water also shows "idle" now (it showed "heating" from flame).
  • current_temperature passes None on, which HA accepts.
  • The fustom#173 payload has every BSB key, even flame: false on a heat pump, so gas boilers most likely send hpOn: false, not no key. Plan 22's "value is not None" check would then add an always-off heat pump sensor on gas boilers (as "is flame on" is always off on heat pumps today). Noted in plan 22.

Review (/code-review)

Fixed: heat request getter, roomTempError, missing roomTemp, more test cases, SystemType.UNKNOWN in the test, one log text. Not changed here: Ariston.async_connect sets api before login, so a failed login is not "not connected" (old behaviour, the integration checks the login result); GALEVO's is_heating_pump_on_value is typed bool though it can be None; BSB is_flame_on_value defaults to False.

Tests

  • tests/test_bsb_device.py: heat pump on / off / missing; room sensor false / error / 0.0 reading / true / missing / empty zone; heat request true / false / missing.
  • tests/test_package.py: each _get_device failure and both "not connected" calls log ERROR records with no "NoneType" in the log.
  • 13 new test cases fail on main (checked by putting back the main source), 79 pass with the fix; ruff clean.
  • Integration branch v1/15-entity-names-sensors passes 597 tests and 355 snapshots with this branch on PYTHONPATH.

🤖 Generated with Claude Code

wojciech-aniol and others added 2 commits October 25, 2026 11:33
BSB heat pumps (Elco Aerotop, fustom#173) send "hpOn", but no property
read it, so the integration could not show the heat pump state. The new
is_heating_pump_on_value uses the GALEVO name and is None without hpOn.

A zone with "hasRoomSens": false still sends "roomTemp": 0.0, so the
climate showed 0 °C. get_measured_temp_value now gives None for it. Only
an explicit false counts, as older data has no hasRoomSens key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
_LOGGER.exception outside an except block adds "NoneType: None" to the
log (fustom#70: "Unsupported system type 5"). These are plain errors,
not exceptions, so log them with _LOGGER.error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wojciech-aniol wojciech-aniol self-assigned this Oct 25, 2026
@wojciech-aniol
wojciech-aniol marked this pull request as ready for review October 25, 2026 10:36
With hpOn read, the integration's hvac_action showed heating on every
BSB zone whenever the heat pump ran, even for hot water only. The zone
heatOrCoolReq is now get_zone_heat_request_value, which hvac_action
already checks. It is None when missing, so old data keeps its state.

get_measured_temp_value also gives None for a zone with roomTempError
or no roomTemp, instead of a 0 °C reading. Both "not connected" logs
now use the same text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wojciech-aniol
wojciech-aniol merged commit e9d0fa7 into main Oct 25, 2026
5 checks passed
@wojciech-aniol
wojciech-aniol deleted the bsb-heat-pump-state branch October 25, 2026 14:57
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