From 28fbcbd6260db254b18c86bc9175133d1a7866a6 Mon Sep 17 00:00:00 2001 From: Richard Date: Sat, 13 Jul 2024 18:29:10 +0200 Subject: [PATCH] Add turn_on/turn_off to climate entity --- custom_components/cometblue/climate.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/custom_components/cometblue/climate.py b/custom_components/cometblue/climate.py index 9c36fdf..4d9d4d4 100644 --- a/custom_components/cometblue/climate.py +++ b/custom_components/cometblue/climate.py @@ -176,3 +176,11 @@ async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None: temperature=self.target_temperature_low ) raise ValueError(f"Unknown HVAC mode '{hvac_mode}'") + + async def async_turn_on(self): + """Turn the entity on.""" + await self.async_set_hvac_mode(HVACMode.AUTO) + + async def async_turn_off(self): + """Turn the entity off.""" + await self.async_set_hvac_mode(HVACMode.OFF) \ No newline at end of file