Skip to content

Commit

Permalink
fixed climate
Browse files Browse the repository at this point in the history
  • Loading branch information
Lash-L committed Mar 18, 2023
1 parent e7f9127 commit af5208f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions custom_components/anova_sous_vide/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down Expand Up @@ -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")

0 comments on commit af5208f

Please sign in to comment.