@switchbot/homebridge-switchbot-ble
Advanced tools
Comparing version 1.3.1-beta.1 to 1.3.1-beta.2
"use strict"; | ||
const bot_accessory_1 = require("./bot-accessory"); | ||
const contact_accessory_1 = require("./contact-accessory"); | ||
const motion_accessory_1 = require("./motion-accessory"); | ||
const curtain_accessory_1 = require("./curtain-accessory"); | ||
@@ -51,2 +53,6 @@ const meter_accessory_1 = require("./meter-accessory"); | ||
let scanDuration = device.scanDuration || 1000; | ||
let scanInterval = device.scanInterval || 60000; | ||
if (scanInterval < scanDuration) { | ||
scanInterval = scanDuration + 1000; | ||
} | ||
switch (device.type) { | ||
@@ -61,15 +67,11 @@ case "bot": | ||
break; | ||
case "meter": | ||
deviceList.push(new meter_accessory_1.Meter(hap, this.log, device.name, device.bleMac.toLowerCase(), scanDuration, scanInterval)); | ||
break; | ||
case "motion": | ||
deviceList.push(new bot_accessory_1.Bot(hap, this.log, device.name, device.bleMac.toLowerCase(), scanDuration)); | ||
deviceList.push(new motion_accessory_1.Motion(hap, this.log, device.name, device.bleMac.toLowerCase(), scanDuration, scanInterval)); | ||
break; | ||
case "contact": | ||
deviceList.push(new bot_accessory_1.Bot(hap, this.log, device.name, device.bleMac.toLowerCase(), scanDuration)); | ||
deviceList.push(new contact_accessory_1.Contact(hap, this.log, device.name, device.bleMac.toLowerCase(), scanDuration, scanInterval)); | ||
break; | ||
case "meter": | ||
let scanInterval = device.scanInterval || 60000; | ||
if (scanInterval < scanDuration) { | ||
scanInterval = scanDuration + 1000; | ||
} | ||
deviceList.push(new meter_accessory_1.Meter(hap, this.log, device.name, device.bleMac.toLowerCase(), scanDuration, scanInterval)); | ||
break; | ||
default: | ||
@@ -76,0 +78,0 @@ break; |
{ | ||
"name": "@switchbot/homebridge-switchbot-ble", | ||
"version": "1.3.1-beta.1", | ||
"version": "1.3.1-beta.2", | ||
"description": "Homebridge integration for SwitchBot BLE series products", | ||
@@ -5,0 +5,0 @@ "author": "SwitchBot <support@wondertechlabs.com> (https://github.com/SwitchBot)", |
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
103077
858