Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@switchbot/homebridge-switchbot

Package Overview
Dependencies
Maintainers
0
Versions
924
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@switchbot/homebridge-switchbot - npm Package Compare versions

Comparing version 3.7.1-beta.22 to 3.7.1-beta.23

24

dist/device/waterdetector.js

@@ -113,3 +113,3 @@ /*

// LeakSensor
if (this.device.waterdetector?.hide_leak && this.LeakSensor?.Service) {
if (!this.device.waterdetector?.hide_leak && this.LeakSensor?.Service) {
// StatusActive

@@ -119,3 +119,3 @@ this.LeakSensor.StatusActive = this.serviceData.state;

// LeakDetected
if (this.device.waterdetector.dry) {
if (this.device.waterdetector?.dry) {
this.LeakSensor.LeakDetected = this.serviceData.status === 0 ? 1 : 0;

@@ -147,4 +147,10 @@ this.debugLog(`LeakDetected: ${this.LeakSensor.LeakDetected}`);

// LeakDetected
this.LeakSensor.LeakDetected = this.deviceStatus.status;
this.debugLog(`LeakDetected: ${this.LeakSensor.LeakDetected}`);
if (this.device.waterdetector?.dry) {
this.LeakSensor.LeakDetected = this.deviceStatus.status === 0 ? 1 : 0;
this.debugLog(`LeakDetected: ${this.LeakSensor.LeakDetected}`);
}
else {
this.LeakSensor.LeakDetected = this.deviceStatus.status;
this.debugLog(`LeakDetected: ${this.LeakSensor.LeakDetected}`);
}
}

@@ -183,4 +189,10 @@ // BatteryLevel

// LeakDetected
this.LeakSensor.LeakDetected = this.webhookContext.detectionState;
await this.debugLog(`LeakDetected: ${this.LeakSensor.LeakDetected}`);
if (this.device.waterdetector?.dry) {
this.LeakSensor.LeakDetected = this.webhookContext.detectionState === 0 ? 1 : 0;
this.debugLog(`LeakDetected: ${this.LeakSensor.LeakDetected}`);
}
else {
this.LeakSensor.LeakDetected = this.webhookContext.detectionState;
await this.debugLog(`LeakDetected: ${this.LeakSensor.LeakDetected}`);
}
}

@@ -187,0 +199,0 @@ // BatteryLevel

@@ -5,3 +5,3 @@ {

"type": "module",
"version": "3.7.1-beta.22",
"version": "3.7.1-beta.23",
"description": "The SwitchBot plugin allows you to access your SwitchBot device(s) from HomeKit.",

@@ -8,0 +8,0 @@ "author": "SwitchBot <support@wondertechlabs.com> (https://github.com/SwitchBot)",

@@ -154,3 +154,3 @@ /* Copyright(C) 2021-2024, donavanbecker (https://github.com/donavanbecker). All rights reserved.

// LeakSensor
if (this.device.waterdetector?.hide_leak && this.LeakSensor?.Service) {
if (!this.device.waterdetector?.hide_leak && this.LeakSensor?.Service) {
// StatusActive

@@ -161,3 +161,3 @@ this.LeakSensor.StatusActive = this.serviceData.state

// LeakDetected
if (this.device.waterdetector.dry) {
if (this.device.waterdetector?.dry) {
this.LeakSensor.LeakDetected = this.serviceData.status === 0 ? 1 : 0

@@ -191,4 +191,9 @@ this.debugLog(`LeakDetected: ${this.LeakSensor.LeakDetected}`)

// LeakDetected
this.LeakSensor.LeakDetected = this.deviceStatus.status
this.debugLog(`LeakDetected: ${this.LeakSensor.LeakDetected}`)
if (this.device.waterdetector?.dry) {
this.LeakSensor.LeakDetected = this.deviceStatus.status === 0 ? 1 : 0
this.debugLog(`LeakDetected: ${this.LeakSensor.LeakDetected}`)
} else {
this.LeakSensor.LeakDetected = this.deviceStatus.status
this.debugLog(`LeakDetected: ${this.LeakSensor.LeakDetected}`)
}
}

@@ -233,4 +238,9 @@

// LeakDetected
this.LeakSensor.LeakDetected = this.webhookContext.detectionState
await this.debugLog(`LeakDetected: ${this.LeakSensor.LeakDetected}`)
if (this.device.waterdetector?.dry) {
this.LeakSensor.LeakDetected = this.webhookContext.detectionState === 0 ? 1 : 0
this.debugLog(`LeakDetected: ${this.LeakSensor.LeakDetected}`)
} else {
this.LeakSensor.LeakDetected = this.webhookContext.detectionState
await this.debugLog(`LeakDetected: ${this.LeakSensor.LeakDetected}`)
}
}

@@ -237,0 +247,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc