Skip to content

Commit

Permalink
Update leaksensors.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
donavanbecker committed Feb 5, 2024
1 parent adcac6d commit 8ca15de
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/devices/leaksensors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export class LeakSensor {
*/
async refreshStatus(): Promise<void> {
try {
const { body, statusCode, trailers, opaque, context } = await request(`${DeviceURL}/waterLeakDetectors/${this.device.deviceID}`, {
const { body, statusCode } = await request(`${DeviceURL}/waterLeakDetectors/${this.device.deviceID}`, {
method: 'GET',
query: {
'locationId': this.locationId,
Expand All @@ -235,11 +235,8 @@ export class LeakSensor {
'Content-Type': 'application/json',
},
});
const action = 'pushChanges';
const action = 'refreshStatus';
await this.statusCode(statusCode, action);
this.log.debug(`(pushChanges) trailers: ${JSON.stringify(trailers)}`);
this.log.debug(`(pushChanges) opaque: ${JSON.stringify(opaque)}`);
this.log.debug(`(pushChanges) context: ${JSON.stringify(context)}`);
const device: any = await body.json();
this.log.debug(`(refreshStatus) ${device.deviceClass}: ${JSON.stringify(device)}`);
this.device = device;
Expand Down

0 comments on commit 8ca15de

Please sign in to comment.