Plugwise bump module version to fix heating-state and OnOff devices (#66936)
This commit is contained in:
parent
8c96f1457d
commit
620b653d76
11 changed files with 25 additions and 50 deletions
|
@ -107,15 +107,16 @@ class PlugwiseClimateEntity(PlugwiseEntity, ClimateEntity):
|
|||
if "control_state" in self.device:
|
||||
if self.device.get("control_state") == "cooling":
|
||||
return CURRENT_HVAC_COOL
|
||||
if self.device.get("control_state") == "heating":
|
||||
# Support preheating state as heating, until preheating is added as a separate state
|
||||
if self.device.get("control_state") in ["heating", "preheating"]:
|
||||
return CURRENT_HVAC_HEAT
|
||||
else:
|
||||
heater_central_data = self.coordinator.data.devices[
|
||||
self.coordinator.data.gateway["heater_id"]
|
||||
]
|
||||
if heater_central_data.get("heating_state"):
|
||||
if heater_central_data["binary_sensors"].get("heating_state"):
|
||||
return CURRENT_HVAC_HEAT
|
||||
if heater_central_data.get("cooling_state"):
|
||||
if heater_central_data["binary_sensors"].get("cooling_state"):
|
||||
return CURRENT_HVAC_COOL
|
||||
return CURRENT_HVAC_IDLE
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue