@switchbot/homebridge-switchbot
Advanced tools
Comparing version 0.1.2-beta.31 to 0.1.2-beta.32
@@ -85,2 +85,4 @@ "use strict"; | ||
this.ContactSensorState = this.platform.Characteristic.ContactSensorState.CONTACT_DETECTED; | ||
this.service?.getCharacteristic(this.platform.Characteristic.ContactSensorState) | ||
.updateValue(this.platform.Characteristic.ContactSensorState.CONTACT_DETECTED); | ||
this.platform.log.info(`${this.accessory.displayName} ${this.deviceStatus.body.openState}`); | ||
@@ -90,6 +92,8 @@ } | ||
this.ContactSensorState = this.platform.Characteristic.ContactSensorState.CONTACT_NOT_DETECTED; | ||
this.service?.getCharacteristic(this.platform.Characteristic.ContactSensorState) | ||
.updateValue(this.platform.Characteristic.ContactSensorState.CONTACT_NOT_DETECTED); | ||
this.platform.device(`${this.accessory.displayName} ${this.deviceStatus.body.openState}`); | ||
} | ||
else { | ||
this.platform.device(`${this.accessory.displayName} ${this.deviceStatus.body.openState}`); | ||
this.platform.debug(`${this.accessory.displayName} ${this.deviceStatus.body.openState}`); | ||
} | ||
@@ -96,0 +100,0 @@ this.MotionDetected = Boolean(this.deviceStatus.body.moveDetected); |
{ | ||
"displayName": "Homebridge SwitchBot", | ||
"name": "@switchbot/homebridge-switchbot", | ||
"version": "0.1.2-beta.31", | ||
"version": "0.1.2-beta.32", | ||
"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)", |
@@ -129,8 +129,12 @@ import { Service, PlatformAccessory, CharacteristicValue, MacAddress } from 'homebridge'; | ||
this.ContactSensorState = this.platform.Characteristic.ContactSensorState.CONTACT_DETECTED; | ||
this.service?.getCharacteristic(this.platform.Characteristic.ContactSensorState) | ||
.updateValue(this.platform.Characteristic.ContactSensorState.CONTACT_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.service?.getCharacteristic(this.platform.Characteristic.ContactSensorState) | ||
.updateValue(this.platform.Characteristic.ContactSensorState.CONTACT_NOT_DETECTED); | ||
this.platform.device(`${this.accessory.displayName} ${this.deviceStatus.body.openState}`); | ||
} else { | ||
this.platform.device(`${this.accessory.displayName} ${this.deviceStatus.body.openState}`); | ||
this.platform.debug(`${this.accessory.displayName} ${this.deviceStatus.body.openState}`); | ||
} | ||
@@ -137,0 +141,0 @@ this.MotionDetected = Boolean(this.deviceStatus.body.moveDetected); |
Sorry, the diff of this file is not supported yet
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
1108681
13636