Skip to content

Commit

Permalink
v3.2.0 (#926)
Browse files Browse the repository at this point in the history
## [3.2.0](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v3.2.0) (2024-02-06)

### What's Changed
- Upgrade to latest node-switchbot with is now a Typescript ES-Module.
- Housekeeping and updated dependencies.

**Full Changelog**: v3.1.3...v3.2.0
  • Loading branch information
donavanbecker authored Feb 7, 2024
1 parent 618ee8f commit 549c3ea
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

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

## [3.2.0](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v3.2.0) (2024-02-06)

### What's Changed
- Upgrade to latest node-switchbot with is now a Typescript ES-Module.
- Housekeeping and updated dependencies.

**Full Changelog**: https://github.com/OpenWonderLabs/homebridge-switchbot/compare/v3.1.3...v3.2.0

## [3.1.3](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v3.1.3) (2024-02-06)

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

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "SwitchBot",
"name": "@switchbot/homebridge-switchbot",
"version": "3.1.3",
"version": "3.2.0",
"description": "The SwitchBot plugin allows you to access your SwitchBot device(s) from HomeKit.",
"author": {
"name": "SwitchBot",
Expand Down Expand Up @@ -84,7 +84,7 @@
"undici": "^6.6.2"
},
"optionalDependencies": {
"node-switchbot": "^1.10.0"
"node-switchbot": "^2.0.1"
},
"devDependencies": {
"@types/node": "^20.11.16",
Expand Down
2 changes: 2 additions & 0 deletions src/custom.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare module 'homebridge-lib'
declare module 'fakegato-history'
2 changes: 1 addition & 1 deletion src/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import asyncmqtt from 'async-mqtt';
import crypto, { randomUUID } from 'crypto';
import { readFileSync, writeFileSync } from 'fs';
import hbLib from 'homebridge-lib';
/*import { SwitchBot } from '/Users/Shared/GitHub/OpenWonderLabs/node-switchbot/dist/switchbot.js';*/



Expand Down Expand Up @@ -2528,6 +2527,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
try {
noble = (await import('@abandonware/noble')).default;
SwitchBot = (await import('node-switchbot')).default;
//SwitchBot = (await import('/Users/Shared/GitHub/OpenWonderLabs/node-switchbot/dist/switchbot.js')).default;
queueScheduler.schedule(() => (switchbot = new SwitchBot({ 'noble': noble })));
} catch (e: any) {
switchbot = false;
Expand Down

0 comments on commit 549c3ea

Please sign in to comment.