Add turn on/off to coolmaster (#25097)
This commit is contained in:
parent
f25f44a75b
commit
0478e7f41d
1 changed files with 12 additions and 2 deletions
|
@ -169,7 +169,17 @@ class CoolmasterClimate(ClimateDevice):
|
||||||
hvac_mode)
|
hvac_mode)
|
||||||
|
|
||||||
if hvac_mode == HVAC_MODE_OFF:
|
if hvac_mode == HVAC_MODE_OFF:
|
||||||
self._device.turn_off()
|
self.turn_off()
|
||||||
else:
|
else:
|
||||||
self._device.set_mode(HA_STATE_TO_CM[hvac_mode])
|
self._device.set_mode(HA_STATE_TO_CM[hvac_mode])
|
||||||
|
self.turn_on()
|
||||||
|
|
||||||
|
def turn_on(self):
|
||||||
|
"""Turn on."""
|
||||||
|
_LOGGER.debug("Turning %s on", self.unique_id)
|
||||||
self._device.turn_on()
|
self._device.turn_on()
|
||||||
|
|
||||||
|
def turn_off(self):
|
||||||
|
"""Turn off."""
|
||||||
|
_LOGGER.debug("Turning %s off", self.unique_id)
|
||||||
|
self._device.turn_off()
|
||||||
|
|
Loading…
Add table
Reference in a new issue