From af5208f97e21bc04e837b05c88128914c02e9bfb Mon Sep 17 00:00:00 2001 From: Luke Date: Sat, 18 Mar 2023 11:17:12 -0400 Subject: [PATCH] fixed climate --- custom_components/anova_sous_vide/climate.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/custom_components/anova_sous_vide/climate.py b/custom_components/anova_sous_vide/climate.py index ef5b5cd..dd5c5ad 100644 --- a/custom_components/anova_sous_vide/climate.py +++ b/custom_components/anova_sous_vide/climate.py @@ -68,6 +68,12 @@ def hvac_mode(self) -> HVACMode: if self.coordinator.data["binary_sensors"][ AnovaPrecisionCookerBinarySensor.COOKING ] + or self.coordinator.data["binary_sensors"][ + AnovaPrecisionCookerBinarySensor.PREHEATING + ] + or self.coordinator.data["binary_sensors"][ + AnovaPrecisionCookerBinarySensor.MAINTAINING + ] else HVACMode.OFF ) @@ -113,3 +119,9 @@ async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None: async def async_set_temperature(self, **kwargs) -> None: await self.device.set_target_temperature(kwargs.get(ATTR_TEMPERATURE)) await self.coordinator.async_request_refresh() + + async def async_turn_on(self) -> None: + await self.device.set_mode("COOK") + + async def async_turn_off(self) -> None: + await self.device.set_mode("IDLE")