Skip to content

Commit

Permalink
Add turn_on/turn_off to climate entity
Browse files Browse the repository at this point in the history
  • Loading branch information
rikroe committed Jul 13, 2024
1 parent 632487c commit 28fbcbd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions custom_components/cometblue/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 28fbcbd

Please sign in to comment.