@switchbot/homebridge-switchbot 3.5.0-beta.26 → 3.5.0-beta.27
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 +17 -14
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/bot.js +13 -13
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.js +3 -3
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.js +3 -3
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.js +5 -5
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +12 -12
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/hub.d.ts.map +1 -1
- package/dist/device/hub.js +6 -6
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.js +4 -4
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.js +5 -5
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.js +3 -3
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.js +6 -6
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.js +5 -5
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.js +5 -5
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.js +5 -6
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.js +3 -3
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.js +4 -4
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/device/waterdetector.d.ts.map +1 -1
- package/dist/device/waterdetector.js +9 -16
- package/dist/device/waterdetector.js.map +1 -1
- package/dist/irdevice/airconditioner.d.ts +4 -14
- package/dist/irdevice/airconditioner.d.ts.map +1 -1
- package/dist/irdevice/airconditioner.js +226 -234
- package/dist/irdevice/airconditioner.js.map +1 -1
- package/dist/irdevice/airpurifier.d.ts +3 -6
- package/dist/irdevice/airpurifier.d.ts.map +1 -1
- package/dist/irdevice/airpurifier.js +65 -56
- package/dist/irdevice/airpurifier.js.map +1 -1
- package/dist/irdevice/camera.d.ts +2 -3
- package/dist/irdevice/camera.d.ts.map +1 -1
- package/dist/irdevice/camera.js +24 -27
- package/dist/irdevice/camera.js.map +1 -1
- package/dist/irdevice/fan.d.ts +2 -7
- package/dist/irdevice/fan.d.ts.map +1 -1
- package/dist/irdevice/fan.js +57 -61
- 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 +1 -1
- package/dist/irdevice/light.d.ts.map +1 -1
- package/dist/irdevice/light.js +13 -15
- package/dist/irdevice/light.js.map +1 -1
- package/dist/irdevice/other.js +51 -50
- package/dist/irdevice/other.js.map +1 -1
- package/dist/irdevice/tv.js +2 -2
- package/dist/irdevice/tv.js.map +1 -1
- package/dist/irdevice/vacuumcleaner.js +1 -1
- package/dist/irdevice/vacuumcleaner.js.map +1 -1
- package/dist/irdevice/waterheater.js +1 -1
- package/dist/irdevice/waterheater.js.map +1 -1
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +22 -1
- package/dist/platform.js.map +1 -1
- package/package.json +2 -2
- package/src/custom.d.ts +1 -0
- package/src/device/blindtilt.ts +20 -18
- package/src/device/bot.ts +14 -14
- package/src/device/ceilinglight.ts +4 -4
- package/src/device/colorbulb.ts +4 -4
- package/src/device/contact.ts +6 -6
- package/src/device/curtain.ts +14 -13
- package/src/device/hub.ts +7 -6
- package/src/device/humidifier.ts +5 -5
- package/src/device/iosensor.ts +6 -6
- package/src/device/lightstrip.ts +4 -4
- package/src/device/lock.ts +7 -7
- package/src/device/meter.ts +6 -6
- package/src/device/meterplus.ts +6 -6
- package/src/device/motion.ts +6 -6
- package/src/device/plug.ts +4 -4
- package/src/device/robotvacuumcleaner.ts +5 -5
- package/src/device/waterdetector.ts +9 -17
- package/src/irdevice/airconditioner.ts +239 -238
- package/src/irdevice/airpurifier.ts +75 -56
- package/src/irdevice/camera.ts +27 -27
- package/src/irdevice/fan.ts +63 -63
- package/src/irdevice/irdevice.ts +1 -1
- package/src/irdevice/light.ts +17 -15
- package/src/irdevice/other.ts +51 -51
- package/src/irdevice/tv.ts +2 -2
- package/src/irdevice/vacuumcleaner.ts +1 -1
- package/src/irdevice/waterheater.ts +1 -1
- package/src/platform.ts +21 -4
|
@@ -38,23 +38,23 @@ export class RobotVacuumCleaner extends deviceBase {
|
|
|
38
38
|
this.doRobotVacuumCleanerUpdate = new Subject();
|
|
39
39
|
this.robotVacuumCleanerUpdateInProgress = false;
|
|
40
40
|
|
|
41
|
-
// Retrieve initial values and updateHomekit
|
|
42
|
-
this.refreshStatus();
|
|
43
|
-
|
|
44
41
|
// Initialize Lightbulb property
|
|
45
42
|
this.LightBulb = {
|
|
46
|
-
Service:
|
|
43
|
+
Service: accessory.getService(this.hap.Service.Lightbulb)!,
|
|
47
44
|
On: accessory.context.On || false,
|
|
48
45
|
Brightness: accessory.context.Brightness || 0,
|
|
49
46
|
};
|
|
50
47
|
|
|
51
48
|
// Initialize Battery property
|
|
52
49
|
this.Battery = {
|
|
53
|
-
Service:
|
|
50
|
+
Service: accessory.getService(this.hap.Service.Battery)!,
|
|
54
51
|
BatteryLevel: accessory.context.BatteryLevel || 100,
|
|
55
52
|
StatusLowBattery: accessory.context.StatusLowBattery || this.hap.Characteristic.StatusLowBattery.BATTERY_LEVEL_NORMAL,
|
|
56
53
|
};
|
|
57
54
|
|
|
55
|
+
// Retrieve initial values and updateHomekit
|
|
56
|
+
this.refreshStatus();
|
|
57
|
+
|
|
58
58
|
// get the Lightbulb service if it exists, otherwise create a new Lightbulb service
|
|
59
59
|
// you can create multiple services for each accessory
|
|
60
60
|
const LightBulbService = `${accessory.displayName} ${device.deviceType}`;
|
|
@@ -46,33 +46,25 @@ export class WaterDetector extends deviceBase {
|
|
|
46
46
|
this.doWaterDetectorUpdate = new Subject();
|
|
47
47
|
this.WaterDetectorUpdateInProgress = false;
|
|
48
48
|
|
|
49
|
-
// Retrieve initial values and updateHomekit
|
|
50
|
-
this.refreshStatus();
|
|
51
|
-
|
|
52
49
|
// Initialize Battery property
|
|
53
50
|
this.Battery = {
|
|
54
|
-
Service:
|
|
55
|
-
BatteryLevel:
|
|
56
|
-
StatusLowBattery:
|
|
57
|
-
ChargingState:
|
|
51
|
+
Service: accessory.getService(this.hap.Service.Battery)!,
|
|
52
|
+
BatteryLevel: accessory.context.BatteryLevel || 100,
|
|
53
|
+
StatusLowBattery: accessory.context.StatusLowBattery || this.hap.Characteristic.StatusLowBattery.BATTERY_LEVEL_NORMAL,
|
|
54
|
+
ChargingState: accessory.context.ChargingState || this.hap.Characteristic.ChargingState.NOT_CHARGEABLE,
|
|
58
55
|
};
|
|
59
56
|
|
|
60
57
|
// Initialize Leak Sensor property
|
|
61
58
|
if (!this.device.waterdetector?.hide_leak) {
|
|
62
59
|
this.LeakSensor = {
|
|
63
|
-
Service:
|
|
64
|
-
StatusActive:
|
|
65
|
-
LeakDetected:
|
|
60
|
+
Service: accessory.getService(this.hap.Service.LeakSensor)!,
|
|
61
|
+
StatusActive: accessory.context.StatusActive || false,
|
|
62
|
+
LeakDetected: accessory.context.LeakDetected || this.hap.Characteristic.LeakDetected.LEAK_NOT_DETECTED,
|
|
66
63
|
};
|
|
67
64
|
}
|
|
68
65
|
|
|
69
|
-
//
|
|
70
|
-
|
|
71
|
-
.getService(this.hap.Service.AccessoryInformation)!
|
|
72
|
-
.setCharacteristic(this.hap.Characteristic.Manufacturer, 'SwitchBot')
|
|
73
|
-
.setCharacteristic(this.hap.Characteristic.Model, 'WoWaterDetector')
|
|
74
|
-
.setCharacteristic(this.hap.Characteristic.SerialNumber, device.deviceId)
|
|
75
|
-
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, accessory.context.FirmwareRevision);
|
|
66
|
+
// Retrieve initial values and updateHomekit
|
|
67
|
+
this.refreshStatus();
|
|
76
68
|
|
|
77
69
|
// Leak Sensor Service
|
|
78
70
|
if (device.waterdetector?.hide_leak) {
|