Honour the hvac_mode passed with set_temperature #125

Closed
Claude wants to merge 1 commit from fix/heater-climate into main
Collaborator

climate.set_temperature ignored the hvac_mode Home Assistant passes with it, so hvac_mode: heat on an off heater sent mode 0 and never started it. It now applies the mode.

Tested: new parametrised test in tests/test_entity_platforms.py (heat while off, off while on), seen failing first. ruff, ruff format, mypy and pytest are clean locally.

`climate.set_temperature` ignored the `hvac_mode` Home Assistant passes with it, so `hvac_mode: heat` on an off heater sent mode 0 and never started it. It now applies the mode. Tested: new parametrised test in tests/test_entity_platforms.py (heat while off, off while on), seen failing first. ruff, ruff format, mypy and pytest are clean locally.
Honour the hvac_mode passed with set_temperature
All checks were successful
Lint, type check and test / hassfest (pull_request) Successful in 47s
Lint, type check and test / quality (pull_request) Successful in 2m25s
Lint, type check and test / release (pull_request) Has been skipped
b94a451c10
Claude left a comment

Minor: climate.py async_set_temperature uses is HVACMode.HEAT. Use == so a plain "heat" string from a direct call also works. HA's service schema coerces to the enum, so this only bites direct callers.

No blocking issues. Verdict: mergeable.

Minor: climate.py async_set_temperature uses `is HVACMode.HEAT`. Use `==` so a plain "heat" string from a direct call also works. HA's service schema coerces to the enum, so this only bites direct callers. No blocking issues. Verdict: mergeable.
rob requested changes 2026-10-11 10:00:36 +00:00
@ -81,11 +83,11 @@ class CamperCanHeater(CamperCanCommandEntity, ClimateEntity):
@property
def min_temp(self) -> float:
return self._limit(self.endpoint.minimum, DEFAULT_MIN_TEMP)
Owner

Undo these changes. Having the endpoint describe its range is correct

Undo these changes. Having the endpoint describe its range is correct
Claude changed title from Fix the heater's temperature range and set_temperature hvac_mode to Honour the hvac_mode passed with set_temperature 2026-10-11 10:05:05 +00:00
rob force-pushed fix/heater-climate from b94a451c10
All checks were successful
Lint, type check and test / hassfest (pull_request) Successful in 47s
Lint, type check and test / quality (pull_request) Successful in 2m25s
Lint, type check and test / release (pull_request) Has been skipped
to ff3bbb8633
All checks were successful
Lint, type check and test / hassfest (pull_request) Successful in 39s
Lint, type check and test / quality (pull_request) Successful in 2m16s
Lint, type check and test / release (pull_request) Has been skipped
2026-10-11 10:05:06 +00:00
Compare
Claude left a comment

Range change dropped; the PR is now only the hvac_mode fix (ff3bbb8).

Range change dropped; the PR is now only the hvac_mode fix (ff3bbb8).
rob closed this pull request 2026-10-11 11:34:13 +00:00
All checks were successful
Lint, type check and test / hassfest (pull_request) Successful in 39s
Required
Details
Lint, type check and test / quality (pull_request) Successful in 2m16s
Required
Details
Lint, type check and test / release (pull_request) Has been skipped
Required
Details

Pull request closed

Sign in to join this conversation.
No reviewers
rob
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rob/CampervanHomeAssistant!125
No description provided.