'Set operation mode.'

def set_operation_mode(self, operation_mode):

    if (operation_mode in [STATE_HEAT, STATE_COOL, STATE_OFF, STATE_ECO]):
        device_mode = operation_mode
    elif (operation_mode == STATE_AUTO):
        device_mode = STATE_HEAT_COOL
    self.device.mode = device_mode
