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

@switchbot/homebridge-switchbot

Package Overview
Dependencies
Maintainers
2
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 0.1.2-beta.33 to 0.1.2-beta.34

6

dist/devices/contact.js

@@ -18,3 +18,3 @@ "use strict";

// default placeholders
this.ContactSensorState = this.platform.Characteristic.ContactSensorState.CONTACT_NOT_DETECTED;
this.ContactSensorState = this.platform.Characteristic.ContactSensorState.CONTACT_DETECTED;
// BLE Connection

@@ -85,7 +85,7 @@ if (this.platform.config.options?.ble?.includes(this.device.deviceId)) {

if (this.deviceStatus.body.openState === 'open') {
this.ContactSensorState = this.platform.Characteristic.ContactSensorState.CONTACT_DETECTED;
this.ContactSensorState = this.platform.Characteristic.ContactSensorState.CONTACT_NOT_DETECTED;
this.platform.log.info(`${this.accessory.displayName} ${this.deviceStatus.body.openState}`);
}
else if (this.deviceStatus.body.openState === 'close') {
this.ContactSensorState = this.platform.Characteristic.ContactSensorState.CONTACT_NOT_DETECTED;
this.ContactSensorState = this.platform.Characteristic.ContactSensorState.CONTACT_DETECTED;
this.platform.device(`${this.accessory.displayName} ${this.deviceStatus.body.openState}`);

@@ -92,0 +92,0 @@ }

{
"displayName": "Homebridge SwitchBot",
"name": "@switchbot/homebridge-switchbot",
"version": "0.1.2-beta.33",
"version": "0.1.2-beta.34",
"description": "The [Homebridge](https://homebridge.io) SwitchBot plugin allows you to access your [SwitchBot](https://www.switch-bot.com) device(s) from HomeKit.",

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

@@ -50,3 +50,3 @@ import { Service, PlatformAccessory, CharacteristicValue, MacAddress } from 'homebridge';

// default placeholders
this.ContactSensorState = this.platform.Characteristic.ContactSensorState.CONTACT_NOT_DETECTED;
this.ContactSensorState = this.platform.Characteristic.ContactSensorState.CONTACT_DETECTED;

@@ -129,6 +129,6 @@ // BLE Connection

if (this.deviceStatus.body.openState === 'open') {
this.ContactSensorState = this.platform.Characteristic.ContactSensorState.CONTACT_DETECTED;
this.ContactSensorState = this.platform.Characteristic.ContactSensorState.CONTACT_NOT_DETECTED;
this.platform.log.info(`${this.accessory.displayName} ${this.deviceStatus.body.openState}`);
} else if (this.deviceStatus.body.openState === 'close') {
this.ContactSensorState = this.platform.Characteristic.ContactSensorState.CONTACT_NOT_DETECTED;
this.ContactSensorState = this.platform.Characteristic.ContactSensorState.CONTACT_DETECTED;
this.platform.device(`${this.accessory.displayName} ${this.deviceStatus.body.openState}`);

@@ -135,0 +135,0 @@ } else {

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