Skip to content

Commit

Permalink
v1.6.3
Browse files Browse the repository at this point in the history
## [Version 1.6.3](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v1.6.3) (2022-01-03)

## What's Changed
* Quick Fix for for issue not tested in `v1.6.2`.

**Full Changelog**: v1.6.2...v1.6.3
  • Loading branch information
donavanbecker committed Jan 3, 2022
1 parent 9c249ce commit 1ef9c7b
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 21 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/)

## [Version 1.6.3](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v1.6.3) (2022-01-03)

## What's Changed
* Quick Fix for for issue not tested in `v1.6.2`.

**Full Changelog**: https://github.com/OpenWonderLabs/homebridge-switchbot/compare/v1.6.2...v1.6.3

## [Version 1.6.2](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v1.6.2) (2022-01-03)

## What's Changed
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "Homebridge SwitchBot",
"name": "@switchbot/homebridge-switchbot",
"version": "1.6.2",
"version": "1.6.3",
"description": "The [Homebridge](https://homebridge.io) SwitchBot plugin allows you to access your [SwitchBot](https://www.switch-bot.com) device(s) from HomeKit.",
"author": "SwitchBot <support@wondertechlabs.com> (https://github.com/SwitchBot)",
"license": "ISC",
Expand Down
6 changes: 2 additions & 4 deletions src/devices/bots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,7 @@ export class Bot {
// Convert to BLE Address
const switchbot = this.connectBLE();
// Start to monitor advertisement packets
this.debugLog(`Bot: ${this.accessory.displayName} platform.Switchbot: ${JSON.stringify(switchbot)}`);
if (switchbot) {
if (switchbot !== false) {
switchbot.startScan({
model: 'H',
id: this.device.bleMac,
Expand Down Expand Up @@ -447,8 +446,7 @@ export class Bot {
if (this.On !== this.OnCached) {
this.debugLog(`Bot: ${this.accessory.displayName} BLE pushChanges`);
const switchbot = this.connectBLE();
this.debugLog(`Bot: ${this.accessory.displayName} platform.Switchbot: ${JSON.stringify(switchbot)}`);
if (switchbot) {
if (switchbot !== false) {
if (this.botMode === 'press') {
this.debugLog(`Bot: ${this.accessory.displayName} Bot Mode: ${this.botMode}`);
switchbot.discover({ model: 'H', quick: true, id: this.device.bleMac })
Expand Down
3 changes: 1 addition & 2 deletions src/devices/contact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,7 @@ export class Contact {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const switchbot = this.connectBLE();
// Start to monitor advertisement packets
this.debugLog(`Contact Sensor: ${this.accessory.displayName} platform.Switchbot: ${JSON.stringify(switchbot)}`);
if (switchbot) {
if (switchbot !== false) {
switchbot.startScan({
model: 'd',
id: this.device.bleMac,
Expand Down
6 changes: 2 additions & 4 deletions src/devices/curtains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,7 @@ export class Curtain {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const switchbot = this.connectBLE();
// Start to monitor advertisement packets
this.debugLog(`Curtain: ${this.accessory.displayName} platform.Switchbot: ${JSON.stringify(switchbot)}`);
if (switchbot) {
if (switchbot !== false) {
switchbot.startScan({
model: 'c',
id: this.device.bleMac,
Expand Down Expand Up @@ -564,8 +563,7 @@ export class Curtain {
if (this.TargetPosition !== this.CurrentPosition) {
this.debugLog(`Curtain: ${this.accessory.displayName} BLE pushChanges`);
const switchbot = this.connectBLE();
this.debugLog(`Curtain: ${this.accessory.displayName} platform.Switchbot: ${JSON.stringify(switchbot)}`);
if (switchbot) {
if (switchbot !== false) {
switchbot.discover({ model: 'c', quick: true, id: this.device.bleMac }).then((device_list) => {
this.infoLog(`${this.accessory.displayName} Target Position: ${this.TargetPosition}`);
return device_list[0].runToPos(100 - Number(this.TargetPosition));
Expand Down
6 changes: 2 additions & 4 deletions src/devices/humidifiers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,7 @@ export class Humidifier {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const switchbot = this.connectBLE();
// Start to monitor advertisement packets
this.debugLog(`Humidifier: ${this.accessory.displayName} platform.Switchbot: ${JSON.stringify(switchbot)}`);
if (switchbot) {
if (switchbot !== false) {
switchbot.startScan({
model: 'e',
id: this.device.bleMac,
Expand Down Expand Up @@ -463,8 +462,7 @@ export class Humidifier {
private async BLEpushChanges() {
this.debugLog(`Humidifier: ${this.accessory.displayName} BLE pushChanges`);
const switchbot = this.connectBLE();
this.debugLog(`Humidifier: ${this.accessory.displayName} platform.Switchbot: ${JSON.stringify(switchbot)}`);
if (switchbot) {
if (switchbot !== false) {
switchbot.discover({ model: 'e', quick: true, id: this.device.bleMac }).then((device_list) => {
this.infoLog(`${this.accessory.displayName} Target Position: ${this.Active}`);
return device_list[0].percentage(this.RelativeHumidityHumidifierThreshold);
Expand Down
3 changes: 1 addition & 2 deletions src/devices/meters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,7 @@ export class Meter {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const switchbot = this.connectBLE();
// Start to monitor advertisement packets
this.debugLog(`Meter: ${this.accessory.displayName} platform.Switchbot: ${JSON.stringify(switchbot)}`);
if (switchbot) {
if (switchbot !== false) {
switchbot.startScan({
model: 'T',
id: this.device.bleMac,
Expand Down
3 changes: 1 addition & 2 deletions src/devices/motion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ export class Motion {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const switchbot = this.connectBLE();
// Start to monitor advertisement packets
this.debugLog(`Motion Sensor: ${this.accessory.displayName} platform.Switchbot: ${JSON.stringify(switchbot)}`);
if (switchbot) {
if (switchbot !== false) {
switchbot.startScan({
model: 's',
id: this.device.bleMac,
Expand Down

0 comments on commit 1ef9c7b

Please sign in to comment.