Add turn on/off to coolmaster ()

This commit is contained in:
On Freund 2019-07-12 18:40:29 +03:00 committed by Paulus Schoutsen
parent 4e69b5b45f
commit 60c2e5e2e2

View file

@ -169,7 +169,17 @@ class CoolmasterClimate(ClimateDevice):
hvac_mode)
if hvac_mode == HVAC_MODE_OFF:
self._device.turn_off()
self.turn_off()
else:
self._device.set_mode(HA_STATE_TO_CM[hvac_mode])
self._device.turn_on()
self.turn_on()
def turn_on(self):
"""Turn on."""
_LOGGER.debug("Turning %s on", self.unique_id)
self._device.turn_on()
def turn_off(self):
"""Turn off."""
_LOGGER.debug("Turning %s off", self.unique_id)
self._device.turn_off()