@switchbot/homebridge-switchbot 3.5.0-beta.56 → 3.5.0-beta.57
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.js.map +1 -1
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/fan.js.map +1 -1
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +15 -2
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/device/waterdetector.js.map +1 -1
- package/dist/irdevice/airconditioner.js.map +1 -1
- package/dist/irdevice/airpurifier.js.map +1 -1
- package/dist/irdevice/camera.js.map +1 -1
- package/dist/irdevice/fan.js.map +1 -1
- package/dist/irdevice/light.js.map +1 -1
- package/dist/irdevice/other.js.map +1 -1
- package/dist/irdevice/tv.js.map +1 -1
- package/dist/irdevice/vacuumcleaner.js.map +1 -1
- package/dist/irdevice/waterheater.js.map +1 -1
- package/package.json +1 -1
- package/src/device/blindtilt.ts +3 -3
- package/src/device/bot.ts +11 -11
- package/src/device/ceilinglight.ts +1 -1
- package/src/device/colorbulb.ts +1 -1
- package/src/device/contact.ts +3 -3
- package/src/device/curtain.ts +3 -3
- package/src/device/fan.ts +2 -2
- package/src/device/hub.ts +3 -3
- package/src/device/humidifier.ts +2 -2
- package/src/device/iosensor.ts +3 -3
- package/src/device/lightstrip.ts +1 -1
- package/src/device/lock.ts +4 -4
- package/src/device/meter.ts +3 -3
- package/src/device/meterplus.ts +3 -3
- package/src/device/motion.ts +18 -3
- package/src/device/plug.ts +1 -1
- package/src/device/robotvacuumcleaner.ts +2 -2
- package/src/device/waterdetector.ts +2 -2
- package/src/irdevice/airconditioner.ts +2 -2
- package/src/irdevice/airpurifier.ts +2 -2
- package/src/irdevice/camera.ts +1 -1
- package/src/irdevice/fan.ts +1 -1
- package/src/irdevice/light.ts +1 -1
- package/src/irdevice/other.ts +10 -10
- package/src/irdevice/tv.ts +2 -2
- package/src/irdevice/vacuumcleaner.ts +1 -1
- package/src/irdevice/waterheater.ts +1 -1
|
@@ -58,7 +58,7 @@ export class AirConditioner extends irdeviceBase {
|
|
|
58
58
|
|
|
59
59
|
// Initialize HeaterCooler property
|
|
60
60
|
this.HeaterCooler = {
|
|
61
|
-
Service: accessory.getService(this.hap.Service.Switch)
|
|
61
|
+
Service: accessory.getService(this.hap.Service.Switch) as Service,
|
|
62
62
|
Active: accessory.context.Active || this.hap.Characteristic.Active.INACTIVE,
|
|
63
63
|
CurrentHeaterCoolerState: accessory.context.CurrentHeaterCoolerState || this.hap.Characteristic.CurrentHeaterCoolerState.IDLE,
|
|
64
64
|
TargetHeaterCoolerState: accessory.context.TargetHeaterCoolerState || this.hap.Characteristic.TargetHeaterCoolerState.AUTO,
|
|
@@ -72,7 +72,7 @@ export class AirConditioner extends irdeviceBase {
|
|
|
72
72
|
const meterUuid = this.platform.api.hap.uuid.generate(`${this.device.irair.meterId}-${this.device.irair.meterType}`);
|
|
73
73
|
this.meter = this.platform.accessories.find((accessory) => accessory.UUID === meterUuid);
|
|
74
74
|
this.HumiditySensor = {
|
|
75
|
-
Service: this.meter!.getService(this.hap.Service.HumiditySensor)
|
|
75
|
+
Service: this.meter!.getService(this.hap.Service.HumiditySensor) as Service,
|
|
76
76
|
CurrentRelativeHumidity: this.meter!.context.CurrentRelativeHumidity || 0,
|
|
77
77
|
};
|
|
78
78
|
}
|
|
@@ -54,7 +54,7 @@ export class AirPurifier extends irdeviceBase {
|
|
|
54
54
|
|
|
55
55
|
// Initialize AirPurifier property
|
|
56
56
|
this.AirPurifier = {
|
|
57
|
-
Service: accessory.getService(this.hap.Service.Switch)
|
|
57
|
+
Service: accessory.getService(this.hap.Service.Switch) as Service,
|
|
58
58
|
Active: accessory.context.Active || this.hap.Characteristic.Active.INACTIVE,
|
|
59
59
|
RotationSpeed: accessory.context.RotationSpeed || 0,
|
|
60
60
|
CurrentAirPurifierState: accessory.context.CurrentAirPurifierState || this.hap.Characteristic.CurrentAirPurifierState.INACTIVE,
|
|
@@ -63,7 +63,7 @@ export class AirPurifier extends irdeviceBase {
|
|
|
63
63
|
|
|
64
64
|
// Initialize TemperatureSensor property
|
|
65
65
|
this.TemperatureSensor = {
|
|
66
|
-
Service: accessory.getService(this.hap.Service.TemperatureSensor)
|
|
66
|
+
Service: accessory.getService(this.hap.Service.TemperatureSensor) as Service,
|
|
67
67
|
CurrentTemperature: accessory.context.CurrentTemperature || 24,
|
|
68
68
|
};
|
|
69
69
|
|
package/src/irdevice/camera.ts
CHANGED
|
@@ -29,7 +29,7 @@ export class Camera extends irdeviceBase {
|
|
|
29
29
|
|
|
30
30
|
// Initialize Switch property
|
|
31
31
|
this.Switch = {
|
|
32
|
-
Service: accessory.getService(this.hap.Service.Switch)
|
|
32
|
+
Service: accessory.getService(this.hap.Service.Switch) as Service,
|
|
33
33
|
On: accessory.context.On || false,
|
|
34
34
|
};
|
|
35
35
|
|
package/src/irdevice/fan.ts
CHANGED
|
@@ -37,7 +37,7 @@ export class IRFan extends irdeviceBase {
|
|
|
37
37
|
|
|
38
38
|
// Initialize Switch property
|
|
39
39
|
this.Fan = {
|
|
40
|
-
Service: accessory.getService(this.hap.Service.Lightbulb)
|
|
40
|
+
Service: accessory.getService(this.hap.Service.Lightbulb) as Service,
|
|
41
41
|
Active: accessory.context.Active || this.hap.Characteristic.Active.INACTIVE,
|
|
42
42
|
SwingMode: accessory.context.SwingMode || this.hap.Characteristic.SwingMode.SWING_DISABLED,
|
|
43
43
|
RotationSpeed: accessory.context.RotationSpeed || 0,
|
package/src/irdevice/light.ts
CHANGED
|
@@ -40,7 +40,7 @@ export class Light extends irdeviceBase {
|
|
|
40
40
|
if (!device.irlight?.stateless) {
|
|
41
41
|
// Initialize LightBulb property
|
|
42
42
|
this.LightBulb = {
|
|
43
|
-
Service: accessory.getService(this.hap.Service.Lightbulb)
|
|
43
|
+
Service: accessory.getService(this.hap.Service.Lightbulb) as Service,
|
|
44
44
|
On: accessory.context.On || false,
|
|
45
45
|
};
|
|
46
46
|
// get the Light service if it exists, otherwise create a new Light service
|
package/src/irdevice/other.ts
CHANGED
|
@@ -82,7 +82,7 @@ export class Others extends irdeviceBase {
|
|
|
82
82
|
if (this.otherDeviceType === 'switch') {
|
|
83
83
|
// Initialize Switch property
|
|
84
84
|
this.Switch = {
|
|
85
|
-
Service: accessory.getService(this.hap.Service.Switch)
|
|
85
|
+
Service: accessory.getService(this.hap.Service.Switch) as Service,
|
|
86
86
|
On: accessory.context.On || false,
|
|
87
87
|
};
|
|
88
88
|
this.removeFanService(accessory);
|
|
@@ -106,7 +106,7 @@ export class Others extends irdeviceBase {
|
|
|
106
106
|
} else if (this.otherDeviceType === 'garagedoor') {
|
|
107
107
|
// Initialize Garage Door property
|
|
108
108
|
this.GarageDoor = {
|
|
109
|
-
Service: accessory.getService(this.hap.Service.GarageDoorOpener)
|
|
109
|
+
Service: accessory.getService(this.hap.Service.GarageDoorOpener) as Service,
|
|
110
110
|
On: accessory.context.On || false,
|
|
111
111
|
};
|
|
112
112
|
this.removeFanService(accessory);
|
|
@@ -131,7 +131,7 @@ export class Others extends irdeviceBase {
|
|
|
131
131
|
} else if (this.otherDeviceType === 'door') {
|
|
132
132
|
// Initialize Door property
|
|
133
133
|
this.Door = {
|
|
134
|
-
Service: accessory.getService(this.hap.Service.Door)
|
|
134
|
+
Service: accessory.getService(this.hap.Service.Door) as Service,
|
|
135
135
|
On: accessory.context.On || false,
|
|
136
136
|
};
|
|
137
137
|
this.removeFanService(accessory);
|
|
@@ -164,7 +164,7 @@ export class Others extends irdeviceBase {
|
|
|
164
164
|
} else if (this.otherDeviceType === 'window') {
|
|
165
165
|
// Initialize Window property
|
|
166
166
|
this.Window = {
|
|
167
|
-
Service: accessory.getService(this.hap.Service.Window)
|
|
167
|
+
Service: accessory.getService(this.hap.Service.Window) as Service,
|
|
168
168
|
On: accessory.context.On || false,
|
|
169
169
|
};
|
|
170
170
|
this.removeFanService(accessory);
|
|
@@ -197,7 +197,7 @@ export class Others extends irdeviceBase {
|
|
|
197
197
|
} else if (this.otherDeviceType === 'windowcovering') {
|
|
198
198
|
// Initialize WindowCovering property
|
|
199
199
|
this.WindowCovering = {
|
|
200
|
-
Service: accessory.getService(this.hap.Service.WindowCovering)
|
|
200
|
+
Service: accessory.getService(this.hap.Service.WindowCovering) as Service,
|
|
201
201
|
On: accessory.context.On || false,
|
|
202
202
|
};
|
|
203
203
|
this.removeFanService(accessory);
|
|
@@ -230,7 +230,7 @@ export class Others extends irdeviceBase {
|
|
|
230
230
|
} else if (this.otherDeviceType === 'lock') {
|
|
231
231
|
// Initialize Lock property
|
|
232
232
|
this.Lock = {
|
|
233
|
-
Service: accessory.getService(this.hap.Service.LockMechanism)
|
|
233
|
+
Service: accessory.getService(this.hap.Service.LockMechanism) as Service,
|
|
234
234
|
On: accessory.context.On || false,
|
|
235
235
|
};
|
|
236
236
|
this.removeFanService(accessory);
|
|
@@ -254,7 +254,7 @@ export class Others extends irdeviceBase {
|
|
|
254
254
|
} else if (this.otherDeviceType === 'faucet') {
|
|
255
255
|
// Initialize Faucet property
|
|
256
256
|
this.Faucet = {
|
|
257
|
-
Service: accessory.getService(this.hap.Service.Faucet)
|
|
257
|
+
Service: accessory.getService(this.hap.Service.Faucet) as Service,
|
|
258
258
|
On: accessory.context.On || false,
|
|
259
259
|
};
|
|
260
260
|
this.removeFanService(accessory);
|
|
@@ -278,7 +278,7 @@ export class Others extends irdeviceBase {
|
|
|
278
278
|
} else if (this.otherDeviceType === 'fan') {
|
|
279
279
|
// Initialize Fan property
|
|
280
280
|
this.Fan = {
|
|
281
|
-
Service: accessory.getService(this.hap.Service.Fanv2)
|
|
281
|
+
Service: accessory.getService(this.hap.Service.Fanv2) as Service,
|
|
282
282
|
On: accessory.context.On || false,
|
|
283
283
|
};
|
|
284
284
|
this.removeLockService(accessory);
|
|
@@ -302,7 +302,7 @@ export class Others extends irdeviceBase {
|
|
|
302
302
|
} else if (this.otherDeviceType === 'stateful') {
|
|
303
303
|
// Initialize StatefulProgrammableSwitch property
|
|
304
304
|
this.StatefulProgrammableSwitch = {
|
|
305
|
-
Service: accessory.getService(this.hap.Service.StatefulProgrammableSwitch)
|
|
305
|
+
Service: accessory.getService(this.hap.Service.StatefulProgrammableSwitch) as Service,
|
|
306
306
|
On: accessory.context.On || false,
|
|
307
307
|
};
|
|
308
308
|
this.removeFanService(accessory);
|
|
@@ -328,7 +328,7 @@ export class Others extends irdeviceBase {
|
|
|
328
328
|
} else {
|
|
329
329
|
// Initialize Outlet property
|
|
330
330
|
this.Outlet = {
|
|
331
|
-
Service: accessory.getService(this.hap.Service.Outlet)
|
|
331
|
+
Service: accessory.getService(this.hap.Service.Outlet) as Service,
|
|
332
332
|
On: accessory.context.On || false,
|
|
333
333
|
};
|
|
334
334
|
this.removeFanService(accessory);
|
package/src/irdevice/tv.ts
CHANGED
|
@@ -41,7 +41,7 @@ export class TV extends irdeviceBase {
|
|
|
41
41
|
|
|
42
42
|
// Initialize Television property
|
|
43
43
|
this.Television = {
|
|
44
|
-
Service: accessory.getService(this.hap.Service.Television)
|
|
44
|
+
Service: accessory.getService(this.hap.Service.Television) as Service,
|
|
45
45
|
Active: accessory.context.Active || this.hap.Characteristic.Active.INACTIVE,
|
|
46
46
|
ActiveIdentifier: accessory.context.ActiveIdentifier || 1,
|
|
47
47
|
SleepDiscoveryMode: accessory.context.SleepDiscoveryMode || this.hap.Characteristic.SleepDiscoveryMode.ALWAYS_DISCOVERABLE,
|
|
@@ -50,7 +50,7 @@ export class TV extends irdeviceBase {
|
|
|
50
50
|
|
|
51
51
|
// Initialize TelevisionSpeaker property
|
|
52
52
|
this.TelevisionSpeaker = {
|
|
53
|
-
Service: accessory.getService(this.hap.Service.TelevisionSpeaker)
|
|
53
|
+
Service: accessory.getService(this.hap.Service.TelevisionSpeaker) as Service,
|
|
54
54
|
Active: accessory.context.Active || false,
|
|
55
55
|
VolumeControlType: accessory.context.VolumeControlType || this.hap.Characteristic.VolumeControlType.ABSOLUTE,
|
|
56
56
|
VolumeSelector: accessory.context.VolumeSelector || this.hap.Characteristic.VolumeSelector.INCREMENT,
|
|
@@ -29,7 +29,7 @@ export class VacuumCleaner extends irdeviceBase {
|
|
|
29
29
|
|
|
30
30
|
// Initialize Switch property
|
|
31
31
|
this.Switch = {
|
|
32
|
-
Service: accessory.getService(this.hap.Service.Switch)
|
|
32
|
+
Service: accessory.getService(this.hap.Service.Switch) as Service,
|
|
33
33
|
On: accessory.context.On || false,
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -29,7 +29,7 @@ export class WaterHeater extends irdeviceBase {
|
|
|
29
29
|
|
|
30
30
|
// Initialize Valve property
|
|
31
31
|
this.Valve = {
|
|
32
|
-
Service: accessory.getService(this.hap.Service.Valve)
|
|
32
|
+
Service: accessory.getService(this.hap.Service.Valve) as Service,
|
|
33
33
|
Active: accessory.context.Active || this.hap.Characteristic.Active.INACTIVE,
|
|
34
34
|
};
|
|
35
35
|
|