@switchbot/homebridge-switchbot 3.5.1-beta.14 → 3.5.1-beta.16
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/device.js +1 -1
- package/dist/device/device.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/irdevice.js +1 -1
- package/dist/irdevice/irdevice.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/device.ts +1 -1
- 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/irdevice.ts +1 -1
- 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/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/irdevice.ts
CHANGED
|
@@ -44,7 +44,7 @@ export abstract class irdeviceBase {
|
|
|
44
44
|
.setCharacteristic(this.hap.Characteristic.Manufacturer, 'SwitchBot')
|
|
45
45
|
.setCharacteristic(this.hap.Characteristic.AppMatchingIdentifier, 'id1087374760')
|
|
46
46
|
.setCharacteristic(this.hap.Characteristic.Name, accessory.context.name ?? accessory.displayName)
|
|
47
|
-
.setCharacteristic(this.hap.Characteristic.ConfiguredName,
|
|
47
|
+
.setCharacteristic(this.hap.Characteristic.ConfiguredName, device.deviceName)
|
|
48
48
|
.setCharacteristic(this.hap.Characteristic.Model, accessory.context.model ?? 'Unknown')
|
|
49
49
|
.setCharacteristic(this.hap.Characteristic.ProductData, accessory.context.deviceId)
|
|
50
50
|
.setCharacteristic(this.hap.Characteristic.SerialNumber, accessory.context.deviceId);
|
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 ?? {};
|