diff --git a/src/client.ts b/src/client.ts index 4bb1c9f5..de1771db 100644 --- a/src/client.ts +++ b/src/client.ts @@ -349,4 +349,25 @@ export class Client { }); return structure.fromJSON(response.data.data); } + + /** + * + * @param structure + * @param setPointC + * @returns + */ + public async setStructureSetPoint(structure: Structure, setPointC: number): Promise { + await this.updateClient(); + const response = await this.client.patch(`/api/structures/${structure.id}`, { + data: { + type: 'structures', + attributes: { + 'set-point-temperature-c': setPointC, + }, + relationships: {}, + }, + }); + structure.fromJSON(response.data.data); + return structure; + } }