mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-26 22:14:55 +00:00
four_scene
This commit is contained in:
@ -31,6 +31,22 @@ class DevicesAPI {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<Map<String, dynamic>> putDeviceName(
|
||||
{required String deviceId, required String deviceName}) async {
|
||||
try {
|
||||
final response = await _httpService.put(
|
||||
path: ApiEndpoints.deviceByUuid.replaceAll('{deviceUuid}', deviceId),
|
||||
body: {"deviceName": deviceName},
|
||||
expectedResponseModel: (json) {
|
||||
return json;
|
||||
},
|
||||
);
|
||||
return response;
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
static Future<Map<String, dynamic>> controlDevice(
|
||||
DeviceControlModel controlModel, String deviceId) async {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user