@switchbot/homebridge-switchbot 3.7.1-beta.2 → 3.7.1-beta.21
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/CHANGELOG.md +10 -0
- package/README.md +14 -0
- package/assets/security-privacy-bluetooth.png +0 -0
- package/config.schema.json +74 -2
- package/dist/device/blindtilt.d.ts +21 -9
- package/dist/device/blindtilt.d.ts.map +1 -1
- package/dist/device/blindtilt.js +167 -96
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/bot-old.d.ts +132 -0
- package/dist/device/bot-old.d.ts.map +1 -0
- package/dist/device/bot-old.js +1482 -0
- package/dist/device/bot-old.js.map +1 -0
- package/dist/device/bot.d.ts +10 -9
- package/dist/device/bot.d.ts.map +1 -1
- package/dist/device/bot.js +186 -187
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.d.ts +14 -13
- package/dist/device/ceilinglight.d.ts.map +1 -1
- package/dist/device/ceilinglight.js +87 -97
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.d.ts +13 -12
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +92 -105
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.d.ts +6 -5
- package/dist/device/contact.d.ts.map +1 -1
- package/dist/device/contact.js +71 -68
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts +17 -5
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +184 -118
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/device.d.ts +18 -18
- package/dist/device/device.d.ts.map +1 -1
- package/dist/device/device.js +33 -36
- package/dist/device/device.js.map +1 -1
- package/dist/device/fan.d.ts +9 -8
- package/dist/device/fan.d.ts.map +1 -1
- package/dist/device/fan.js +94 -101
- package/dist/device/fan.js.map +1 -1
- package/dist/device/hub.d.ts +6 -5
- package/dist/device/hub.d.ts.map +1 -1
- package/dist/device/hub.js +69 -65
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.d.ts +6 -5
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +89 -104
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.d.ts +6 -5
- package/dist/device/iosensor.d.ts.map +1 -1
- package/dist/device/iosensor.js +72 -66
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.d.ts +7 -6
- package/dist/device/lightstrip.d.ts.map +1 -1
- package/dist/device/lightstrip.js +85 -99
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.d.ts +10 -9
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +89 -79
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.d.ts +6 -5
- package/dist/device/meter.d.ts.map +1 -1
- package/dist/device/meter.js +72 -65
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.d.ts +6 -5
- package/dist/device/meterplus.d.ts.map +1 -1
- package/dist/device/meterplus.js +72 -64
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.d.ts +6 -5
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +65 -58
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.d.ts +13 -12
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +68 -52
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.d.ts +12 -11
- package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
- package/dist/device/robotvacuumcleaner.js +93 -82
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/device/waterdetector.d.ts +6 -5
- package/dist/device/waterdetector.d.ts.map +1 -1
- package/dist/device/waterdetector.js +73 -63
- package/dist/device/waterdetector.js.map +1 -1
- package/dist/homebridge-ui/server.js +2 -2
- package/dist/homebridge-ui/server.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +1 -1
- package/dist/irdevice/airconditioner.d.ts +8 -8
- package/dist/irdevice/airconditioner.d.ts.map +1 -1
- package/dist/irdevice/airconditioner.js +61 -105
- package/dist/irdevice/airconditioner.js.map +1 -1
- package/dist/irdevice/airpurifier.d.ts +10 -10
- package/dist/irdevice/airpurifier.d.ts.map +1 -1
- package/dist/irdevice/airpurifier.js +22 -42
- package/dist/irdevice/airpurifier.js.map +1 -1
- package/dist/irdevice/camera.d.ts +9 -9
- package/dist/irdevice/camera.d.ts.map +1 -1
- package/dist/irdevice/camera.js +15 -25
- package/dist/irdevice/camera.js.map +1 -1
- package/dist/irdevice/fan.d.ts +8 -8
- package/dist/irdevice/fan.d.ts.map +1 -1
- package/dist/irdevice/fan.js +21 -40
- package/dist/irdevice/fan.js.map +1 -1
- package/dist/irdevice/irdevice.d.ts +11 -11
- package/dist/irdevice/irdevice.d.ts.map +1 -1
- package/dist/irdevice/irdevice.js +14 -22
- package/dist/irdevice/irdevice.js.map +1 -1
- package/dist/irdevice/light.d.ts +9 -9
- package/dist/irdevice/light.d.ts.map +1 -1
- package/dist/irdevice/light.js +24 -47
- package/dist/irdevice/light.js.map +1 -1
- package/dist/irdevice/other.d.ts +9 -9
- package/dist/irdevice/other.d.ts.map +1 -1
- package/dist/irdevice/other.js +40 -83
- package/dist/irdevice/other.js.map +1 -1
- package/dist/irdevice/tv.d.ts +9 -9
- package/dist/irdevice/tv.d.ts.map +1 -1
- package/dist/irdevice/tv.js +29 -54
- package/dist/irdevice/tv.js.map +1 -1
- package/dist/irdevice/vacuumcleaner.d.ts +5 -5
- package/dist/irdevice/vacuumcleaner.d.ts.map +1 -1
- package/dist/irdevice/vacuumcleaner.js +11 -21
- package/dist/irdevice/vacuumcleaner.js.map +1 -1
- package/dist/irdevice/waterheater.d.ts +5 -5
- package/dist/irdevice/waterheater.d.ts.map +1 -1
- package/dist/irdevice/waterheater.js +11 -22
- package/dist/irdevice/waterheater.js.map +1 -1
- package/dist/platform.d.ts +24 -23
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +509 -723
- package/dist/platform.js.map +1 -1
- package/dist/settings.d.ts +5 -2
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js.map +1 -1
- package/dist/types/bledevicestatus.d.ts +9 -9
- package/dist/types/bledevicestatus.d.ts.map +1 -1
- package/dist/types/devicelist.d.ts +6 -6
- package/dist/types/devicelist.d.ts.map +1 -1
- package/dist/types/deviceresponse.d.ts +4 -4
- package/dist/types/deviceresponse.d.ts.map +1 -1
- package/dist/types/devicestatus.d.ts +2 -2
- package/dist/types/devicestatus.d.ts.map +1 -1
- package/dist/types/devicewebhookstatus.d.ts +5 -5
- package/dist/types/devicewebhookstatus.d.ts.map +1 -1
- package/dist/types/irdevicelist.d.ts +4 -4
- package/dist/types/irdevicelist.d.ts.map +1 -1
- package/dist/types/pushbody.d.ts +2 -2
- package/dist/types/pushbody.d.ts.map +1 -1
- package/dist/utils.d.ts +4 -4
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +9 -13
- package/dist/utils.js.map +1 -1
- package/eslint.config.js +48 -93
- package/package.json +64 -57
- package/src/device/blindtilt.ts +537 -456
- package/src/device/bot-old.ts +1540 -0
- package/src/device/bot.ts +732 -725
- package/src/device/ceilinglight.ts +359 -368
- package/src/device/colorbulb.ts +441 -453
- package/src/device/contact.ts +229 -226
- package/src/device/curtain.ts +526 -444
- package/src/device/device.ts +206 -208
- package/src/device/fan.ts +336 -345
- package/src/device/hub.ts +213 -214
- package/src/device/humidifier.ts +326 -347
- package/src/device/iosensor.ts +211 -209
- package/src/device/lightstrip.ts +391 -404
- package/src/device/lock.ts +292 -282
- package/src/device/meter.ts +212 -210
- package/src/device/meterplus.ts +212 -209
- package/src/device/motion.ts +198 -190
- package/src/device/plug.ts +203 -182
- package/src/device/robotvacuumcleaner.ts +280 -269
- package/src/device/waterdetector.ts +198 -189
- package/src/homebridge-ui/server.ts +16 -15
- package/src/index.ts +5 -6
- package/src/irdevice/airconditioner.ts +277 -326
- package/src/irdevice/airpurifier.ts +124 -143
- package/src/irdevice/camera.ts +58 -64
- package/src/irdevice/fan.ts +106 -123
- package/src/irdevice/irdevice.ts +116 -119
- package/src/irdevice/light.ts +119 -143
- package/src/irdevice/other.ts +417 -461
- package/src/irdevice/tv.ts +155 -177
- package/src/irdevice/vacuumcleaner.ts +54 -60
- package/src/irdevice/waterheater.ts +56 -63
- package/src/platform.ts +1491 -1681
- package/src/settings.ts +172 -169
- package/src/types/bledevicestatus.ts +252 -256
- package/src/types/devicelist.ts +79 -79
- package/src/types/deviceresponse.ts +12 -13
- package/src/types/devicestatus.ts +124 -124
- package/src/types/devicewebhookstatus.ts +126 -131
- package/src/types/irdevicelist.ts +10 -10
- package/src/types/pushbody.ts +5 -5
- package/src/utils.ts +64 -65
- package/tsconfig.json +10 -9
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/)
|
|
4
4
|
|
|
5
|
+
## [3.7.1](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v3.7.1) (2024-07-23)
|
|
6
|
+
|
|
7
|
+
### What's Changed
|
|
8
|
+
- Added specific macOS Bluetooth permission instructions to Readme [#1026](https://github.com/OpenWonderLabs/homebridge-switchbot/pull/1026), Thanks [@rSffsE](https://github.com/rSffsE)
|
|
9
|
+
- Fixed Platform BLE Scanning events not registering
|
|
10
|
+
- Fix `On` state for robot vacuum cleaners [#1028](https://github.com/OpenWonderLabs/homebridge-switchbot/pull/1028), Thanks [@JannThomas](https://github.com/JannThomas)
|
|
11
|
+
- Housekeeping and updated dependencies.
|
|
12
|
+
|
|
13
|
+
**Full Changelog**: https://github.com/OpenWonderLabs/homebridge-switchbot/compare/v3.7.0...v3.7.1
|
|
14
|
+
|
|
5
15
|
## [3.7.0](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v3.7.0) (2024-07-21)
|
|
6
16
|
|
|
7
17
|
### What's Changed
|
package/README.md
CHANGED
|
@@ -65,6 +65,20 @@
|
|
|
65
65
|
|
|
66
66
|
This lists all discovered Bluetooth devices. The BLE address of the SwitchBot device should be included in this list, otherwise your computer does not discover it.
|
|
67
67
|
|
|
68
|
+
- ### If using MacOS
|
|
69
|
+
1. Manually grant Bluetooth access in System Settings UI for `Security & Privacy -> Privacy` to the node executable, eg `/usr/local/bin/node`
|
|
70
|
+

|
|
71
|
+
(This is what is intended in documentation for the noble bluetooth package [prerequisites](https://github.com/abandonware/noble#prerequisites) by "Add terminal app", however for HomeBridge it is `node` that needs the permission granted, not `terminal`.
|
|
72
|
+
Without this step, then you will receive the following error when the swichbot plugin launches, which will cause Homebridge or the child bridge process to restart:
|
|
73
|
+
```
|
|
74
|
+
Error: Failed to initialize the Noble object: unauthorized
|
|
75
|
+
at Noble.<anonymous> (file:///usr/local/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/node-switchbot/src/switchbot.ts:244:19)
|
|
76
|
+
at Object.onceWrapper (node:events:629:26)
|
|
77
|
+
at Noble.emit (node:events:514:28)
|
|
78
|
+
at Noble.onStateChange (/usr/local/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@stoprocent/noble/lib/noble.js:92:8)
|
|
79
|
+
at NobleMac.emit (node:events:514:28)
|
|
80
|
+
```
|
|
81
|
+
|
|
68
82
|
## Supported SwitchBot Devices
|
|
69
83
|
|
|
70
84
|
- [SwitchBot Humidifier](https://www.switch-bot.com/products/switchbot-smart-humidifier)
|
|
Binary file
|
package/config.schema.json
CHANGED
|
@@ -221,6 +221,12 @@
|
|
|
221
221
|
"Robot Vacuum Cleaner S1 Plus"
|
|
222
222
|
]
|
|
223
223
|
},
|
|
224
|
+
{
|
|
225
|
+
"title": "Roller Shade",
|
|
226
|
+
"enum": [
|
|
227
|
+
"Roller Shade"
|
|
228
|
+
]
|
|
229
|
+
},
|
|
224
230
|
{
|
|
225
231
|
"title": "Smart Fan",
|
|
226
232
|
"enum": [
|
|
@@ -699,6 +705,13 @@
|
|
|
699
705
|
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && (model.options.devices[arrayIndices].configDeviceType === 'Curtain' || model.options.devices[arrayIndices].configDeviceType === 'Curtain3') && model.options.devices[arrayIndices].deviceId);"
|
|
700
706
|
}
|
|
701
707
|
},
|
|
708
|
+
"silentModeSwitch": {
|
|
709
|
+
"title": "Enable Curtain Silent Mode Switches",
|
|
710
|
+
"type": "boolean",
|
|
711
|
+
"condition": {
|
|
712
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && (model.options.devices[arrayIndices].configDeviceType === 'Curtain' || model.options.devices[arrayIndices].configDeviceType === 'Curtain3') && model.options.devices[arrayIndices].deviceId);"
|
|
713
|
+
}
|
|
714
|
+
},
|
|
702
715
|
"hide_lightsensor": {
|
|
703
716
|
"title": "Hide Light Sensor",
|
|
704
717
|
"type": "boolean",
|
|
@@ -810,6 +823,55 @@
|
|
|
810
823
|
"condition": {
|
|
811
824
|
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Blind Tilt' && model.options.devices[arrayIndices].deviceId);"
|
|
812
825
|
}
|
|
826
|
+
},
|
|
827
|
+
"setOpenMode": {
|
|
828
|
+
"title": "Blind Tilt's Opening Mode",
|
|
829
|
+
"type": "string",
|
|
830
|
+
"oneOf": [
|
|
831
|
+
{
|
|
832
|
+
"enum": [
|
|
833
|
+
"0"
|
|
834
|
+
],
|
|
835
|
+
"title": "Performance Mode"
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"enum": [
|
|
839
|
+
"1"
|
|
840
|
+
],
|
|
841
|
+
"title": "Silent Mode"
|
|
842
|
+
}
|
|
843
|
+
],
|
|
844
|
+
"condition": {
|
|
845
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Blind Tilt' && model.options.devices[arrayIndices].deviceId);"
|
|
846
|
+
}
|
|
847
|
+
},
|
|
848
|
+
"setCloseMode": {
|
|
849
|
+
"title": "Blind Tilt's Closing Mode",
|
|
850
|
+
"type": "string",
|
|
851
|
+
"oneOf": [
|
|
852
|
+
{
|
|
853
|
+
"enum": [
|
|
854
|
+
"0"
|
|
855
|
+
],
|
|
856
|
+
"title": "Performance Mode"
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
"enum": [
|
|
860
|
+
"1"
|
|
861
|
+
],
|
|
862
|
+
"title": "Silent Mode"
|
|
863
|
+
}
|
|
864
|
+
],
|
|
865
|
+
"condition": {
|
|
866
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Blind Tilt' && model.options.devices[arrayIndices].deviceId);"
|
|
867
|
+
}
|
|
868
|
+
},
|
|
869
|
+
"silentModeSwitch": {
|
|
870
|
+
"title": "Enable Blind Tilt Silent Mode Switches",
|
|
871
|
+
"type": "boolean",
|
|
872
|
+
"condition": {
|
|
873
|
+
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Blind Tilt' && model.options.devices[arrayIndices].deviceId);"
|
|
874
|
+
}
|
|
813
875
|
}
|
|
814
876
|
}
|
|
815
877
|
},
|
|
@@ -1737,6 +1799,11 @@
|
|
|
1737
1799
|
]
|
|
1738
1800
|
}
|
|
1739
1801
|
]
|
|
1802
|
+
},
|
|
1803
|
+
"allowInvalidCharacters": {
|
|
1804
|
+
"title": "Allow Invalid Characters",
|
|
1805
|
+
"type": "boolean",
|
|
1806
|
+
"description": "If true, invalid characters will be allowed in the device name."
|
|
1740
1807
|
}
|
|
1741
1808
|
},
|
|
1742
1809
|
"required": [
|
|
@@ -1802,6 +1869,7 @@
|
|
|
1802
1869
|
"options.devices[].curtain.set_max",
|
|
1803
1870
|
"options.devices[].curtain.setOpenMode",
|
|
1804
1871
|
"options.devices[].curtain.setCloseMode",
|
|
1872
|
+
"options.devices[].curtain.silentModeSwitch",
|
|
1805
1873
|
"options.devices[].curtain.updateRate",
|
|
1806
1874
|
"options.devices[].curtain.disable_group",
|
|
1807
1875
|
"options.devices[].curtain.hide_lightsensor",
|
|
@@ -1813,6 +1881,9 @@
|
|
|
1813
1881
|
"options.devices[].blindTilt.set_max",
|
|
1814
1882
|
"options.devices[].blindTilt.hide_lightsensor",
|
|
1815
1883
|
"options.devices[].blindTilt.updateRate",
|
|
1884
|
+
"options.devices[].blindTilt.setOpenMode",
|
|
1885
|
+
"options.devices[].blindTilt.setCloseMode",
|
|
1886
|
+
"options.devices[].blindTilt.silentModeSwitch",
|
|
1816
1887
|
"options.devices[].contact.hide_lightsensor",
|
|
1817
1888
|
"options.devices[].contact.set_minlux",
|
|
1818
1889
|
"options.devices[].contact.set_maxlux",
|
|
@@ -1929,8 +2000,9 @@
|
|
|
1929
2000
|
"key": "options.pushRate",
|
|
1930
2001
|
"description": "<em class='primary-text'>Specifies the interval, in seconds, between pushes to the SwitchBot API.</em>"
|
|
1931
2002
|
},
|
|
1932
|
-
"options.logging"
|
|
2003
|
+
"options.logging",
|
|
2004
|
+
"options.allowInvalidCharacters"
|
|
1933
2005
|
]
|
|
1934
2006
|
}
|
|
1935
2007
|
]
|
|
1936
|
-
}
|
|
2008
|
+
}
|
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BlindTiltMappingMode } from '../utils.js';
|
|
3
|
-
import { Subject } from 'rxjs';
|
|
4
|
-
import type { devicesConfig } from '../settings.js';
|
|
5
|
-
import type { device } from '../types/devicelist.js';
|
|
1
|
+
import type { CharacteristicValue, PlatformAccessory } from 'homebridge';
|
|
6
2
|
import type { SwitchBotPlatform } from '../platform.js';
|
|
3
|
+
import type { devicesConfig } from '../settings.js';
|
|
7
4
|
import type { blindTiltServiceData } from '../types/bledevicestatus.js';
|
|
5
|
+
import type { device } from '../types/devicelist.js';
|
|
8
6
|
import type { blindTiltStatus } from '../types/devicestatus.js';
|
|
9
7
|
import type { blindTiltWebhookContext } from '../types/devicewebhookstatus.js';
|
|
10
|
-
import
|
|
8
|
+
import { Subject } from 'rxjs';
|
|
9
|
+
import { BlindTiltMappingMode } from '../utils.js';
|
|
10
|
+
import { deviceBase } from './device.js';
|
|
11
11
|
export declare class BlindTilt extends deviceBase {
|
|
12
12
|
readonly platform: SwitchBotPlatform;
|
|
13
13
|
private WindowCovering;
|
|
14
14
|
private Battery;
|
|
15
15
|
private LightSensor?;
|
|
16
|
+
private OpenModeSwitch?;
|
|
17
|
+
private CloseModeSwitch?;
|
|
16
18
|
deviceStatus: blindTiltStatus;
|
|
17
19
|
mappingMode: BlindTiltMappingMode;
|
|
18
20
|
webhookContext: blindTiltWebhookContext;
|
|
19
21
|
serviceData: blindTiltServiceData;
|
|
20
22
|
setNewTarget: boolean;
|
|
21
23
|
setNewTargetTimer: NodeJS.Timeout;
|
|
22
|
-
|
|
24
|
+
blindTiltMoving: boolean;
|
|
25
|
+
blindTiltUpdateInProgress: boolean;
|
|
23
26
|
doBlindTiltUpdate: Subject<void>;
|
|
24
27
|
constructor(platform: SwitchBotPlatform, accessory: PlatformAccessory, device: device & devicesConfig);
|
|
25
28
|
/**
|
|
@@ -36,6 +39,7 @@ export declare class BlindTilt extends deviceBase {
|
|
|
36
39
|
*/
|
|
37
40
|
refreshStatus(): Promise<void>;
|
|
38
41
|
BLERefreshStatus(): Promise<void>;
|
|
42
|
+
registerPlatformBLE(): Promise<void>;
|
|
39
43
|
openAPIRefreshStatus(): Promise<void>;
|
|
40
44
|
registerWebhook(): Promise<void>;
|
|
41
45
|
pushChanges(): Promise<void>;
|
|
@@ -50,6 +54,14 @@ export declare class BlindTilt extends deviceBase {
|
|
|
50
54
|
*/
|
|
51
55
|
TargetPositionSet(value: CharacteristicValue): Promise<void>;
|
|
52
56
|
startUpdatingBlindTiltIfNeeded(): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Handle requests to set the value of the "Target Position" characteristic
|
|
59
|
+
*/
|
|
60
|
+
OpenModeSwitchSet(value: CharacteristicValue): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Handle requests to set the value of the "Target Position" characteristic
|
|
63
|
+
*/
|
|
64
|
+
CloseModeSwitchSet(value: CharacteristicValue): Promise<void>;
|
|
53
65
|
updateHomeKitCharacteristics(): Promise<void>;
|
|
54
66
|
BLEPushConnection(): Promise<void>;
|
|
55
67
|
BLERefreshConnection(switchbot: any): Promise<void>;
|
|
@@ -65,7 +77,7 @@ export declare class BlindTilt extends deviceBase {
|
|
|
65
77
|
* Maps device values to homekit values
|
|
66
78
|
*
|
|
67
79
|
* @param devicePosition the position as reported by the devide
|
|
68
|
-
* @param
|
|
80
|
+
* @param deviceDirection the direction as reported by the device
|
|
69
81
|
* @returns [homekit position, homekit tiltAngle]
|
|
70
82
|
*/
|
|
71
83
|
mapDeviceValuesToHomekitValues(devicePosition: number, deviceDirection: string): [CharacteristicValue, CharacteristicValue?];
|
|
@@ -73,7 +85,7 @@ export declare class BlindTilt extends deviceBase {
|
|
|
73
85
|
* Maps homekit values to device values
|
|
74
86
|
*
|
|
75
87
|
* @param homekitPosition the position as reported by homekit
|
|
76
|
-
* @param homekitTiltAngle
|
|
88
|
+
* @param homekitTiltAngle the tilt angle as reported by homekit
|
|
77
89
|
* @returns [device position, device direction]
|
|
78
90
|
*/
|
|
79
91
|
mapHomekitValuesToDeviceValues(homekitPosition: number, homekitTiltAngle: number): [string, number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blindtilt.d.ts","sourceRoot":"","sources":["../../src/device/blindtilt.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"blindtilt.d.ts","sourceRoot":"","sources":["../../src/device/blindtilt.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAW,MAAM,YAAY,CAAA;AAEjF,OA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