Treat a running ViCare compressor as heating unless it cools (#182026)

This commit is contained in:
Franck Nijhof
2026-09-12 23:40:07 +02:00
committed by GitHub
parent ad4dd4b12d
commit 7daeb7aa2d
2 changed files with 7 additions and 4 deletions
+4 -4
View File
@@ -220,12 +220,12 @@ class ViCareClimate(ViCareEntity, ClimateEntity):
phase = None
with suppress(PyViCareNotSupportedFeatureError):
phase = compressor.getPhase()
# Devices do not agree on how to spell the phase, and
# some do not expose one at all, so a running compressor
# heats unless it says it is cooling.
if phase == "cooling":
cooling_active = True
elif phase == "heating" or phase is None:
# Phase is unset on hybrid devices that do not
# expose it: fall back to HEATING to match the
# pre-cooling-support behaviour.
else:
heating_active = True
if cooling_active:
+3
View File
@@ -55,6 +55,9 @@ async def test_all_entities(
("cooling", True, HVACAction.COOLING),
("off", False, HVACAction.IDLE),
("ready", False, HVACAction.IDLE),
# Heat pumps that phrase their phase differently ("ready" while the
# compressor runs) are heating, not idle.
("ready", True, HVACAction.HEATING),
# Active compressor without a recognisable phase falls back to
# HEATING (matches the pre-cooling-support behaviour for hybrid
# devices that may not expose the phase property).