setDefencePlan method
Implementation
Future<Map<String, dynamic>> setDefencePlan(
String deviceSerial,
bool enable,
String startTime, // "HH:MM"
String stopTime, // "HH:MM" or "nHH:MM" for next day
String period, { // "0,1,2,3,4,5,6"
int? channelNo,
}) async {
final body = <String, dynamic>{
'deviceSerial': deviceSerial,
'enable': enable ? 1 : 0,
'startTime': startTime,
'stopTime': stopTime,
'period': period,
};
if (channelNo != null) body['channelNo'] = channelNo;
return _client.post('/api/lapp/device/defence/plan/set', body);
}