'Set hold mode (away, home, temp, sleep, etc.).'

def set_hold_mode(self, hold_mode):

    hold = self.current_hold_mode
    if (hold == hold_mode):
        return
    elif ((hold_mode == 'None') or (hold_mode is None)):
        if (hold == VACATION_HOLD):
            self.data.ecobee.delete_vacation(self.thermostat_index, self.vacation)
        else:
            self.data.ecobee.resume_program(self.thermostat_index)
    elif (hold_mode == TEMPERATURE_HOLD):
        self.set_temp_hold(int(self.current_temperature))
    else:
        self.data.ecobee.set_climate_hold(self.thermostat_index, hold_mode, self.hold_preference())
    self.update_without_throttle = True
