homey-api 3.0.0-rc.6 → 3.0.0-rc.8
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/assets/specifications/HomeyAPIV3Local.json +211 -19
- package/assets/types/homey-api.d.ts +203 -23
- package/assets/types/homey-api.private.d.ts +203 -23
- package/lib/HomeyAPI/HomeyAPIV2/ManagerDevices/Capability.js +2 -2
- package/lib/HomeyAPI/HomeyAPIV2/ManagerDevices/Device.js +2 -2
- package/lib/HomeyAPI/HomeyAPIV2/ManagerDrivers/Driver.js +2 -2
- package/lib/HomeyAPI/HomeyAPIV2/ManagerDrivers/PairSession.js +2 -2
- package/lib/HomeyAPI/HomeyAPIV2/ManagerFlow/AdvancedFlow.js +2 -2
- package/lib/HomeyAPI/HomeyAPIV2/ManagerFlow/Flow.js +3 -3
- package/lib/HomeyAPI/HomeyAPIV2/ManagerFlow/FlowCardAction.js +2 -2
- package/lib/HomeyAPI/HomeyAPIV2/ManagerFlow/FlowCardCondition.js +2 -2
- package/lib/HomeyAPI/HomeyAPIV2/ManagerFlow/FlowCardTrigger.js +2 -2
- package/lib/HomeyAPI/HomeyAPIV2/ManagerFlow.js +4 -4
- package/lib/HomeyAPI/HomeyAPIV2/ManagerFlowToken/FlowToken.js +3 -3
- package/lib/HomeyAPI/HomeyAPIV2/ManagerInsights/Log.js +2 -3
- package/lib/HomeyAPI/HomeyAPIV3/Item.js +5 -1
- package/lib/HomeyAPI/HomeyAPIV3/Manager.js +7 -7
- package/lib/HomeyAPI/HomeyAPIV3/ManagerDevices/Device.js +3 -1
- package/lib/HomeyAPI/HomeyAPIV3/ManagerFlow/FlowCard.js +8 -0
- package/lib/HomeyAPI/HomeyAPIV3/ManagerFlowToken/FlowToken.js +4 -1
- package/lib/HomeyAPI/HomeyAPIV3/ManagerInsights/Log.js +8 -0
- package/package.json +1 -1
|
@@ -1,5 +1,177 @@
|
|
|
1
1
|
{
|
|
2
2
|
"managers": {
|
|
3
|
+
"ManagerAlarms": {
|
|
4
|
+
"id": "alarms",
|
|
5
|
+
"idCamelCase": "alarms",
|
|
6
|
+
"items": {
|
|
7
|
+
"Alarm": {
|
|
8
|
+
"id": "alarm",
|
|
9
|
+
"schema": {
|
|
10
|
+
"repetition": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"required": [
|
|
14
|
+
"monday",
|
|
15
|
+
"tuesday",
|
|
16
|
+
"wednesday",
|
|
17
|
+
"thursday",
|
|
18
|
+
"friday",
|
|
19
|
+
"saturday",
|
|
20
|
+
"sunday"
|
|
21
|
+
],
|
|
22
|
+
"monday": {
|
|
23
|
+
"type": "boolean"
|
|
24
|
+
},
|
|
25
|
+
"tuesday": {
|
|
26
|
+
"type": "boolean"
|
|
27
|
+
},
|
|
28
|
+
"wednesday": {
|
|
29
|
+
"type": "boolean"
|
|
30
|
+
},
|
|
31
|
+
"thursday": {
|
|
32
|
+
"type": "boolean"
|
|
33
|
+
},
|
|
34
|
+
"friday": {
|
|
35
|
+
"type": "boolean"
|
|
36
|
+
},
|
|
37
|
+
"saturday": {
|
|
38
|
+
"type": "boolean"
|
|
39
|
+
},
|
|
40
|
+
"sunday": {
|
|
41
|
+
"type": "boolean"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"operations": {
|
|
49
|
+
"getAlarms": {
|
|
50
|
+
"method": "get",
|
|
51
|
+
"path": "/alarm",
|
|
52
|
+
"private": false,
|
|
53
|
+
"scopes": [
|
|
54
|
+
"homey.alarm.readonly"
|
|
55
|
+
],
|
|
56
|
+
"crud": {
|
|
57
|
+
"type": "getAll",
|
|
58
|
+
"item": "Alarm"
|
|
59
|
+
},
|
|
60
|
+
"parameters": {}
|
|
61
|
+
},
|
|
62
|
+
"getAlarm": {
|
|
63
|
+
"method": "get",
|
|
64
|
+
"path": "/alarm/:id",
|
|
65
|
+
"private": false,
|
|
66
|
+
"scopes": [
|
|
67
|
+
"homey.alarm.readonly"
|
|
68
|
+
],
|
|
69
|
+
"crud": {
|
|
70
|
+
"type": "getOne",
|
|
71
|
+
"item": "Alarm"
|
|
72
|
+
},
|
|
73
|
+
"parameters": {
|
|
74
|
+
"id": {
|
|
75
|
+
"in": "path",
|
|
76
|
+
"type": "string",
|
|
77
|
+
"required": true
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"createAlarm": {
|
|
82
|
+
"method": "post",
|
|
83
|
+
"path": "/alarm",
|
|
84
|
+
"private": false,
|
|
85
|
+
"scopes": [
|
|
86
|
+
"homey.alarm"
|
|
87
|
+
],
|
|
88
|
+
"crud": {
|
|
89
|
+
"type": "createOne",
|
|
90
|
+
"item": "Alarm"
|
|
91
|
+
},
|
|
92
|
+
"parameters": {
|
|
93
|
+
"alarm": {
|
|
94
|
+
"in": "body",
|
|
95
|
+
"type": "object",
|
|
96
|
+
"root": true,
|
|
97
|
+
"required": true,
|
|
98
|
+
"properties": {
|
|
99
|
+
"name": {
|
|
100
|
+
"type": "string"
|
|
101
|
+
},
|
|
102
|
+
"time": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
"enabled": {
|
|
106
|
+
"type": "boolean"
|
|
107
|
+
},
|
|
108
|
+
"repetition": {
|
|
109
|
+
"type": "object"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"updateAlarm": {
|
|
116
|
+
"method": "put",
|
|
117
|
+
"path": "/alarm/:id",
|
|
118
|
+
"private": false,
|
|
119
|
+
"scopes": [
|
|
120
|
+
"homey.alarm"
|
|
121
|
+
],
|
|
122
|
+
"crud": {
|
|
123
|
+
"type": "updateOne",
|
|
124
|
+
"item": "Alarm"
|
|
125
|
+
},
|
|
126
|
+
"parameters": {
|
|
127
|
+
"id": {
|
|
128
|
+
"in": "path",
|
|
129
|
+
"type": "string",
|
|
130
|
+
"required": true
|
|
131
|
+
},
|
|
132
|
+
"alarm": {
|
|
133
|
+
"in": "body",
|
|
134
|
+
"type": "object",
|
|
135
|
+
"root": true,
|
|
136
|
+
"required": true,
|
|
137
|
+
"properties": {
|
|
138
|
+
"name": {
|
|
139
|
+
"type": "string"
|
|
140
|
+
},
|
|
141
|
+
"time": {
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
"enabled": {
|
|
145
|
+
"type": "boolean"
|
|
146
|
+
},
|
|
147
|
+
"repetition": {
|
|
148
|
+
"type": "object"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"deleteAlarm": {
|
|
155
|
+
"method": "delete",
|
|
156
|
+
"path": "/alarm/:id",
|
|
157
|
+
"private": false,
|
|
158
|
+
"scopes": [
|
|
159
|
+
"homey.alarm"
|
|
160
|
+
],
|
|
161
|
+
"crud": {
|
|
162
|
+
"type": "deleteOne",
|
|
163
|
+
"item": "Alarm"
|
|
164
|
+
},
|
|
165
|
+
"parameters": {
|
|
166
|
+
"id": {
|
|
167
|
+
"in": "path",
|
|
168
|
+
"type": "string",
|
|
169
|
+
"required": true
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
3
175
|
"ManagerApi": {
|
|
4
176
|
"id": "api",
|
|
5
177
|
"idCamelCase": "api",
|
|
@@ -418,25 +590,6 @@
|
|
|
418
590
|
"homey.system.readonly"
|
|
419
591
|
],
|
|
420
592
|
"parameters": {}
|
|
421
|
-
},
|
|
422
|
-
"runCommand": {
|
|
423
|
-
"method": "post",
|
|
424
|
-
"path": "/command",
|
|
425
|
-
"private": false,
|
|
426
|
-
"scopes": [
|
|
427
|
-
"homey.system"
|
|
428
|
-
],
|
|
429
|
-
"parameters": {
|
|
430
|
-
"command": {
|
|
431
|
-
"in": "body",
|
|
432
|
-
"type": "string",
|
|
433
|
-
"required": true
|
|
434
|
-
},
|
|
435
|
-
"opts": {
|
|
436
|
-
"in": "body",
|
|
437
|
-
"type": "object"
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
593
|
}
|
|
441
594
|
}
|
|
442
595
|
},
|
|
@@ -3562,6 +3715,21 @@
|
|
|
3562
3715
|
"homey.system"
|
|
3563
3716
|
],
|
|
3564
3717
|
"parameters": {}
|
|
3718
|
+
},
|
|
3719
|
+
"setDebug": {
|
|
3720
|
+
"method": "put",
|
|
3721
|
+
"path": "/debug",
|
|
3722
|
+
"private": false,
|
|
3723
|
+
"scopes": [
|
|
3724
|
+
"homey.system"
|
|
3725
|
+
],
|
|
3726
|
+
"parameters": {
|
|
3727
|
+
"namespace": {
|
|
3728
|
+
"in": "body",
|
|
3729
|
+
"type": "string",
|
|
3730
|
+
"required": true
|
|
3731
|
+
}
|
|
3732
|
+
}
|
|
3565
3733
|
}
|
|
3566
3734
|
}
|
|
3567
3735
|
},
|
|
@@ -4401,6 +4569,30 @@
|
|
|
4401
4569
|
"homey.system"
|
|
4402
4570
|
],
|
|
4403
4571
|
"parameters": {}
|
|
4572
|
+
},
|
|
4573
|
+
"getLog": {
|
|
4574
|
+
"method": "get",
|
|
4575
|
+
"path": "/log",
|
|
4576
|
+
"private": false,
|
|
4577
|
+
"scopes": [
|
|
4578
|
+
"homey.system"
|
|
4579
|
+
],
|
|
4580
|
+
"parameters": {}
|
|
4581
|
+
},
|
|
4582
|
+
"setLogEnabled": {
|
|
4583
|
+
"method": "put",
|
|
4584
|
+
"path": "/log",
|
|
4585
|
+
"private": false,
|
|
4586
|
+
"scopes": [
|
|
4587
|
+
"homey.system"
|
|
4588
|
+
],
|
|
4589
|
+
"parameters": {
|
|
4590
|
+
"enabled": {
|
|
4591
|
+
"in": "body",
|
|
4592
|
+
"type": "boolean",
|
|
4593
|
+
"required": true
|
|
4594
|
+
}
|
|
4595
|
+
}
|
|
4404
4596
|
}
|
|
4405
4597
|
}
|
|
4406
4598
|
}
|
|
@@ -2224,6 +2224,22 @@
|
|
|
2224
2224
|
|
|
2225
2225
|
|
|
2226
2226
|
|
|
2227
|
+
|
|
2228
|
+
|
|
2229
|
+
|
|
2230
|
+
|
|
2231
|
+
|
|
2232
|
+
export namespace HomeyAPIV3Local.ManagerAlarms {
|
|
2233
|
+
|
|
2234
|
+
export class Alarm {
|
|
2235
|
+
|
|
2236
|
+
|
|
2237
|
+
|
|
2238
|
+
|
|
2239
|
+
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
}
|
|
2227
2243
|
|
|
2228
2244
|
|
|
2229
2245
|
|
|
@@ -10281,6 +10297,150 @@
|
|
|
10281
10297
|
|
|
10282
10298
|
|
|
10283
10299
|
|
|
10300
|
+
isConnected(
|
|
10301
|
+
|
|
10302
|
+
):
|
|
10303
|
+
Boolean;
|
|
10304
|
+
|
|
10305
|
+
connect(
|
|
10306
|
+
|
|
10307
|
+
):
|
|
10308
|
+
Promise<void>;
|
|
10309
|
+
|
|
10310
|
+
disconnect(
|
|
10311
|
+
|
|
10312
|
+
):
|
|
10313
|
+
Promise<void>;
|
|
10314
|
+
|
|
10315
|
+
}
|
|
10316
|
+
|
|
10317
|
+
export class ManagerAlarms extends HomeyAPIV3Local.Manager {
|
|
10318
|
+
|
|
10319
|
+
|
|
10320
|
+
|
|
10321
|
+
|
|
10322
|
+
|
|
10323
|
+
getAlarms(
|
|
10324
|
+
|
|
10325
|
+
):
|
|
10326
|
+
Promise<HomeyAPIV3Local.ManagerAlarms.Alarm>;
|
|
10327
|
+
|
|
10328
|
+
getAlarm(
|
|
10329
|
+
|
|
10330
|
+
|
|
10331
|
+
|
|
10332
|
+
|
|
10333
|
+
opts: {
|
|
10334
|
+
|
|
10335
|
+
|
|
10336
|
+
id: string,
|
|
10337
|
+
|
|
10338
|
+
|
|
10339
|
+
},
|
|
10340
|
+
|
|
10341
|
+
|
|
10342
|
+
|
|
10343
|
+
|
|
10344
|
+
):
|
|
10345
|
+
Promise<HomeyAPIV3Local.ManagerAlarms.Alarm>;
|
|
10346
|
+
|
|
10347
|
+
createAlarm(
|
|
10348
|
+
|
|
10349
|
+
|
|
10350
|
+
|
|
10351
|
+
|
|
10352
|
+
opts: {
|
|
10353
|
+
|
|
10354
|
+
|
|
10355
|
+
alarm: {
|
|
10356
|
+
|
|
10357
|
+
|
|
10358
|
+
name: string,
|
|
10359
|
+
|
|
10360
|
+
|
|
10361
|
+
|
|
10362
|
+
time: string,
|
|
10363
|
+
|
|
10364
|
+
|
|
10365
|
+
|
|
10366
|
+
enabled: boolean,
|
|
10367
|
+
|
|
10368
|
+
|
|
10369
|
+
|
|
10370
|
+
repetition: object,
|
|
10371
|
+
|
|
10372
|
+
|
|
10373
|
+
},
|
|
10374
|
+
|
|
10375
|
+
|
|
10376
|
+
},
|
|
10377
|
+
|
|
10378
|
+
|
|
10379
|
+
|
|
10380
|
+
|
|
10381
|
+
):
|
|
10382
|
+
Promise<HomeyAPIV3Local.ManagerAlarms.Alarm>;
|
|
10383
|
+
|
|
10384
|
+
updateAlarm(
|
|
10385
|
+
|
|
10386
|
+
|
|
10387
|
+
|
|
10388
|
+
|
|
10389
|
+
opts: {
|
|
10390
|
+
|
|
10391
|
+
|
|
10392
|
+
id: string,
|
|
10393
|
+
|
|
10394
|
+
|
|
10395
|
+
|
|
10396
|
+
alarm: {
|
|
10397
|
+
|
|
10398
|
+
|
|
10399
|
+
name: string,
|
|
10400
|
+
|
|
10401
|
+
|
|
10402
|
+
|
|
10403
|
+
time: string,
|
|
10404
|
+
|
|
10405
|
+
|
|
10406
|
+
|
|
10407
|
+
enabled: boolean,
|
|
10408
|
+
|
|
10409
|
+
|
|
10410
|
+
|
|
10411
|
+
repetition: object,
|
|
10412
|
+
|
|
10413
|
+
|
|
10414
|
+
},
|
|
10415
|
+
|
|
10416
|
+
|
|
10417
|
+
},
|
|
10418
|
+
|
|
10419
|
+
|
|
10420
|
+
|
|
10421
|
+
|
|
10422
|
+
):
|
|
10423
|
+
Promise<HomeyAPIV3Local.ManagerAlarms.Alarm>;
|
|
10424
|
+
|
|
10425
|
+
deleteAlarm(
|
|
10426
|
+
|
|
10427
|
+
|
|
10428
|
+
|
|
10429
|
+
|
|
10430
|
+
opts: {
|
|
10431
|
+
|
|
10432
|
+
|
|
10433
|
+
id: string,
|
|
10434
|
+
|
|
10435
|
+
|
|
10436
|
+
},
|
|
10437
|
+
|
|
10438
|
+
|
|
10439
|
+
|
|
10440
|
+
|
|
10441
|
+
):
|
|
10442
|
+
Promise<any>;
|
|
10443
|
+
|
|
10284
10444
|
isConnected(
|
|
10285
10445
|
|
|
10286
10446
|
):
|
|
@@ -10767,29 +10927,6 @@
|
|
|
10767
10927
|
|
|
10768
10928
|
getState(
|
|
10769
10929
|
|
|
10770
|
-
):
|
|
10771
|
-
Promise<any>;
|
|
10772
|
-
|
|
10773
|
-
runCommand(
|
|
10774
|
-
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
|
-
|
|
10778
|
-
opts: {
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
command: string,
|
|
10782
|
-
|
|
10783
|
-
|
|
10784
|
-
|
|
10785
|
-
opts: object,
|
|
10786
|
-
|
|
10787
|
-
|
|
10788
|
-
},
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
|
|
10792
|
-
|
|
10793
10930
|
):
|
|
10794
10931
|
Promise<any>;
|
|
10795
10932
|
|
|
@@ -13735,6 +13872,25 @@
|
|
|
13735
13872
|
|
|
13736
13873
|
rebootOTA(
|
|
13737
13874
|
|
|
13875
|
+
):
|
|
13876
|
+
Promise<any>;
|
|
13877
|
+
|
|
13878
|
+
setDebug(
|
|
13879
|
+
|
|
13880
|
+
|
|
13881
|
+
|
|
13882
|
+
|
|
13883
|
+
opts: {
|
|
13884
|
+
|
|
13885
|
+
|
|
13886
|
+
namespace: string,
|
|
13887
|
+
|
|
13888
|
+
|
|
13889
|
+
},
|
|
13890
|
+
|
|
13891
|
+
|
|
13892
|
+
|
|
13893
|
+
|
|
13738
13894
|
):
|
|
13739
13895
|
Promise<any>;
|
|
13740
13896
|
|
|
@@ -14480,6 +14636,30 @@
|
|
|
14480
14636
|
|
|
14481
14637
|
|
|
14482
14638
|
|
|
14639
|
+
):
|
|
14640
|
+
Promise<any>;
|
|
14641
|
+
|
|
14642
|
+
getLog(
|
|
14643
|
+
|
|
14644
|
+
):
|
|
14645
|
+
Promise<any>;
|
|
14646
|
+
|
|
14647
|
+
setLogEnabled(
|
|
14648
|
+
|
|
14649
|
+
|
|
14650
|
+
|
|
14651
|
+
|
|
14652
|
+
opts: {
|
|
14653
|
+
|
|
14654
|
+
|
|
14655
|
+
enabled: boolean,
|
|
14656
|
+
|
|
14657
|
+
|
|
14658
|
+
},
|
|
14659
|
+
|
|
14660
|
+
|
|
14661
|
+
|
|
14662
|
+
|
|
14483
14663
|
):
|
|
14484
14664
|
Promise<any>;
|
|
14485
14665
|
|
|
@@ -7614,6 +7614,22 @@
|
|
|
7614
7614
|
|
|
7615
7615
|
|
|
7616
7616
|
|
|
7617
|
+
|
|
7618
|
+
|
|
7619
|
+
|
|
7620
|
+
|
|
7621
|
+
|
|
7622
|
+
export namespace HomeyAPIV3Local.ManagerAlarms {
|
|
7623
|
+
|
|
7624
|
+
export class Alarm {
|
|
7625
|
+
|
|
7626
|
+
|
|
7627
|
+
|
|
7628
|
+
|
|
7629
|
+
|
|
7630
|
+
}
|
|
7631
|
+
|
|
7632
|
+
}
|
|
7617
7633
|
|
|
7618
7634
|
|
|
7619
7635
|
|
|
@@ -16178,6 +16194,150 @@
|
|
|
16178
16194
|
|
|
16179
16195
|
|
|
16180
16196
|
|
|
16197
|
+
isConnected(
|
|
16198
|
+
|
|
16199
|
+
):
|
|
16200
|
+
Boolean;
|
|
16201
|
+
|
|
16202
|
+
connect(
|
|
16203
|
+
|
|
16204
|
+
):
|
|
16205
|
+
Promise<void>;
|
|
16206
|
+
|
|
16207
|
+
disconnect(
|
|
16208
|
+
|
|
16209
|
+
):
|
|
16210
|
+
Promise<void>;
|
|
16211
|
+
|
|
16212
|
+
}
|
|
16213
|
+
|
|
16214
|
+
export class ManagerAlarms extends HomeyAPIV3Local.Manager {
|
|
16215
|
+
|
|
16216
|
+
|
|
16217
|
+
|
|
16218
|
+
|
|
16219
|
+
|
|
16220
|
+
getAlarms(
|
|
16221
|
+
|
|
16222
|
+
):
|
|
16223
|
+
Promise<HomeyAPIV3Local.ManagerAlarms.Alarm>;
|
|
16224
|
+
|
|
16225
|
+
getAlarm(
|
|
16226
|
+
|
|
16227
|
+
|
|
16228
|
+
|
|
16229
|
+
|
|
16230
|
+
opts: {
|
|
16231
|
+
|
|
16232
|
+
|
|
16233
|
+
id: string,
|
|
16234
|
+
|
|
16235
|
+
|
|
16236
|
+
},
|
|
16237
|
+
|
|
16238
|
+
|
|
16239
|
+
|
|
16240
|
+
|
|
16241
|
+
):
|
|
16242
|
+
Promise<HomeyAPIV3Local.ManagerAlarms.Alarm>;
|
|
16243
|
+
|
|
16244
|
+
createAlarm(
|
|
16245
|
+
|
|
16246
|
+
|
|
16247
|
+
|
|
16248
|
+
|
|
16249
|
+
opts: {
|
|
16250
|
+
|
|
16251
|
+
|
|
16252
|
+
alarm: {
|
|
16253
|
+
|
|
16254
|
+
|
|
16255
|
+
name: string,
|
|
16256
|
+
|
|
16257
|
+
|
|
16258
|
+
|
|
16259
|
+
time: string,
|
|
16260
|
+
|
|
16261
|
+
|
|
16262
|
+
|
|
16263
|
+
enabled: boolean,
|
|
16264
|
+
|
|
16265
|
+
|
|
16266
|
+
|
|
16267
|
+
repetition: object,
|
|
16268
|
+
|
|
16269
|
+
|
|
16270
|
+
},
|
|
16271
|
+
|
|
16272
|
+
|
|
16273
|
+
},
|
|
16274
|
+
|
|
16275
|
+
|
|
16276
|
+
|
|
16277
|
+
|
|
16278
|
+
):
|
|
16279
|
+
Promise<HomeyAPIV3Local.ManagerAlarms.Alarm>;
|
|
16280
|
+
|
|
16281
|
+
updateAlarm(
|
|
16282
|
+
|
|
16283
|
+
|
|
16284
|
+
|
|
16285
|
+
|
|
16286
|
+
opts: {
|
|
16287
|
+
|
|
16288
|
+
|
|
16289
|
+
id: string,
|
|
16290
|
+
|
|
16291
|
+
|
|
16292
|
+
|
|
16293
|
+
alarm: {
|
|
16294
|
+
|
|
16295
|
+
|
|
16296
|
+
name: string,
|
|
16297
|
+
|
|
16298
|
+
|
|
16299
|
+
|
|
16300
|
+
time: string,
|
|
16301
|
+
|
|
16302
|
+
|
|
16303
|
+
|
|
16304
|
+
enabled: boolean,
|
|
16305
|
+
|
|
16306
|
+
|
|
16307
|
+
|
|
16308
|
+
repetition: object,
|
|
16309
|
+
|
|
16310
|
+
|
|
16311
|
+
},
|
|
16312
|
+
|
|
16313
|
+
|
|
16314
|
+
},
|
|
16315
|
+
|
|
16316
|
+
|
|
16317
|
+
|
|
16318
|
+
|
|
16319
|
+
):
|
|
16320
|
+
Promise<HomeyAPIV3Local.ManagerAlarms.Alarm>;
|
|
16321
|
+
|
|
16322
|
+
deleteAlarm(
|
|
16323
|
+
|
|
16324
|
+
|
|
16325
|
+
|
|
16326
|
+
|
|
16327
|
+
opts: {
|
|
16328
|
+
|
|
16329
|
+
|
|
16330
|
+
id: string,
|
|
16331
|
+
|
|
16332
|
+
|
|
16333
|
+
},
|
|
16334
|
+
|
|
16335
|
+
|
|
16336
|
+
|
|
16337
|
+
|
|
16338
|
+
):
|
|
16339
|
+
Promise<any>;
|
|
16340
|
+
|
|
16181
16341
|
isConnected(
|
|
16182
16342
|
|
|
16183
16343
|
):
|
|
@@ -16664,29 +16824,6 @@
|
|
|
16664
16824
|
|
|
16665
16825
|
getState(
|
|
16666
16826
|
|
|
16667
|
-
):
|
|
16668
|
-
Promise<any>;
|
|
16669
|
-
|
|
16670
|
-
runCommand(
|
|
16671
|
-
|
|
16672
|
-
|
|
16673
|
-
|
|
16674
|
-
|
|
16675
|
-
opts: {
|
|
16676
|
-
|
|
16677
|
-
|
|
16678
|
-
command: string,
|
|
16679
|
-
|
|
16680
|
-
|
|
16681
|
-
|
|
16682
|
-
opts: object,
|
|
16683
|
-
|
|
16684
|
-
|
|
16685
|
-
},
|
|
16686
|
-
|
|
16687
|
-
|
|
16688
|
-
|
|
16689
|
-
|
|
16690
16827
|
):
|
|
16691
16828
|
Promise<any>;
|
|
16692
16829
|
|
|
@@ -19773,6 +19910,25 @@
|
|
|
19773
19910
|
|
|
19774
19911
|
rebootOTA(
|
|
19775
19912
|
|
|
19913
|
+
):
|
|
19914
|
+
Promise<any>;
|
|
19915
|
+
|
|
19916
|
+
setDebug(
|
|
19917
|
+
|
|
19918
|
+
|
|
19919
|
+
|
|
19920
|
+
|
|
19921
|
+
opts: {
|
|
19922
|
+
|
|
19923
|
+
|
|
19924
|
+
namespace: string,
|
|
19925
|
+
|
|
19926
|
+
|
|
19927
|
+
},
|
|
19928
|
+
|
|
19929
|
+
|
|
19930
|
+
|
|
19931
|
+
|
|
19776
19932
|
):
|
|
19777
19933
|
Promise<any>;
|
|
19778
19934
|
|
|
@@ -20528,6 +20684,30 @@
|
|
|
20528
20684
|
|
|
20529
20685
|
flashFirmware(
|
|
20530
20686
|
|
|
20687
|
+
):
|
|
20688
|
+
Promise<any>;
|
|
20689
|
+
|
|
20690
|
+
getLog(
|
|
20691
|
+
|
|
20692
|
+
):
|
|
20693
|
+
Promise<any>;
|
|
20694
|
+
|
|
20695
|
+
setLogEnabled(
|
|
20696
|
+
|
|
20697
|
+
|
|
20698
|
+
|
|
20699
|
+
|
|
20700
|
+
opts: {
|
|
20701
|
+
|
|
20702
|
+
|
|
20703
|
+
enabled: boolean,
|
|
20704
|
+
|
|
20705
|
+
|
|
20706
|
+
},
|
|
20707
|
+
|
|
20708
|
+
|
|
20709
|
+
|
|
20710
|
+
|
|
20531
20711
|
):
|
|
20532
20712
|
Promise<any>;
|
|
20533
20713
|
|
|
@@ -4,8 +4,8 @@ const CapabilityV3 = require('../../HomeyAPIV3/ManagerDevices/Capability');
|
|
|
4
4
|
|
|
5
5
|
class Capability extends CapabilityV3 {
|
|
6
6
|
|
|
7
|
-
static
|
|
8
|
-
item = super.
|
|
7
|
+
static transformGet(item) {
|
|
8
|
+
item = super.transformGet(item);
|
|
9
9
|
|
|
10
10
|
item.id = `${item.uri}:${item.id}`;
|
|
11
11
|
item.ownerUri = item.uri;
|
|
@@ -4,8 +4,8 @@ const DeviceV3 = require('../../HomeyAPIV3/ManagerDevices/Device');
|
|
|
4
4
|
|
|
5
5
|
class Device extends DeviceV3 {
|
|
6
6
|
|
|
7
|
-
static
|
|
8
|
-
item = super.
|
|
7
|
+
static transformGet(item) {
|
|
8
|
+
item = super.transformGet(item);
|
|
9
9
|
|
|
10
10
|
item.driverId = `${item.driverUri}:${item.driverId}`;
|
|
11
11
|
delete item.driverUri;
|
|
@@ -4,8 +4,8 @@ const DriverV3 = require('../../HomeyAPIV3/ManagerDrivers/Driver');
|
|
|
4
4
|
|
|
5
5
|
class Driver extends DriverV3 {
|
|
6
6
|
|
|
7
|
-
static
|
|
8
|
-
item = super.
|
|
7
|
+
static transformGet(item) {
|
|
8
|
+
item = super.transformGet(item);
|
|
9
9
|
|
|
10
10
|
item.ownerId = item.id;
|
|
11
11
|
item.ownerUri = item.uri;
|
|
@@ -4,8 +4,8 @@ const PairSessionV3 = require('../../HomeyAPIV3/ManagerDrivers/PairSession');
|
|
|
4
4
|
|
|
5
5
|
class PairSession extends PairSessionV3 {
|
|
6
6
|
|
|
7
|
-
static
|
|
8
|
-
item = super.
|
|
7
|
+
static transformGet(item) {
|
|
8
|
+
item = super.transformGet(item);
|
|
9
9
|
|
|
10
10
|
item.driverId = `${item.driverUri}:${item.driverId}`;
|
|
11
11
|
item.ownerUri = item.driverUri;
|
|
@@ -4,7 +4,7 @@ const AdvancedFlowV3 = require('../../HomeyAPIV3/ManagerFlow/Flow');
|
|
|
4
4
|
|
|
5
5
|
class AdvancedFlow extends AdvancedFlowV3 {
|
|
6
6
|
|
|
7
|
-
static
|
|
7
|
+
static transformGet(item) {
|
|
8
8
|
if (item.cards) {
|
|
9
9
|
for (const card of Object.values(item.cards)) {
|
|
10
10
|
card.id = `${card.ownerUri}:${card.id}`;
|
|
@@ -14,7 +14,7 @@ class AdvancedFlow extends AdvancedFlowV3 {
|
|
|
14
14
|
return item;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
static
|
|
17
|
+
static transformSet(item) {
|
|
18
18
|
if (item.cards) {
|
|
19
19
|
for (const card of Object.values(item.cards)) {
|
|
20
20
|
card.ownerUri = card.id.split(':', 3).join(':');
|
|
@@ -4,8 +4,8 @@ const FlowV3 = require('../../HomeyAPIV3/ManagerFlow/Flow');
|
|
|
4
4
|
|
|
5
5
|
class Flow extends FlowV3 {
|
|
6
6
|
|
|
7
|
-
static
|
|
8
|
-
item = super.
|
|
7
|
+
static transformGet(item) {
|
|
8
|
+
item = super.transformGet(item);
|
|
9
9
|
|
|
10
10
|
if (item.trigger) {
|
|
11
11
|
item.trigger.id = `${item.trigger.uri}:${item.trigger.id}`;
|
|
@@ -29,7 +29,7 @@ class Flow extends FlowV3 {
|
|
|
29
29
|
return item;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
static
|
|
32
|
+
static transformSet(item) {
|
|
33
33
|
if (item.trigger) {
|
|
34
34
|
item.trigger.uri = item.trigger.id.split(':', 3).join(':');
|
|
35
35
|
item.trigger.id = item.trigger.id.split(':').reverse()[0];
|
|
@@ -4,8 +4,8 @@ const FlowCardActionV3 = require('../../HomeyAPIV3/ManagerFlow/FlowCardAction');
|
|
|
4
4
|
|
|
5
5
|
class FlowCardAction extends FlowCardActionV3 {
|
|
6
6
|
|
|
7
|
-
static
|
|
8
|
-
item = super.
|
|
7
|
+
static transformGet(item) {
|
|
8
|
+
item = super.transformGet(item);
|
|
9
9
|
|
|
10
10
|
item.id = `${item.uri}:${item.id}`;
|
|
11
11
|
item.ownerUri = item.uri;
|
|
@@ -4,8 +4,8 @@ const FlowCardConditionV3 = require('../../HomeyAPIV3/ManagerFlow/FlowCardCondit
|
|
|
4
4
|
|
|
5
5
|
class FlowCardCondition extends FlowCardConditionV3 {
|
|
6
6
|
|
|
7
|
-
static
|
|
8
|
-
item = super.
|
|
7
|
+
static transformGet(item) {
|
|
8
|
+
item = super.transformGet(item);
|
|
9
9
|
|
|
10
10
|
item.id = `${item.uri}:${item.id}`;
|
|
11
11
|
item.ownerUri = item.uri;
|
|
@@ -4,8 +4,8 @@ const FlowCardTriggerV3 = require('../../HomeyAPIV3/ManagerFlow/FlowCardTrigger'
|
|
|
4
4
|
|
|
5
5
|
class FlowCardTrigger extends FlowCardTriggerV3 {
|
|
6
6
|
|
|
7
|
-
static
|
|
8
|
-
item = super.
|
|
7
|
+
static transformGet(item) {
|
|
8
|
+
item = super.transformGet(item);
|
|
9
9
|
|
|
10
10
|
item.id = `${item.uri}:${item.id}`;
|
|
11
11
|
item.ownerUri = item.uri;
|
|
@@ -23,7 +23,7 @@ class ManagerFlow extends Manager {
|
|
|
23
23
|
...props
|
|
24
24
|
}) {
|
|
25
25
|
return this.__super__.createFlow({
|
|
26
|
-
flow: Flow.
|
|
26
|
+
flow: Flow.transformSet(flow),
|
|
27
27
|
...props,
|
|
28
28
|
});
|
|
29
29
|
}
|
|
@@ -33,7 +33,7 @@ class ManagerFlow extends Manager {
|
|
|
33
33
|
...props
|
|
34
34
|
}) {
|
|
35
35
|
return this.__super__.updateFlow({
|
|
36
|
-
flow: Flow.
|
|
36
|
+
flow: Flow.transformSet(flow),
|
|
37
37
|
...props,
|
|
38
38
|
});
|
|
39
39
|
}
|
|
@@ -43,7 +43,7 @@ class ManagerFlow extends Manager {
|
|
|
43
43
|
...props
|
|
44
44
|
}) {
|
|
45
45
|
return this.__super__.createAdvancedFlow({
|
|
46
|
-
advancedflow: AdvancedFlow.
|
|
46
|
+
advancedflow: AdvancedFlow.transformSet(advancedflow),
|
|
47
47
|
...props,
|
|
48
48
|
});
|
|
49
49
|
}
|
|
@@ -53,7 +53,7 @@ class ManagerFlow extends Manager {
|
|
|
53
53
|
...props
|
|
54
54
|
}) {
|
|
55
55
|
return this.__super__.updateAdvancedFlow({
|
|
56
|
-
advancedflow: AdvancedFlow.
|
|
56
|
+
advancedflow: AdvancedFlow.transformSet(advancedflow),
|
|
57
57
|
...props,
|
|
58
58
|
});
|
|
59
59
|
}
|
|
@@ -4,15 +4,15 @@ const FlowTokenV3 = require('../../HomeyAPIV3/ManagerFlowToken/FlowToken');
|
|
|
4
4
|
|
|
5
5
|
class FlowToken extends FlowTokenV3 {
|
|
6
6
|
|
|
7
|
-
static
|
|
7
|
+
static transformGet(item) {
|
|
8
8
|
// TODO: Remove FlowTokenV3.transform and uncomment this after front-end does not use FlowToken.uri|id|uriObj anymore!
|
|
9
|
-
// item = super.
|
|
9
|
+
// item = super.transformGet(item);
|
|
10
10
|
|
|
11
11
|
item.ownerUri = item.uri;
|
|
12
12
|
item.ownerId = item.id;
|
|
13
|
-
item.ownerName = item.uriObj.name;
|
|
14
13
|
item.id = `${item.ownerUri}:${item.ownerId}`;
|
|
15
14
|
|
|
15
|
+
delete item.ownerName; // Prepare for back-end change
|
|
16
16
|
delete item.uri;
|
|
17
17
|
delete item.uriObj;
|
|
18
18
|
|
|
@@ -4,12 +4,11 @@ const LogV3 = require('../../HomeyAPIV3/ManagerInsights/Log');
|
|
|
4
4
|
|
|
5
5
|
class Log extends LogV3 {
|
|
6
6
|
|
|
7
|
-
static
|
|
8
|
-
item = super.
|
|
7
|
+
static transformGet(item) {
|
|
8
|
+
item = super.transformGet(item);
|
|
9
9
|
|
|
10
10
|
item.ownerId = item.id;
|
|
11
11
|
item.ownerUri = item.uri;
|
|
12
|
-
item.ownerName = item.uriObj.name;
|
|
13
12
|
item.id = `${item.uri}:${item.id}`;
|
|
14
13
|
|
|
15
14
|
delete item.uri;
|
|
@@ -258,7 +258,7 @@ class Manager extends EventEmitter {
|
|
|
258
258
|
switch (operation.crud.type) {
|
|
259
259
|
case 'getOne': {
|
|
260
260
|
let item = { ...result };
|
|
261
|
-
item = Item.
|
|
261
|
+
item = Item.transformGet(item);
|
|
262
262
|
item = new Item({
|
|
263
263
|
id: item.id,
|
|
264
264
|
homey: this.homey,
|
|
@@ -277,7 +277,7 @@ class Manager extends EventEmitter {
|
|
|
277
277
|
|
|
278
278
|
// Add all to cache
|
|
279
279
|
for (let item of Object.values(result)) {
|
|
280
|
-
item = Item.
|
|
280
|
+
item = Item.transformGet(item);
|
|
281
281
|
if (this.__cache[itemId][item.id]) {
|
|
282
282
|
items[item.id] = this.__cache[itemId][item.id];
|
|
283
283
|
items[item.id].__update(item);
|
|
@@ -314,13 +314,13 @@ class Manager extends EventEmitter {
|
|
|
314
314
|
case 'createOne':
|
|
315
315
|
case 'updateOne': {
|
|
316
316
|
let item = { ...result };
|
|
317
|
-
item = Item.
|
|
317
|
+
item = Item.transformGet(item);
|
|
318
318
|
|
|
319
319
|
if (this.__cache[itemId][item.id]) {
|
|
320
320
|
item = this.__cache[itemId][item.id];
|
|
321
321
|
item.__update(item);
|
|
322
322
|
} else {
|
|
323
|
-
item = Item.
|
|
323
|
+
item = Item.transformGet(item);
|
|
324
324
|
item = new Item({
|
|
325
325
|
id: item.id,
|
|
326
326
|
homey: this.homey,
|
|
@@ -412,7 +412,7 @@ class Manager extends EventEmitter {
|
|
|
412
412
|
|
|
413
413
|
switch (operation) {
|
|
414
414
|
case 'create': {
|
|
415
|
-
data = Item.
|
|
415
|
+
data = Item.transformGet(data);
|
|
416
416
|
|
|
417
417
|
const item = new Item({
|
|
418
418
|
id: data.id,
|
|
@@ -425,7 +425,7 @@ class Manager extends EventEmitter {
|
|
|
425
425
|
break;
|
|
426
426
|
}
|
|
427
427
|
case 'update': {
|
|
428
|
-
data = Item.
|
|
428
|
+
data = Item.transformGet(data);
|
|
429
429
|
|
|
430
430
|
if (this.__cache[itemId][data.id]) {
|
|
431
431
|
const item = this.__cache[itemId][data.id];
|
|
@@ -435,7 +435,7 @@ class Manager extends EventEmitter {
|
|
|
435
435
|
break;
|
|
436
436
|
}
|
|
437
437
|
case 'delete': {
|
|
438
|
-
data = Item.
|
|
438
|
+
data = Item.transformGet(data);
|
|
439
439
|
|
|
440
440
|
if (this.__cache[itemId][data.id]) {
|
|
441
441
|
const item = this.__cache[itemId][data.id];
|
|
@@ -195,7 +195,9 @@ class Device extends Item {
|
|
|
195
195
|
}), {});
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
static
|
|
198
|
+
static transformGet(item) {
|
|
199
|
+
item = super.transformGet(item);
|
|
200
|
+
|
|
199
201
|
if (item.capabilitiesObj) {
|
|
200
202
|
for (const capabilityObj of Object.values(item.capabilitiesObj)) {
|
|
201
203
|
if (capabilityObj.lastUpdated) {
|
|
@@ -4,6 +4,14 @@ const Item = require('../Item');
|
|
|
4
4
|
|
|
5
5
|
class FlowCard extends Item {
|
|
6
6
|
|
|
7
|
+
static transformGet(item) {
|
|
8
|
+
item = super.transformGet(item);
|
|
9
|
+
|
|
10
|
+
delete item.ownerName; // Prepare for back-end change
|
|
11
|
+
|
|
12
|
+
return item;
|
|
13
|
+
}
|
|
14
|
+
|
|
7
15
|
}
|
|
8
16
|
|
|
9
17
|
module.exports = FlowCard;
|
|
@@ -5,10 +5,13 @@ const Item = require('../Item');
|
|
|
5
5
|
class FlowToken extends Item {
|
|
6
6
|
|
|
7
7
|
// TODO: Remove when back-end has removed these properties.
|
|
8
|
-
static
|
|
8
|
+
static transformGet(item) {
|
|
9
|
+
item = super.transformGet(item);
|
|
10
|
+
|
|
9
11
|
delete item.uri;
|
|
10
12
|
delete item.id;
|
|
11
13
|
delete item.uriObj;
|
|
14
|
+
delete item.ownerName; // Prepare for back-end change
|
|
12
15
|
}
|
|
13
16
|
|
|
14
17
|
}
|