@switchbot/homebridge-switchbot 3.5.1-beta.2 → 3.5.1-beta.4
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/dist/device/blindtilt.d.ts +15 -6
- package/dist/device/blindtilt.d.ts.map +1 -1
- package/dist/device/blindtilt.js +203 -255
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/bot.d.ts +9 -4
- package/dist/device/bot.d.ts.map +1 -1
- package/dist/device/bot.js +196 -218
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.d.ts +9 -4
- package/dist/device/ceilinglight.d.ts.map +1 -1
- package/dist/device/ceilinglight.js +202 -247
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.d.ts +10 -5
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +329 -378
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.d.ts +9 -4
- package/dist/device/contact.d.ts.map +1 -1
- package/dist/device/contact.js +99 -142
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts +19 -7
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +203 -264
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/device.d.ts +28 -32
- package/dist/device/device.d.ts.map +1 -1
- package/dist/device/device.js +186 -225
- package/dist/device/device.js.map +1 -1
- package/dist/device/fan.d.ts +9 -4
- package/dist/device/fan.d.ts.map +1 -1
- package/dist/device/fan.js +198 -227
- package/dist/device/fan.js.map +1 -1
- package/dist/device/hub.d.ts +9 -5
- package/dist/device/hub.d.ts.map +1 -1
- package/dist/device/hub.js +106 -231
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.d.ts +12 -4
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +192 -232
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.d.ts +9 -4
- package/dist/device/iosensor.d.ts.map +1 -1
- package/dist/device/iosensor.js +91 -157
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.d.ts +10 -5
- package/dist/device/lightstrip.d.ts.map +1 -1
- package/dist/device/lightstrip.js +287 -367
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.d.ts +10 -5
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +171 -216
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.d.ts +9 -4
- package/dist/device/meter.d.ts.map +1 -1
- package/dist/device/meter.js +93 -158
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.d.ts +9 -4
- package/dist/device/meterplus.d.ts.map +1 -1
- package/dist/device/meterplus.js +94 -155
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.d.ts +9 -4
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +84 -142
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.d.ts +9 -4
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +99 -124
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.d.ts +9 -6
- package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
- package/dist/device/robotvacuumcleaner.js +170 -253
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/device/waterdetector.d.ts +12 -4
- package/dist/device/waterdetector.d.ts.map +1 -1
- package/dist/device/waterdetector.js +102 -128
- package/dist/device/waterdetector.js.map +1 -1
- package/dist/irdevice/airconditioner.d.ts +2 -1
- package/dist/irdevice/airconditioner.d.ts.map +1 -1
- package/dist/irdevice/airconditioner.js.map +1 -1
- package/dist/irdevice/airpurifier.d.ts +2 -1
- package/dist/irdevice/airpurifier.d.ts.map +1 -1
- package/dist/irdevice/airpurifier.js.map +1 -1
- package/dist/irdevice/camera.d.ts +2 -1
- package/dist/irdevice/camera.d.ts.map +1 -1
- package/dist/irdevice/camera.js.map +1 -1
- package/dist/irdevice/fan.d.ts +2 -1
- package/dist/irdevice/fan.d.ts.map +1 -1
- package/dist/irdevice/fan.js.map +1 -1
- package/dist/irdevice/irdevice.d.ts +2 -1
- package/dist/irdevice/irdevice.d.ts.map +1 -1
- package/dist/irdevice/irdevice.js +1 -1
- package/dist/irdevice/irdevice.js.map +1 -1
- package/dist/irdevice/light.d.ts +2 -1
- package/dist/irdevice/light.d.ts.map +1 -1
- package/dist/irdevice/light.js.map +1 -1
- package/dist/irdevice/other.d.ts +2 -1
- package/dist/irdevice/other.d.ts.map +1 -1
- package/dist/irdevice/other.js.map +1 -1
- package/dist/irdevice/tv.d.ts +2 -1
- package/dist/irdevice/tv.d.ts.map +1 -1
- package/dist/irdevice/tv.js.map +1 -1
- package/dist/irdevice/vacuumcleaner.d.ts +2 -1
- package/dist/irdevice/vacuumcleaner.d.ts.map +1 -1
- package/dist/irdevice/vacuumcleaner.js.map +1 -1
- package/dist/irdevice/waterheater.d.ts +2 -1
- package/dist/irdevice/waterheater.d.ts.map +1 -1
- package/dist/irdevice/waterheater.js.map +1 -1
- package/dist/platform.d.ts +5 -7
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +51 -34
- package/dist/platform.js.map +1 -1
- package/dist/settings.d.ts +49 -191
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +19 -0
- package/dist/settings.js.map +1 -1
- package/dist/types/bledevicestatus.d.ts +279 -0
- package/dist/types/bledevicestatus.d.ts.map +1 -0
- package/dist/types/bledevicestatus.js +2 -0
- package/dist/types/bledevicestatus.js.map +1 -0
- package/dist/types/devicelist.d.ts +89 -0
- package/dist/types/devicelist.d.ts.map +1 -0
- package/dist/types/devicelist.js +6 -0
- package/dist/types/devicelist.js.map +1 -0
- package/dist/types/deviceresponse.d.ts +13 -0
- package/dist/types/deviceresponse.d.ts.map +1 -0
- package/dist/types/deviceresponse.js +2 -0
- package/dist/types/deviceresponse.js.map +1 -0
- package/dist/types/devicestatus.d.ts +149 -0
- package/dist/types/devicestatus.d.ts.map +1 -0
- package/dist/types/devicestatus.js +3 -0
- package/dist/types/devicestatus.js.map +1 -0
- package/dist/types/devicewebhookstatus.d.ts +156 -0
- package/dist/types/devicewebhookstatus.d.ts.map +1 -0
- package/dist/types/devicewebhookstatus.js +2 -0
- package/dist/types/devicewebhookstatus.js.map +1 -0
- package/dist/types/irdevicelist.d.ts +10 -0
- package/dist/types/irdevicelist.d.ts.map +1 -0
- package/dist/types/irdevicelist.js +2 -0
- package/dist/types/irdevicelist.js.map +1 -0
- package/dist/types/pushbody.d.ts +6 -0
- package/dist/types/pushbody.d.ts.map +1 -0
- package/dist/types/pushbody.js +2 -0
- package/dist/types/pushbody.js.map +1 -0
- package/dist/utils.d.ts +25 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +28 -0
- package/dist/utils.js.map +1 -1
- package/package.json +10 -10
- package/src/device/blindtilt.ts +224 -264
- package/src/device/bot.ts +208 -221
- package/src/device/ceilinglight.ts +210 -257
- package/src/device/colorbulb.ts +334 -397
- package/src/device/contact.ts +111 -146
- package/src/device/curtain.ts +220 -283
- package/src/device/device.ts +194 -245
- package/src/device/fan.ts +214 -230
- package/src/device/hub.ts +126 -246
- package/src/device/humidifier.ts +216 -243
- package/src/device/iosensor.ts +114 -166
- package/src/device/lightstrip.ts +302 -377
- package/src/device/lock.ts +187 -221
- package/src/device/meter.ts +116 -177
- package/src/device/meterplus.ts +117 -174
- package/src/device/motion.ts +99 -144
- package/src/device/plug.ts +110 -128
- package/src/device/robotvacuumcleaner.ts +189 -252
- package/src/device/waterdetector.ts +120 -138
- package/src/irdevice/airconditioner.ts +2 -1
- package/src/irdevice/airpurifier.ts +2 -1
- package/src/irdevice/camera.ts +2 -1
- package/src/irdevice/fan.ts +2 -1
- package/src/irdevice/irdevice.ts +3 -2
- package/src/irdevice/light.ts +2 -1
- package/src/irdevice/other.ts +2 -1
- package/src/irdevice/tv.ts +2 -1
- package/src/irdevice/vacuumcleaner.ts +2 -1
- package/src/irdevice/waterheater.ts +2 -1
- package/src/platform.ts +52 -34
- package/src/settings.ts +30 -239
- package/src/types/bledevicestatus.ts +305 -0
- package/src/types/devicelist.ts +124 -0
- package/src/types/deviceresponse.ts +15 -0
- package/src/types/devicestatus.ts +178 -0
- package/src/types/devicewebhookstatus.ts +196 -0
- package/src/types/irdevicelist.ts +15 -0
- package/src/types/pushbody.ts +9 -0
- package/src/utils.ts +33 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/* Copyright(C) 2017-2024, donavanbecker (https://github.com/donavanbecker). All rights reserved.
|
|
2
|
+
*
|
|
3
|
+
* devicestatus.ts: @switchbot/homebridge-switchbot platform class.
|
|
4
|
+
*/
|
|
5
|
+
export { deviceWebhook };
|
|
6
|
+
|
|
7
|
+
type deviceWebhook = {
|
|
8
|
+
eventType: string,
|
|
9
|
+
eventVersion: string,
|
|
10
|
+
context: deviceWebhookContext
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
type deviceWebhookContext = {
|
|
14
|
+
//properties on all devices
|
|
15
|
+
deviceMac: string;
|
|
16
|
+
deviceType: string;
|
|
17
|
+
timeOfSample: number
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type botWebhookContext = deviceWebhookContext & {
|
|
21
|
+
power: string, //"on"or"off"
|
|
22
|
+
battery: number,
|
|
23
|
+
deviceMode: 'pressMode' | 'switchMode' | 'customizeMode',
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type curtainWebhookContext = deviceWebhookContext & {
|
|
27
|
+
calibrate: boolean,
|
|
28
|
+
group: boolean,
|
|
29
|
+
slidePosition: number, //0~100
|
|
30
|
+
battery: number,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type curtain3WebhookContext = deviceWebhookContext & {
|
|
34
|
+
calibrate: boolean,
|
|
35
|
+
group: boolean,
|
|
36
|
+
slidePosition: number, //0~100
|
|
37
|
+
battery: number,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type motionSensorWebhookContext = deviceWebhookContext & {
|
|
41
|
+
detectionState: 'NOT_DETECTED' | 'DETECTED',
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type contactSensorWebhookContext = deviceWebhookContext & {
|
|
45
|
+
detectionState: 'NOT_DETECTED' | 'DETECTED',
|
|
46
|
+
doorMode: 'IN_DOOR' | 'OUT_DOOR',
|
|
47
|
+
brightness: 'dim' | 'bright',
|
|
48
|
+
openState: 'open' | 'close' | 'timeOutNotClose',
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export type waterLeakDetectorWebhookContext = deviceWebhookContext & {
|
|
52
|
+
detectionState: 0 | 1,
|
|
53
|
+
battery: number, //0~100
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export type meterWebhookContext = deviceWebhookContext & {
|
|
57
|
+
temperature: number,
|
|
58
|
+
scale: 'CELSIUS' | 'FAHRENHEIT',
|
|
59
|
+
humidity: number,
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export type meterPlusWebhookContext = deviceWebhookContext & {
|
|
63
|
+
temperature: number,
|
|
64
|
+
scale: 'CELSIUS' | 'FAHRENHEIT',
|
|
65
|
+
humidity: number,
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export type outdoorMeterWebhookContext = deviceWebhookContext & {
|
|
69
|
+
temperature: number,
|
|
70
|
+
scale: 'CELSIUS' | 'FAHRENHEIT',
|
|
71
|
+
humidity: number,
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export type lockWebhookContext = deviceWebhookContext & {
|
|
75
|
+
lockState: 'UNLOCKED' | 'LOCKED' | 'JAMMED',
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export type lockProWebhookContext = deviceWebhookContext & {
|
|
79
|
+
lockState: 'UNLOCKED' | 'LOCKED' | 'JAMMED',
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export type indoorCameraWebhookContext = deviceWebhookContext & {
|
|
83
|
+
detectionState: 'DETECTED',
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export type panTiltCamWebhookContext = deviceWebhookContext & {
|
|
87
|
+
detectionState: 'DETECTED',
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export type colorBulbWebhookContext = deviceWebhookContext & {
|
|
91
|
+
powerState: 'ON' | 'OFF',
|
|
92
|
+
brightness: number,
|
|
93
|
+
color: string, //RGB 255:255:255
|
|
94
|
+
colorTemperature: number, // 2700~6500
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export type stripLightWebhookContext = deviceWebhookContext & {
|
|
98
|
+
powerState: 'ON' | 'OFF',
|
|
99
|
+
brightness: number,
|
|
100
|
+
color: string, //RGB 255:255:255
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export type plugWebhookContext = deviceWebhookContext & {
|
|
104
|
+
powerState: 'ON' | 'OFF',
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export type plugMiniUSWebhookContext = deviceWebhookContext & {
|
|
108
|
+
powerState: 'ON' | 'OFF',
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export type plugMiniJPWebhookContext = deviceWebhookContext & {
|
|
112
|
+
powerState: 'ON' | 'OFF',
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export type robotVacuumCleanerS1WebhookContext = deviceWebhookContext & {
|
|
116
|
+
workingStatus: 'Standby' | 'Clearing' | 'Paused' | 'GotoChargeBase' | 'Charging' | 'ChargeDone' | 'Dormant' | 'InTrouble'
|
|
117
|
+
| 'InRemoteControl' | 'InDustCollecting',
|
|
118
|
+
onlineStatus: 'online' | 'offline',
|
|
119
|
+
battery: number, //0~100
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export type robotVacuumCleanerS1PlusWebhookContext = deviceWebhookContext & {
|
|
123
|
+
workingStatus: 'Standby' | 'Clearing' | 'Paused' | 'GotoChargeBase' | 'Charging' | 'ChargeDone' | 'Dormant' | 'InTrouble'
|
|
124
|
+
| 'InRemoteControl' | 'InDustCollecting',
|
|
125
|
+
onlineStatus: 'online' | 'offline',
|
|
126
|
+
battery: number, //0~100
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export type floorCleaningRobotS10WebhookContext = deviceWebhookContext & {
|
|
130
|
+
workingStatus: 'Standby' | 'Clearing' | 'Paused' | 'GotoChargeBase' | 'Charging' | 'ChargeDone' | 'Dormant' | 'InTrouble'
|
|
131
|
+
| 'InRemoteControl' | 'InDustCollecting',
|
|
132
|
+
onlineStatus: 'online' | 'offline',
|
|
133
|
+
battery: number, //0~100
|
|
134
|
+
waterBaseBattery: number, //0~100
|
|
135
|
+
taskType: 'standBy' | 'explore' | 'cleanAll' | 'cleanArea' | 'cleanRoom' | 'fillWater' | 'deepWashing' | 'backToCharge' | 'markingWaterBase'
|
|
136
|
+
| 'drying' | 'collectDust' | 'remoteControl' | 'cleanWithExplorer' | 'fillWaterForHumi' | 'markingHumi',
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export type ceilingLightWebhookContext = deviceWebhookContext & {
|
|
140
|
+
powerState: 'ON' | 'OFF',
|
|
141
|
+
brightness: number,
|
|
142
|
+
colorTemperature: number, // 2700~6500
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export type ceilingLightProWebhookContext = deviceWebhookContext & {
|
|
146
|
+
powerState: 'ON' | 'OFF',
|
|
147
|
+
brightness: number,
|
|
148
|
+
colorTemperature: number, // 2700~6500
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export type keypadWebhookContext = deviceWebhookContext & {
|
|
152
|
+
eventName: 'createKey' | 'deleteKey',
|
|
153
|
+
commandId: string,
|
|
154
|
+
result: 'success' | 'failed' | 'timeout',
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export type keypadTouchWebhookContext = deviceWebhookContext & {
|
|
158
|
+
eventName: 'createKey' | 'deleteKey',
|
|
159
|
+
commandId: string,
|
|
160
|
+
result: 'success' | 'failed' | 'timeout',
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
export type hub2WebhookContext = deviceWebhookContext & {
|
|
164
|
+
temperature: number,
|
|
165
|
+
humidity: number,
|
|
166
|
+
lightLevel: number,
|
|
167
|
+
scale: 'CELSIUS' | 'FAHRENHEIT',
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
export type batteryCirculatorFanWebhookContext = deviceWebhookContext & {
|
|
171
|
+
mode: 'direct' | 'natural' | 'sleep' | 'baby',
|
|
172
|
+
version: string,
|
|
173
|
+
battery: number,
|
|
174
|
+
powerState: 'ON' | 'OFF',
|
|
175
|
+
nightStatus: 'off' | 1 | 2,
|
|
176
|
+
oscillation: 'on' | 'off',
|
|
177
|
+
verticalOscillation: 'on' | 'off',
|
|
178
|
+
chargingStatus: 'charging' | 'uncharged',
|
|
179
|
+
fanSpeed: number, //1~100
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
export type blindTiltWebhookContext = deviceWebhookContext & {
|
|
183
|
+
version: string,
|
|
184
|
+
calibrate: boolean,
|
|
185
|
+
group: boolean,
|
|
186
|
+
direction: string,
|
|
187
|
+
slidePosition: number, //0~100
|
|
188
|
+
battery: number,
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
export type humidifierWebhookContext = deviceWebhookContext & {
|
|
192
|
+
temperature: number,
|
|
193
|
+
humidity: number,
|
|
194
|
+
scale: 'CELSIUS' | 'FAHRENHEIT',
|
|
195
|
+
};
|
|
196
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* Copyright(C) 2017-2024, donavanbecker (https://github.com/donavanbecker). All rights reserved.
|
|
2
|
+
*
|
|
3
|
+
* irdevicelist.ts: @switchbot/homebridge-switchbot platform class.
|
|
4
|
+
*/
|
|
5
|
+
//a list of virtual infrared remote devices that are linked to SwitchBot Hubs.
|
|
6
|
+
export type infraredRemoteList = {
|
|
7
|
+
device: irdevice[];
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export type irdevice = {
|
|
11
|
+
deviceId?: string;
|
|
12
|
+
deviceName: string;
|
|
13
|
+
remoteType: string;
|
|
14
|
+
hubDeviceId: string;
|
|
15
|
+
};
|
package/src/utils.ts
CHANGED
|
@@ -85,6 +85,28 @@ export enum SwitchBotBLEModelName {
|
|
|
85
85
|
Unknown = 'Unknown',
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
export enum SwitchBotBLEModelFriendlyName {
|
|
89
|
+
Bot = 'Bot',
|
|
90
|
+
Hub2 = 'Hub 2',
|
|
91
|
+
ColorBulb = 'Color Bulb',
|
|
92
|
+
Curtain = 'Curtain',
|
|
93
|
+
Curtain3 = 'Curtain 3',
|
|
94
|
+
Humidifier = 'Humidifier',
|
|
95
|
+
Meter = 'Meter',
|
|
96
|
+
Lock = 'Lock',
|
|
97
|
+
LockPro = 'Lock Pro',
|
|
98
|
+
PlugMini = 'Plug Mini',
|
|
99
|
+
StripLight = 'Strip Light',
|
|
100
|
+
MeterPlus = 'Meter Plus',
|
|
101
|
+
OutdoorMeter = 'Outdoor Meter',
|
|
102
|
+
ContactSensor = 'Contact Sensor',
|
|
103
|
+
MotionSensor = 'Motion Sensor',
|
|
104
|
+
BlindTilt = 'Blind Tilt',
|
|
105
|
+
CeilingLight = 'Ceiling Light',
|
|
106
|
+
CeilingLightPro = 'Ceiling Light Pro',
|
|
107
|
+
Unknown = 'Unknown',
|
|
108
|
+
}
|
|
109
|
+
|
|
88
110
|
export enum BlindTiltMappingMode {
|
|
89
111
|
OnlyUp = 'only_up',
|
|
90
112
|
OnlyDown = 'only_down',
|
|
@@ -93,6 +115,17 @@ export enum BlindTiltMappingMode {
|
|
|
93
115
|
UseTiltForDirection = 'use_tilt_for_direction',
|
|
94
116
|
}
|
|
95
117
|
|
|
118
|
+
import type { devicesConfig } from './settings.js';
|
|
119
|
+
import type { blindTilt, curtain, curtain3, device } from './types/devicelist.js';
|
|
120
|
+
|
|
121
|
+
export function isCurtainDevice(device: device & devicesConfig): device is (curtain | curtain3) & devicesConfig {
|
|
122
|
+
return device.deviceType === 'Curtain' || device.deviceType === 'Curtain3';
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function isBlindTiltDevice(device: device & devicesConfig): device is blindTilt & devicesConfig {
|
|
126
|
+
return device.deviceType === 'Blind Tilt';
|
|
127
|
+
}
|
|
128
|
+
|
|
96
129
|
export function sleep(ms: number): Promise<void> {
|
|
97
130
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
98
131
|
}
|