@switchbot/homebridge-switchbot
Advanced tools
Comparing version 0.1.2-beta.33 to 0.1.2-beta.34
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1110788