Set the night temperature switch
Function table
__IDO_FUNCTABLE__.funcTable35Model.setTemperatureSwitch
Description of Nighttime Thermoswitch Model
- IDOSetV3TemperatureModel
Parameter | Description | Remark |
---|---|---|
mode | Switch | bool yes is on no is off |
startHour | Start hour | int |
startMinute | Start minute | int |
endHour | Finish hour | int |
endMinute | Finish minute | int |
unit | Temperature unit settings | 1 :c(Celsius) 16 :f(Fahrenheit) |
Command code
Objc:
IDOSetV3TemperatureModel * model = [IDOSetV3TemperatureModel currentModel];
[IDOFoundationCommand setTemperatureCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//Set successfully
}else if (errorCode == 6) {
//Device not supported
}else {
//Setup failed
}
}];
Swift:
let model = IDOSetV3TemperatureModel.current();
IDOFoundationCommand.setTemperature(model) { (errorCode) in
if errorCode == 0 {
//Set successfully
}else if errorCode == 6{
//Device does not support this method
}else {
//Wrong setting
}
};