Repository navigation
Read BSB heat pump state and skip a missing room sensor - #7
Merged
Merged
Conversation
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BSB heat pumps (Elco Aerotop) get
is_heating_pump_on_valuefromhpOn, so the integration can show the heat pump state (plan 22).BSB zones get
get_zone_heat_request_valuefromheatOrCoolReq, 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, readshpOn,Nonewhen the key is missing. Data from fustom#173 has"hpOn": trueand"flame": false.AristonBsbDevice.get_zone_heat_request_value(zone): same name as GALEVO, reads the zone'sheatOrCoolReq,Nonewhen missing.AristonBsbDevice.get_measured_temp_value:NonewhenhasRoomSensis exactlyfalse, whenroomTempErroris true, or whenroomTempis missing (was 0). A missinghasRoomSenskeeps the old behaviour, so the integration's BSB test data is unchanged. Return type is nowfloat | None.__init__.py: all five_LOGGER.exceptioncalls sat outside anexceptblock (fustom#70). The plan named two in_get_device; the same bug was in the third one there ("No device found") and inAriston.async_discover/async_hello, so all five are_LOGGER.errornow. Both "not connected" logs now say "Call async_connect() first".Not ported
fustom#176: it adds
IsHpOnto 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.pyhvac_actionalready readsgetattr(device, "is_heating_pump_on_value", False)andget_zone_heat_request_value. After the bump a BSB heat pump zone shows "heating" whenhpOnand itsheatOrCoolReqare 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" fromflame).current_temperaturepassesNoneon, which HA accepts.flame: falseon a heat pump, so gas boilers most likely sendhpOn: 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, missingroomTemp, more test cases,SystemType.UNKNOWNin the test, one log text. Not changed here:Ariston.async_connectsetsapibefore login, so a failed login is not "not connected" (old behaviour, the integration checks the login result); GALEVO'sis_heating_pump_on_valueis typedboolthough it can beNone; BSBis_flame_on_valuedefaults toFalse.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_devicefailure and both "not connected" calls log ERROR records with no "NoneType" in the log.main(checked by putting back themainsource), 79 pass with the fix; ruff clean.v1/15-entity-names-sensorspasses 597 tests and 355 snapshots with this branch onPYTHONPATH.🤖 Generated with Claude Code