one gang wizard &two Gang wizard & wh wizard

This commit is contained in:
mohammad
2024-09-26 16:26:39 +03:00
parent 8508995108
commit 4e345db842
21 changed files with 1210 additions and 170 deletions

View File

@ -189,5 +189,7 @@ abstract class ApiEndpoints {
'/schedule/{deviceUuid}?category={category}';
static const String changeSchedule = '/schedule/enable/{deviceUuid}';
static const String deleteSchedule = '/schedule/{deviceUuid}/{scheduleId}';
static const String reportLogs = '/device/report-logs/{deviceUuid}?code={code}&startTime={startTime}&endTime={endTime}';
static const String reportLogs =
'/device/report-logs/{deviceUuid}?code={code}&startTime={startTime}&endTime={endTime}';
static const String controlBatch = '/device/control/batch';
}

View File

@ -378,4 +378,29 @@ class DevicesAPI {
return response;
}
static Future deviceController({
List<String>? devicesUuid,
String? code,
bool? value,
}) async {
try {
final response = await _httpService.post(
path: ApiEndpoints.controlBatch,
body: {"devicesUuid": devicesUuid, "code": code, "value": value},
showServerMessage: true,
expectedResponseModel: (json) {
print('json-=-=-=-=-=--=${json}');
return json;
},
);
return response;
} catch (e) {
rethrow;
}
}
}