setDeviceWorkingModePlan method
Implementation
Future<Map<String, dynamic>> setDeviceWorkingModePlan(
String deviceSerial,
bool enable,
String startTime, // "HH:MM"
String endTime, // "HH:MM"
String week, { // "0,1,2,3,4,5,6"
String? eventArg, // "mode:0" (0:Power saving, 1:Performance, ...)
}) async {
final body = <String, dynamic>{
'deviceSerial':
deviceSerial, // This should be in header as per doc, client handles
'enable': enable ? '1' : '0',
'startTime': startTime,
'endTime': endTime,
'week': week,
};
if (eventArg != null) body['eventArg'] = eventArg;
// API doc says body for these params, not query
return _client.post('/api/v3/device/timing/plan/set', body);
}