Update general device information

This commit is contained in:
2024-09-09 21:43:57 +02:00
parent a97614ce44
commit 36ba4efd9f
8 changed files with 109 additions and 30 deletions

View File

@ -120,6 +120,18 @@ export class DeviceApi {
).data;
}
/**
* Get the current state of a single device
*/
static async GetSingleState(id: string): Promise<DeviceState> {
return (
await APIClient.exec({
uri: `/device/${encodeURIComponent(id)}/state`,
method: "GET",
})
).data;
}
/**
* Update a device general information
*/