mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 09:45:22 +00:00
water heater and timer and schedule ui and api ,
Circulate ui and Inching ui
This commit is contained in:
@ -32,14 +32,15 @@ class DevicesAPI {
|
||||
static Future<Map<String, dynamic>> controlDevice(
|
||||
DeviceControlModel controlModel, String deviceId) async {
|
||||
try {
|
||||
|
||||
final response = await _httpService.post(
|
||||
path: ApiEndpoints.controlDevice.replaceAll('{deviceUuid}', deviceId),
|
||||
body: controlModel.toJson(),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
print('controlDevice=$json' );
|
||||
return json;
|
||||
},
|
||||
|
||||
);
|
||||
return response;
|
||||
} catch (e) {
|
||||
@ -75,6 +76,8 @@ class DevicesAPI {
|
||||
path: ApiEndpoints.deviceFunctionsStatus.replaceAll('{deviceUuid}', deviceId),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
print('json===$json');
|
||||
|
||||
return json;
|
||||
},
|
||||
);
|
||||
@ -278,17 +281,7 @@ class DevicesAPI {
|
||||
required String code,
|
||||
required bool value,
|
||||
required List<String> days,
|
||||
|
||||
}) async {
|
||||
print( {
|
||||
"category": category,
|
||||
"time": time,
|
||||
"function":{
|
||||
"code": code,
|
||||
"value":value,
|
||||
},
|
||||
"days": days
|
||||
});
|
||||
final response = await _httpService.post(
|
||||
path: ApiEndpoints.saveSchedule.replaceAll('{deviceUuid}', deviceId),
|
||||
showServerMessage: false,
|
||||
|
Reference in New Issue
Block a user