Honour the hvac_mode passed with set_temperature #125
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/heater-climate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
climate.set_temperatureignored thehvac_modeHome Assistant passes with it, sohvac_mode: heaton 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.
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.
@ -81,11 +83,11 @@ class CamperCanHeater(CamperCanCommandEntity, ClimateEntity):@propertydef min_temp(self) -> float:return self._limit(self.endpoint.minimum, DEFAULT_MIN_TEMP)Undo these changes. Having the endpoint describe its range is correct
Fix the heater's temperature range and set_temperature hvac_modeto Honour the hvac_mode passed with set_temperatureb94a451c10ff3bbb8633Range change dropped; the PR is now only the hvac_mode fix (
ff3bbb8).Pull request closed