Skip to content

Commit

Permalink
Update waterdetector.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
donavanbecker committed Jan 10, 2025
1 parent dab5920 commit 52e300f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/device/waterdetector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class WaterDetector extends deviceBase {
this.LeakSensor.LeakDetected = (this.device as waterDetectorConfig).dry
? !this.serviceData.leak ? this.hap.Characteristic.LeakDetected.LEAK_DETECTED : this.hap.Characteristic.LeakDetected.LEAK_NOT_DETECTED
: this.serviceData.leak ? this.hap.Characteristic.LeakDetected.LEAK_DETECTED : this.hap.Characteristic.LeakDetected.LEAK_NOT_DETECTED
this.debugLog(`LeakDetected: ${this.LeakSensor.LeakDetected}`)
this.LeakSensor.LeakDetected === this.hap.Characteristic.LeakDetected.LEAK_DETECTED ? this.warnLog(`LeakDetected: ${this.LeakSensor.LeakDetected}, dry: ${(this.device as waterDetectorConfig).dry}, BLE`) : this.debugLog(`LeakDetected: ${this.LeakSensor.LeakDetected}, dry: ${(this.device as waterDetectorConfig).dry}, BLE`)
}
// Battery Info
if ('battery' in this.serviceData) {
Expand Down Expand Up @@ -185,7 +185,7 @@ export class WaterDetector extends deviceBase {
this.LeakSensor.LeakDetected = (this.device as waterDetectorConfig).dry
? this.deviceStatus.status === 0 ? this.hap.Characteristic.LeakDetected.LEAK_DETECTED : this.hap.Characteristic.LeakDetected.LEAK_NOT_DETECTED
: this.deviceStatus.status === 1 ? this.hap.Characteristic.LeakDetected.LEAK_DETECTED : this.hap.Characteristic.LeakDetected.LEAK_NOT_DETECTED
this.debugLog(`LeakDetected: ${this.LeakSensor.LeakDetected}`)
this.LeakSensor.LeakDetected === this.hap.Characteristic.LeakDetected.LEAK_DETECTED ? this.warnLog(`LeakDetected: ${this.LeakSensor.LeakDetected}, dry: ${(this.device as waterDetectorConfig).dry}, OpenAPI`) : this.debugLog(`LeakDetected: ${this.LeakSensor.LeakDetected}, dry: ${(this.device as waterDetectorConfig).dry}, OpenAPI`)
}

// BatteryLevel
Expand Down Expand Up @@ -228,7 +228,7 @@ export class WaterDetector extends deviceBase {
this.LeakSensor.LeakDetected = (this.device as waterDetectorConfig).dry
? this.webhookContext.detectionState === 0 ? this.hap.Characteristic.LeakDetected.LEAK_DETECTED : this.hap.Characteristic.LeakDetected.LEAK_NOT_DETECTED
: this.webhookContext.detectionState === 1 ? this.hap.Characteristic.LeakDetected.LEAK_DETECTED : this.hap.Characteristic.LeakDetected.LEAK_NOT_DETECTED
this.debugLog(`LeakDetected: ${this.LeakSensor.LeakDetected}`)
this.LeakSensor.LeakDetected === this.hap.Characteristic.LeakDetected.LEAK_DETECTED ? this.warnLog(`LeakDetected: ${this.LeakSensor.LeakDetected}, dry: ${(this.device as waterDetectorConfig).dry}, Webhook`) : this.debugLog(`LeakDetected: ${this.LeakSensor.LeakDetected}, dry: ${(this.device as waterDetectorConfig).dry}, Webhook`)
}

// BatteryLevel
Expand Down

0 comments on commit 52e300f

Please sign in to comment.