按设备回执确认音量调整完成
This commit is contained in:
@@ -65,6 +65,19 @@ export interface DeviceVolumeUpdateResponse {
|
||||
device_id: string
|
||||
level: number
|
||||
msg_id: string
|
||||
time: number
|
||||
status: string
|
||||
}
|
||||
|
||||
export interface DeviceVolumeCommandStatusResponse {
|
||||
device_id: string
|
||||
level: number
|
||||
msg_id: string
|
||||
time: number
|
||||
status: 'sent' | 'completed' | 'failed' | string
|
||||
current_level?: number | null
|
||||
response_status?: string | null
|
||||
error?: string | null
|
||||
}
|
||||
|
||||
export interface DeviceSleepScheduleUpdateResponse {
|
||||
@@ -179,6 +192,13 @@ export async function setDeviceVolume(level: number, deviceId?: string): Promise
|
||||
})
|
||||
}
|
||||
|
||||
export async function getDeviceVolumeCommandStatus(
|
||||
deviceId: string,
|
||||
commandTime: number,
|
||||
): Promise<DeviceVolumeCommandStatusResponse> {
|
||||
return request<DeviceVolumeCommandStatusResponse>(`/banban/devices/${deviceId}/volume/${commandTime}`)
|
||||
}
|
||||
|
||||
export async function setDeviceSleepSchedule(
|
||||
start: string,
|
||||
end: string,
|
||||
|
||||
Reference in New Issue
Block a user