@switchbot/homebridge-switchbot 3.5.1-beta.14 → 3.5.1-beta.15
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.map +1 -1
- package/dist/device/blindtilt.js +2 -0
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/bot.d.ts.map +1 -1
- package/dist/device/bot.js +20 -0
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.d.ts.map +1 -1
- package/dist/device/ceilinglight.js +2 -0
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +2 -0
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.d.ts.map +1 -1
- package/dist/device/contact.js +2 -0
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +2 -0
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/fan.d.ts.map +1 -1
- package/dist/device/fan.js +2 -0
- package/dist/device/fan.js.map +1 -1
- package/dist/device/hub.d.ts.map +1 -1
- package/dist/device/hub.js +2 -0
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +2 -0
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.d.ts.map +1 -1
- package/dist/device/iosensor.js +2 -0
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.d.ts.map +1 -1
- package/dist/device/lightstrip.js +2 -0
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +2 -0
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.d.ts.map +1 -1
- package/dist/device/meter.js +2 -0
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.d.ts.map +1 -1
- package/dist/device/meterplus.js +2 -0
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +2 -0
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +2 -0
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
- package/dist/device/robotvacuumcleaner.js +2 -0
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/device/waterdetector.d.ts.map +1 -1
- package/dist/device/waterdetector.js +2 -0
- package/dist/device/waterdetector.js.map +1 -1
- package/dist/irdevice/airconditioner.d.ts.map +1 -1
- package/dist/irdevice/airconditioner.js +2 -0
- package/dist/irdevice/airconditioner.js.map +1 -1
- package/dist/irdevice/airpurifier.d.ts.map +1 -1
- package/dist/irdevice/airpurifier.js +2 -0
- package/dist/irdevice/airpurifier.js.map +1 -1
- package/dist/irdevice/camera.d.ts.map +1 -1
- package/dist/irdevice/camera.js +2 -0
- package/dist/irdevice/camera.js.map +1 -1
- package/dist/irdevice/fan.d.ts.map +1 -1
- package/dist/irdevice/fan.js +2 -0
- package/dist/irdevice/fan.js.map +1 -1
- package/dist/irdevice/light.d.ts.map +1 -1
- package/dist/irdevice/light.js +2 -0
- package/dist/irdevice/light.js.map +1 -1
- package/dist/irdevice/other.d.ts.map +1 -1
- package/dist/irdevice/other.js +2 -0
- package/dist/irdevice/other.js.map +1 -1
- package/dist/irdevice/tv.js +4 -4
- package/dist/irdevice/tv.js.map +1 -1
- package/dist/irdevice/vacuumcleaner.d.ts.map +1 -1
- package/dist/irdevice/vacuumcleaner.js +2 -0
- package/dist/irdevice/vacuumcleaner.js.map +1 -1
- package/dist/irdevice/waterheater.d.ts.map +1 -1
- package/dist/irdevice/waterheater.js +2 -0
- package/dist/irdevice/waterheater.js.map +1 -1
- package/package.json +1 -1
- package/src/device/blindtilt.ts +3 -0
- package/src/device/bot.ts +31 -0
- package/src/device/ceilinglight.ts +3 -0
- package/src/device/colorbulb.ts +3 -0
- package/src/device/contact.ts +3 -0
- package/src/device/curtain.ts +2 -0
- package/src/device/fan.ts +3 -0
- package/src/device/hub.ts +3 -0
- package/src/device/humidifier.ts +3 -0
- package/src/device/iosensor.ts +3 -0
- package/src/device/lightstrip.ts +3 -0
- package/src/device/lock.ts +3 -0
- package/src/device/meter.ts +3 -0
- package/src/device/meterplus.ts +3 -0
- package/src/device/motion.ts +3 -0
- package/src/device/plug.ts +3 -0
- package/src/device/robotvacuumcleaner.ts +3 -0
- package/src/device/waterdetector.ts +3 -0
- package/src/irdevice/airconditioner.ts +2 -1
- package/src/irdevice/airpurifier.ts +2 -0
- package/src/irdevice/camera.ts +2 -0
- package/src/irdevice/fan.ts +2 -0
- package/src/irdevice/light.ts +2 -0
- package/src/irdevice/other.ts +2 -0
- package/src/irdevice/tv.ts +4 -4
- package/src/irdevice/vacuumcleaner.ts +2 -0
- package/src/irdevice/waterheater.ts +2 -0
package/src/device/bot.ts
CHANGED
|
@@ -115,6 +115,7 @@ export class Bot extends deviceBase {
|
|
|
115
115
|
device: device & devicesConfig,
|
|
116
116
|
) {
|
|
117
117
|
super(platform, accessory, device);
|
|
118
|
+
|
|
118
119
|
// default placeholders
|
|
119
120
|
this.getBotConfigSettings(device);
|
|
120
121
|
|
|
@@ -140,6 +141,9 @@ export class Bot extends deviceBase {
|
|
|
140
141
|
|
|
141
142
|
// deviceType
|
|
142
143
|
if (this.botDeviceType === 'switch') {
|
|
144
|
+
// Set category
|
|
145
|
+
accessory.category = this.hap.Categories.SWITCH
|
|
146
|
+
;
|
|
143
147
|
// Initialize Switch Service
|
|
144
148
|
accessory.context.Switch = accessory.context.Switch ?? {};
|
|
145
149
|
this.Switch = {
|
|
@@ -171,6 +175,9 @@ export class Bot extends deviceBase {
|
|
|
171
175
|
this.removeWindowCoveringService(accessory);
|
|
172
176
|
this.removeStatefulProgrammableSwitchService(accessory);
|
|
173
177
|
} else if (this.botDeviceType === 'garagedoor') {
|
|
178
|
+
// Set category
|
|
179
|
+
accessory.category = this.hap.Categories.GARAGE_DOOR_OPENER;
|
|
180
|
+
|
|
174
181
|
// Initialize GarageDoor Service
|
|
175
182
|
accessory.context.GarageDoor = accessory.context.GarageDoor ?? {};
|
|
176
183
|
this.GarageDoor = {
|
|
@@ -207,6 +214,9 @@ export class Bot extends deviceBase {
|
|
|
207
214
|
this.removeWindowCoveringService(accessory);
|
|
208
215
|
this.removeStatefulProgrammableSwitchService(accessory);
|
|
209
216
|
} else if (this.botDeviceType === 'door') {
|
|
217
|
+
// Set category
|
|
218
|
+
accessory.category = this.hap.Categories.DOOR;
|
|
219
|
+
|
|
210
220
|
// Initialize Door Service
|
|
211
221
|
accessory.context.Door = accessory.context.Door ?? {};
|
|
212
222
|
this.Door = {
|
|
@@ -243,6 +253,9 @@ export class Bot extends deviceBase {
|
|
|
243
253
|
this.removeWindowCoveringService(accessory);
|
|
244
254
|
this.removeStatefulProgrammableSwitchService(accessory);
|
|
245
255
|
} else if (this.botDeviceType === 'window') {
|
|
256
|
+
// Set category
|
|
257
|
+
accessory.category = this.hap.Categories.WINDOW;
|
|
258
|
+
|
|
246
259
|
// Initialize Window Service
|
|
247
260
|
accessory.context.Window = accessory.context.Window ?? {};
|
|
248
261
|
this.Window = {
|
|
@@ -279,6 +292,9 @@ export class Bot extends deviceBase {
|
|
|
279
292
|
this.removeWindowCoveringService(accessory);
|
|
280
293
|
this.removeStatefulProgrammableSwitchService(accessory);
|
|
281
294
|
} else if (this.botDeviceType === 'windowcovering') {
|
|
295
|
+
// Set category
|
|
296
|
+
accessory.category = this.hap.Categories.WINDOW_COVERING;
|
|
297
|
+
|
|
282
298
|
// Initialize WindowCovering Service
|
|
283
299
|
accessory.context.WindowCovering = accessory.context.WindowCovering ?? {};
|
|
284
300
|
this.WindowCovering = {
|
|
@@ -315,6 +331,9 @@ export class Bot extends deviceBase {
|
|
|
315
331
|
this.removeGarageDoorService(accessory);
|
|
316
332
|
this.removeStatefulProgrammableSwitchService(accessory);
|
|
317
333
|
} else if (this.botDeviceType === 'lock') {
|
|
334
|
+
// Set category
|
|
335
|
+
accessory.category = this.hap.Categories.DOOR_LOCK;
|
|
336
|
+
|
|
318
337
|
// Initialize Lock Service
|
|
319
338
|
accessory.context.LockMechanism = accessory.context.LockMechanism ?? {};
|
|
320
339
|
this.LockMechanism = {
|
|
@@ -345,6 +364,9 @@ export class Bot extends deviceBase {
|
|
|
345
364
|
this.removeWindowCoveringService(accessory);
|
|
346
365
|
this.removeStatefulProgrammableSwitchService(accessory);
|
|
347
366
|
} else if (this.botDeviceType === 'faucet') {
|
|
367
|
+
// Set category
|
|
368
|
+
accessory.category = this.hap.Categories.FAUCET;
|
|
369
|
+
|
|
348
370
|
// Initialize Faucet Service
|
|
349
371
|
accessory.context.Faucet = accessory.context.Faucet ?? {};
|
|
350
372
|
this.Faucet = {
|
|
@@ -375,6 +397,9 @@ export class Bot extends deviceBase {
|
|
|
375
397
|
this.removeWindowCoveringService(accessory);
|
|
376
398
|
this.removeStatefulProgrammableSwitchService(accessory);
|
|
377
399
|
} else if (this.botDeviceType === 'fan') {
|
|
400
|
+
// Set category
|
|
401
|
+
accessory.category = this.hap.Categories.FAN;
|
|
402
|
+
|
|
378
403
|
// Initialize Fan Service
|
|
379
404
|
accessory.context.Fan = accessory.context.Fan ?? {};
|
|
380
405
|
this.Fan = {
|
|
@@ -405,6 +430,9 @@ export class Bot extends deviceBase {
|
|
|
405
430
|
this.removeWindowCoveringService(accessory);
|
|
406
431
|
this.removeStatefulProgrammableSwitchService(accessory);
|
|
407
432
|
} else if (this.botDeviceType === 'stateful') {
|
|
433
|
+
// Set category
|
|
434
|
+
accessory.category = this.hap.Categories.PROGRAMMABLE_SWITCH;
|
|
435
|
+
|
|
408
436
|
// Initialize StatefulProgrammableSwitch Service
|
|
409
437
|
accessory.context.StatefulProgrammableSwitch = accessory.context.StatefulProgrammableSwitch ?? {};
|
|
410
438
|
this.StatefulProgrammableSwitch = {
|
|
@@ -436,6 +464,9 @@ export class Bot extends deviceBase {
|
|
|
436
464
|
this.removeGarageDoorService(accessory);
|
|
437
465
|
this.removeWindowCoveringService(accessory);
|
|
438
466
|
} else {
|
|
467
|
+
// Set category
|
|
468
|
+
accessory.category = this.hap.Categories.OUTLET;
|
|
469
|
+
|
|
439
470
|
// Initialize Switch property
|
|
440
471
|
accessory.context.Outlet = accessory.context.Outlet ?? {};
|
|
441
472
|
this.Outlet = {
|
|
@@ -55,6 +55,9 @@ export class CeilingLight extends deviceBase {
|
|
|
55
55
|
device: device & devicesConfig,
|
|
56
56
|
) {
|
|
57
57
|
super(platform, accessory, device);
|
|
58
|
+
// Set category
|
|
59
|
+
accessory.category = this.hap.Categories.LIGHTBULB;
|
|
60
|
+
|
|
58
61
|
// default placeholders
|
|
59
62
|
this.adaptiveLighting(device);
|
|
60
63
|
|
package/src/device/colorbulb.ts
CHANGED
|
@@ -55,6 +55,9 @@ export class ColorBulb extends deviceBase {
|
|
|
55
55
|
device: device & devicesConfig,
|
|
56
56
|
) {
|
|
57
57
|
super(platform, accessory, device);
|
|
58
|
+
// Set category
|
|
59
|
+
accessory.category = this.hap.Categories.LIGHTBULB;
|
|
60
|
+
|
|
58
61
|
// default placeholders
|
|
59
62
|
this.adaptiveLighting(device);
|
|
60
63
|
|
package/src/device/contact.ts
CHANGED
|
@@ -65,6 +65,9 @@ export class Contact extends deviceBase {
|
|
|
65
65
|
device: device & devicesConfig,
|
|
66
66
|
) {
|
|
67
67
|
super(platform, accessory, device);
|
|
68
|
+
// Set category
|
|
69
|
+
accessory.category = this.hap.Categories.SENSOR;
|
|
70
|
+
|
|
68
71
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
69
72
|
this.doContactUpdate = new Subject();
|
|
70
73
|
this.contactUpdateInProgress = false;
|
package/src/device/curtain.ts
CHANGED
|
@@ -63,6 +63,8 @@ export class Curtain extends deviceBase {
|
|
|
63
63
|
device: device & devicesConfig,
|
|
64
64
|
) {
|
|
65
65
|
super(platform, accessory, device);
|
|
66
|
+
// Set category
|
|
67
|
+
accessory.category = this.hap.Categories.WINDOW_COVERING;
|
|
66
68
|
|
|
67
69
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
68
70
|
this.doCurtainUpdate = new Subject();
|
package/src/device/fan.ts
CHANGED
|
@@ -58,6 +58,9 @@ export class Fan extends deviceBase {
|
|
|
58
58
|
device: device & devicesConfig,
|
|
59
59
|
) {
|
|
60
60
|
super(platform, accessory, device);
|
|
61
|
+
// Set category
|
|
62
|
+
accessory.category = this.hap.Categories.FAN;
|
|
63
|
+
|
|
61
64
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
62
65
|
this.doFanUpdate = new Subject();
|
|
63
66
|
this.fanUpdateInProgress = false;
|
package/src/device/hub.ts
CHANGED
|
@@ -55,6 +55,9 @@ export class Hub extends deviceBase {
|
|
|
55
55
|
device: device & devicesConfig,
|
|
56
56
|
) {
|
|
57
57
|
super(platform, accessory, device);
|
|
58
|
+
// Set category
|
|
59
|
+
accessory.category = this.hap.Categories.SENSOR;
|
|
60
|
+
|
|
58
61
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
59
62
|
this.doHubUpdate = new Subject();
|
|
60
63
|
this.hubUpdateInProgress = false;
|
package/src/device/humidifier.ts
CHANGED
|
@@ -58,6 +58,9 @@ export class Humidifier extends deviceBase {
|
|
|
58
58
|
device: device & devicesConfig,
|
|
59
59
|
) {
|
|
60
60
|
super(platform, accessory, device);
|
|
61
|
+
// Set category
|
|
62
|
+
accessory.category = this.hap.Categories.AIR_HUMIDIFIER;
|
|
63
|
+
|
|
61
64
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
62
65
|
this.doHumidifierUpdate = new Subject();
|
|
63
66
|
this.humidifierUpdateInProgress = false;
|
package/src/device/iosensor.ts
CHANGED
|
@@ -61,6 +61,9 @@ export class IOSensor extends deviceBase {
|
|
|
61
61
|
device: device & devicesConfig,
|
|
62
62
|
) {
|
|
63
63
|
super(platform, accessory, device);
|
|
64
|
+
// Set category
|
|
65
|
+
accessory.category = this.hap.Categories.SENSOR;
|
|
66
|
+
|
|
64
67
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
65
68
|
this.doIOSensorUpdate = new Subject();
|
|
66
69
|
this.ioSensorUpdateInProgress = false;
|
package/src/device/lightstrip.ts
CHANGED
|
@@ -55,6 +55,9 @@ export class StripLight extends deviceBase {
|
|
|
55
55
|
device: device & devicesConfig,
|
|
56
56
|
) {
|
|
57
57
|
super(platform, accessory, device);
|
|
58
|
+
// Set category
|
|
59
|
+
accessory.category = this.hap.Categories.LIGHTBULB;
|
|
60
|
+
|
|
58
61
|
// Adaptive Lighting
|
|
59
62
|
this.adaptiveLighting(device);
|
|
60
63
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
package/src/device/lock.ts
CHANGED
|
@@ -61,6 +61,9 @@ export class Lock extends deviceBase {
|
|
|
61
61
|
device: device & devicesConfig,
|
|
62
62
|
) {
|
|
63
63
|
super(platform, accessory, device);
|
|
64
|
+
// Set category
|
|
65
|
+
accessory.category = this.hap.Categories.DOOR_LOCK;
|
|
66
|
+
|
|
64
67
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
65
68
|
this.doLockUpdate = new Subject();
|
|
66
69
|
this.lockUpdateInProgress = false;
|
package/src/device/meter.ts
CHANGED
|
@@ -56,6 +56,9 @@ export class Meter extends deviceBase {
|
|
|
56
56
|
device: device & devicesConfig,
|
|
57
57
|
) {
|
|
58
58
|
super(platform, accessory, device);
|
|
59
|
+
// Set category
|
|
60
|
+
accessory.category = this.hap.Categories.SENSOR;
|
|
61
|
+
|
|
59
62
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
60
63
|
this.doMeterUpdate = new Subject();
|
|
61
64
|
this.meterUpdateInProgress = false;
|
package/src/device/meterplus.ts
CHANGED
|
@@ -61,6 +61,9 @@ export class MeterPlus extends deviceBase {
|
|
|
61
61
|
device: device & devicesConfig,
|
|
62
62
|
) {
|
|
63
63
|
super(platform, accessory, device);
|
|
64
|
+
// Set category
|
|
65
|
+
accessory.category = this.hap.Categories.SENSOR;
|
|
66
|
+
|
|
64
67
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
65
68
|
this.doMeterUpdate = new Subject();
|
|
66
69
|
this.meterUpdateInProgress = false;
|
package/src/device/motion.ts
CHANGED
|
@@ -60,6 +60,9 @@ export class Motion extends deviceBase {
|
|
|
60
60
|
device: device & devicesConfig,
|
|
61
61
|
) {
|
|
62
62
|
super(platform, accessory, device);
|
|
63
|
+
// Set category
|
|
64
|
+
accessory.category = this.hap.Categories.SENSOR;
|
|
65
|
+
|
|
63
66
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
64
67
|
this.doMotionUpdate = new Subject();
|
|
65
68
|
this.motionUbpdateInProgress = false;
|
package/src/device/plug.ts
CHANGED
|
@@ -40,6 +40,9 @@ export class Plug extends deviceBase {
|
|
|
40
40
|
device: device & devicesConfig,
|
|
41
41
|
) {
|
|
42
42
|
super(platform, accessory, device);
|
|
43
|
+
// Set category
|
|
44
|
+
accessory.category = this.hap.Categories.OUTLET;
|
|
45
|
+
|
|
43
46
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
44
47
|
this.doPlugUpdate = new Subject();
|
|
45
48
|
this.plugUpdateInProgress = false;
|
|
@@ -54,6 +54,9 @@ export class RobotVacuumCleaner extends deviceBase {
|
|
|
54
54
|
device: device & devicesConfig,
|
|
55
55
|
) {
|
|
56
56
|
super(platform, accessory, device);
|
|
57
|
+
// Set category
|
|
58
|
+
accessory.category = this.hap.Categories.OTHER;
|
|
59
|
+
|
|
57
60
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
58
61
|
this.doRobotVacuumCleanerUpdate = new Subject();
|
|
59
62
|
this.robotVacuumCleanerUpdateInProgress = false;
|
|
@@ -55,6 +55,9 @@ export class WaterDetector extends deviceBase {
|
|
|
55
55
|
device: device & devicesConfig,
|
|
56
56
|
) {
|
|
57
57
|
super(platform, accessory, device);
|
|
58
|
+
// Set category
|
|
59
|
+
accessory.category = this.hap.Categories.SENSOR;
|
|
60
|
+
|
|
58
61
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
59
62
|
this.doWaterDetectorUpdate = new Subject();
|
|
60
63
|
this.WaterDetectorUpdateInProgress = false;
|
|
@@ -56,13 +56,14 @@ export class AirConditioner extends irdeviceBase {
|
|
|
56
56
|
device: irdevice & irDevicesConfig,
|
|
57
57
|
) {
|
|
58
58
|
super(platform, accessory, device);
|
|
59
|
+
// Set category
|
|
60
|
+
accessory.category = this.hap.Categories.AIR_CONDITIONER;
|
|
59
61
|
|
|
60
62
|
// default placeholders
|
|
61
63
|
this.getAirConditionerConfigSettings(accessory, device);
|
|
62
64
|
|
|
63
65
|
this.ValidValues = this.hide_automode ? [1, 2] : [0, 1, 2];
|
|
64
66
|
|
|
65
|
-
|
|
66
67
|
// Initialize HeaterCooler Service
|
|
67
68
|
accessory.context.HeaterCooler = accessory.context.HeaterCooler ?? {};
|
|
68
69
|
this.HeaterCooler = {
|
|
@@ -54,6 +54,8 @@ export class AirPurifier extends irdeviceBase {
|
|
|
54
54
|
device: irdevice & irDevicesConfig,
|
|
55
55
|
) {
|
|
56
56
|
super(platform, accessory, device);
|
|
57
|
+
// Set category
|
|
58
|
+
accessory.category = this.hap.Categories.AIR_PURIFIER;
|
|
57
59
|
|
|
58
60
|
// Initialize AirPurifier Service
|
|
59
61
|
accessory.context.AirPurifier = accessory.context.AirPurifier ?? {};
|
package/src/irdevice/camera.ts
CHANGED
|
@@ -28,6 +28,8 @@ export class Camera extends irdeviceBase {
|
|
|
28
28
|
device: irdevice & irDevicesConfig,
|
|
29
29
|
) {
|
|
30
30
|
super(platform, accessory, device);
|
|
31
|
+
// Set category
|
|
32
|
+
accessory.category = this.hap.Categories.CAMERA;
|
|
31
33
|
|
|
32
34
|
// Initialize Switch Service
|
|
33
35
|
accessory.context.Switch = accessory.context.Switch ?? {};
|
package/src/irdevice/fan.ts
CHANGED
|
@@ -31,6 +31,8 @@ export class IRFan extends irdeviceBase {
|
|
|
31
31
|
device: irdevice & irDevicesConfig,
|
|
32
32
|
) {
|
|
33
33
|
super(platform, accessory, device);
|
|
34
|
+
// Set category
|
|
35
|
+
accessory.category = this.hap.Categories.FAN;
|
|
34
36
|
|
|
35
37
|
// Initialize Switch Service
|
|
36
38
|
accessory.context.Fan = accessory.context.Fan ?? {};
|
package/src/irdevice/light.ts
CHANGED
|
@@ -42,6 +42,8 @@ export class Light extends irdeviceBase {
|
|
|
42
42
|
device: irdevice & irDevicesConfig,
|
|
43
43
|
) {
|
|
44
44
|
super(platform, accessory, device);
|
|
45
|
+
// Set category
|
|
46
|
+
accessory.category = this.hap.Categories.LIGHTBULB;
|
|
45
47
|
|
|
46
48
|
if (!device.irlight?.stateless) {
|
|
47
49
|
// Initialize LightBulb Service
|
package/src/irdevice/other.ts
CHANGED
|
@@ -85,6 +85,8 @@ export class Others extends irdeviceBase {
|
|
|
85
85
|
device: irdevice & irDevicesConfig,
|
|
86
86
|
) {
|
|
87
87
|
super(platform, accessory, device);
|
|
88
|
+
// Set category
|
|
89
|
+
accessory.category = this.hap.Categories.OTHER;
|
|
88
90
|
|
|
89
91
|
// default placeholders
|
|
90
92
|
this.getOtherConfigSettings(device);
|
package/src/irdevice/tv.ts
CHANGED
|
@@ -59,20 +59,20 @@ export class TV extends irdeviceBase {
|
|
|
59
59
|
switch (device.remoteType) {
|
|
60
60
|
case 'Speaker':
|
|
61
61
|
case 'DIY Speaker':
|
|
62
|
-
accessory.category = this.
|
|
62
|
+
accessory.category = this.hap.Categories.SPEAKER;
|
|
63
63
|
break;
|
|
64
64
|
case 'IPTV':
|
|
65
65
|
case 'DIY IPTV':
|
|
66
|
-
accessory.category = this.
|
|
66
|
+
accessory.category = this.hap.Categories.TV_STREAMING_STICK;
|
|
67
67
|
break;
|
|
68
68
|
case 'DVD':
|
|
69
69
|
case 'DIY DVD':
|
|
70
70
|
case 'Set Top Box':
|
|
71
71
|
case 'DIY Set Top Box':
|
|
72
|
-
accessory.category = this.
|
|
72
|
+
accessory.category = this.hap.Categories.TV_SET_TOP_BOX;
|
|
73
73
|
break;
|
|
74
74
|
default:
|
|
75
|
-
accessory.category = this.
|
|
75
|
+
accessory.category = this.hap.Categories.TELEVISION;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
this.Television.Service
|
|
@@ -28,6 +28,8 @@ export class VacuumCleaner extends irdeviceBase {
|
|
|
28
28
|
device: irdevice & irDevicesConfig,
|
|
29
29
|
) {
|
|
30
30
|
super(platform, accessory, device);
|
|
31
|
+
// Set category
|
|
32
|
+
accessory.category = this.hap.Categories.OTHER;
|
|
31
33
|
|
|
32
34
|
// Initialize Switch Service
|
|
33
35
|
accessory.context.Switch = accessory.context.Switch ?? {};
|
|
@@ -28,6 +28,8 @@ export class WaterHeater extends irdeviceBase {
|
|
|
28
28
|
device: irdevice & irDevicesConfig,
|
|
29
29
|
) {
|
|
30
30
|
super(platform, accessory, device);
|
|
31
|
+
// Set category
|
|
32
|
+
accessory.category = this.hap.Categories.FAUCET;
|
|
31
33
|
|
|
32
34
|
// Initialize Switch Service
|
|
33
35
|
accessory.context.Valve = accessory.context.Valve ?? {};
|