@switchbot/homebridge-switchbot 3.8.3-beta.22 → 3.8.3-beta.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/platform.ts CHANGED
@@ -19,9 +19,9 @@ import { EveHomeKitTypes } from 'homebridge-lib/EveHomeKitTypes'
19
19
  * For Testing Locally:
20
20
  * import { SwitchBotModel } from '/Users/Shared/GitHub/OpenWonderLabs/node-switchbot/dist/index.js';
21
21
  */
22
- import type { blindTilt, curtain, curtain3, device, devices, irdevice } from 'node-switchbot'
22
+ import type { blindTilt, curtain, curtain3, device, irdevice } from 'node-switchbot'
23
23
 
24
- import { LogLevel, SwitchBot, SwitchBotModel, SwitchBotOpenAPI } from 'node-switchbot'
24
+ import { LogLevel, SwitchBotBLE, SwitchBotModel, SwitchBotOpenAPI } from 'node-switchbot'
25
25
  import { queueScheduler } from 'rxjs'
26
26
 
27
27
  import { BlindTilt } from './device/blindtilt.js'
@@ -249,7 +249,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
249
249
  async setupBlE() {
250
250
  if (this.config.options?.BLE) {
251
251
  await this.debugLog('setupBLE')
252
- const switchbot = new SwitchBot()
252
+ const switchbot = new SwitchBotBLE()
253
253
  if (switchbot === undefined) {
254
254
  await this.errorLog(`wasn't able to establish BLE Connection, node-switchbot: ${switchbot}`)
255
255
  } else {
@@ -2558,7 +2558,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
2558
2558
  // BLE Connection
2559
2559
  async connectBLE(accessory: PlatformAccessory, device: device & devicesConfig): Promise<any> {
2560
2560
  try {
2561
- const switchbot = new SwitchBot()
2561
+ const switchbot = new SwitchBotBLE()
2562
2562
  queueScheduler.schedule(async () => switchbot)
2563
2563
  await this.debugLog(`${device.deviceType}: ${accessory.displayName} 'node-switchbot' found: ${switchbot}`)
2564
2564
  return switchbot