Get state of relay on device page
This commit is contained in:
@ -75,4 +75,16 @@ export class RelayApi {
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the status of a single relay
|
||||
*/
|
||||
static async SingleStatus(relay: DeviceRelay): Promise<RelayStatus> {
|
||||
return (
|
||||
await APIClient.exec({
|
||||
method: "GET",
|
||||
uri: `/relay/${relay.id}/state`,
|
||||
})
|
||||
).data;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user