@switchbot/homebridge-switchbot-ble
Advanced tools
Comparing version 1.2.0 to 1.2.1
"use strict"; | ||
const bot_accessory_1 = require("./bot-accessory"); | ||
const curtain_accessory_1 = require("./curtain-accessory"); | ||
const meter_accessory_1 = require("./meter-accessory"); | ||
const PLATFORM_NAME = "SwitchBotPlatform"; | ||
@@ -57,2 +58,9 @@ /* | ||
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: | ||
@@ -59,0 +67,0 @@ break; |
{ | ||
"name": "@switchbot/homebridge-switchbot-ble", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Homebridge integration for SwitchBot BLE series products", | ||
@@ -36,3 +36,3 @@ "license": "ISC", | ||
"devDependencies": { | ||
"@types/node": "14.14.6", | ||
"@types/node": "14.14.7", | ||
"homebridge": "^1.1.6", | ||
@@ -39,0 +39,0 @@ "rimraf": "^3.0.2", |
@@ -66,2 +66,9 @@ <span align="center"> | ||
"reverseDir": false | ||
}, | ||
{ | ||
"type": "meter", | ||
"name": "Meter 84", | ||
"bleMac": "d0:d5:64:14:43:84", | ||
"scanDuration": 5000, | ||
"scanInterval": 60000 | ||
} | ||
@@ -75,3 +82,3 @@ ] | ||
* `devices` - SwitchBot devices list. | ||
* `type` - Device type. Currently only supports `bot` and `curtain`. | ||
* `type` - Device type. Currently supports `bot`, `curtain` and `meter`. | ||
* `name` - Device name. | ||
@@ -83,2 +90,3 @@ * `bleMac` - Device mac address. You can find it in App settings. | ||
* `reverseDir` - Set to `true` to exchange the "opened" and "closed" directions of Curtain after calibration. Default is `false`. So you can swap the directions without recalibration. | ||
* `scanInterval` - Scan interval. Currently indicates the cycle of updating the temperature and humidity value of Meter. Default is `60000`(unit: ms). | ||
@@ -92,5 +100,7 @@ Please note that: | ||
## Release Note | ||
* v1.2.1 (2020-11-12) | ||
* Get temperature and humidity from Meter advertising periodically. | ||
* v1.2.0 (2020-11-6) | ||
* Add option for inverted curtain position. (Thanks to [@whatUwant](https://github.com/SwitchBot/homebridge-switchbot-ble/pull/4)) | ||
* Fixed HomeKit control direction reversal issue. | ||
* Fixed HomeKit control direction reversal issue. (Thanks to [@roddenshaw](https://github.com/SwitchBot/homebridge-switchbot-ble/issues/5)) | ||
* v1.1.0 (2020-10-29) | ||
@@ -97,0 +107,0 @@ * Add support for Curtain. |
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
35699
11
376
112