@switchbot/homebridge-switchbot 3.5.0-beta.35 → 3.5.0-beta.37
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 +8 -6
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/bot.d.ts.map +1 -1
- package/dist/device/bot.js +8 -6
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.d.ts.map +1 -1
- package/dist/device/ceilinglight.js +8 -6
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +8 -6
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.d.ts.map +1 -1
- package/dist/device/contact.js +8 -6
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +8 -6
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/device.d.ts.map +1 -1
- package/dist/device/device.js +57 -43
- package/dist/device/device.js.map +1 -1
- package/dist/device/fan.d.ts.map +1 -1
- package/dist/device/fan.js +16 -12
- package/dist/device/fan.js.map +1 -1
- package/dist/device/hub.d.ts.map +1 -1
- package/dist/device/hub.js +8 -6
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +8 -6
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.d.ts.map +1 -1
- package/dist/device/iosensor.js +8 -6
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.d.ts.map +1 -1
- package/dist/device/lightstrip.js +8 -6
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +8 -6
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.d.ts.map +1 -1
- package/dist/device/meter.js +8 -6
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.d.ts.map +1 -1
- package/dist/device/meterplus.js +8 -6
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +8 -6
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +8 -6
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
- package/dist/device/robotvacuumcleaner.js +8 -6
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/device/waterdetector.d.ts.map +1 -1
- package/dist/device/waterdetector.js +8 -6
- package/dist/device/waterdetector.js.map +1 -1
- package/package.json +1 -1
- package/src/device/blindtilt.ts +4 -2
- package/src/device/bot.ts +32 -30
- package/src/device/ceilinglight.ts +8 -6
- package/src/device/colorbulb.ts +8 -6
- package/src/device/contact.ts +8 -6
- package/src/device/curtain.ts +8 -6
- package/src/device/device.ts +60 -45
- package/src/device/fan.ts +16 -12
- package/src/device/hub.ts +10 -8
- package/src/device/humidifier.ts +8 -6
- package/src/device/iosensor.ts +8 -6
- package/src/device/lightstrip.ts +8 -6
- package/src/device/lock.ts +8 -6
- package/src/device/meter.ts +8 -6
- package/src/device/meterplus.ts +8 -6
- package/src/device/motion.ts +8 -6
- package/src/device/plug.ts +8 -6
- package/src/device/robotvacuumcleaner.ts +8 -6
- package/src/device/waterdetector.ts +8 -6
package/src/device/meter.ts
CHANGED
|
@@ -224,12 +224,14 @@ export class Meter extends deviceBase {
|
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
// FirmwareRevision
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
227
|
+
if (deviceStatus.body.version) {
|
|
228
|
+
this.accessory.context.FirmwareRevision = deviceStatus.body.version;
|
|
229
|
+
this.accessory
|
|
230
|
+
.getService(this.hap.Service.AccessoryInformation)!
|
|
231
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.FirmwareRevision)
|
|
232
|
+
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
233
|
+
.updateValue(this.accessory.context.FirmwareRevision);
|
|
234
|
+
}
|
|
233
235
|
}
|
|
234
236
|
|
|
235
237
|
/**
|
package/src/device/meterplus.ts
CHANGED
|
@@ -225,12 +225,14 @@ export class MeterPlus extends deviceBase {
|
|
|
225
225
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Temperature: ${this.TemperatureSensor!.CurrentTemperature}°c`);
|
|
226
226
|
}
|
|
227
227
|
// FirmwareRevision
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
228
|
+
if (deviceStatus.body.version) {
|
|
229
|
+
this.accessory.context.FirmwareRevision = deviceStatus.body.version;
|
|
230
|
+
this.accessory
|
|
231
|
+
.getService(this.hap.Service.AccessoryInformation)!
|
|
232
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.FirmwareRevision)
|
|
233
|
+
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
234
|
+
.updateValue(this.accessory.context.FirmwareRevision);
|
|
235
|
+
}
|
|
234
236
|
}
|
|
235
237
|
|
|
236
238
|
/**
|
package/src/device/motion.ts
CHANGED
|
@@ -200,12 +200,14 @@ export class Motion extends deviceBase {
|
|
|
200
200
|
+ ` StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
201
201
|
|
|
202
202
|
// FirmwareRevision
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
203
|
+
if (deviceStatus.body.version) {
|
|
204
|
+
this.accessory.context.FirmwareRevision = deviceStatus.body.version;
|
|
205
|
+
this.accessory
|
|
206
|
+
.getService(this.hap.Service.AccessoryInformation)!
|
|
207
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.FirmwareRevision)
|
|
208
|
+
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
209
|
+
.updateValue(this.accessory.context.FirmwareRevision);
|
|
210
|
+
}
|
|
209
211
|
}
|
|
210
212
|
|
|
211
213
|
/**
|
package/src/device/plug.ts
CHANGED
|
@@ -130,12 +130,14 @@ export class Plug extends deviceBase {
|
|
|
130
130
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} On: ${this.Outlet.On}`);
|
|
131
131
|
|
|
132
132
|
// FirmwareRevision
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
133
|
+
if (deviceStatus.body.version) {
|
|
134
|
+
this.accessory.context.FirmwareRevision = deviceStatus.body.version;
|
|
135
|
+
this.accessory
|
|
136
|
+
.getService(this.hap.Service.AccessoryInformation)!
|
|
137
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.FirmwareRevision)
|
|
138
|
+
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
139
|
+
.updateValue(this.accessory.context.FirmwareRevision);
|
|
140
|
+
}
|
|
139
141
|
}
|
|
140
142
|
|
|
141
143
|
/**
|
|
@@ -199,12 +199,14 @@ export class RobotVacuumCleaner extends deviceBase {
|
|
|
199
199
|
+ ` StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
200
200
|
|
|
201
201
|
// FirmwareRevision
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
202
|
+
if (deviceStatus.body.version) {
|
|
203
|
+
this.accessory.context.FirmwareRevision = deviceStatus.body.version;
|
|
204
|
+
this.accessory
|
|
205
|
+
.getService(this.hap.Service.AccessoryInformation)!
|
|
206
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.FirmwareRevision)
|
|
207
|
+
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
208
|
+
.updateValue(this.accessory.context.FirmwareRevision);
|
|
209
|
+
}
|
|
208
210
|
}
|
|
209
211
|
|
|
210
212
|
/**
|
|
@@ -166,12 +166,14 @@ export class WaterDetector extends deviceBase {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
// FirmwareRevision
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
169
|
+
if (deviceStatus.body.version) {
|
|
170
|
+
this.accessory.context.FirmwareRevision = deviceStatus.body.version;
|
|
171
|
+
this.accessory
|
|
172
|
+
.getService(this.hap.Service.AccessoryInformation)!
|
|
173
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.FirmwareRevision)
|
|
174
|
+
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
175
|
+
.updateValue(this.accessory.context.FirmwareRevision);
|
|
176
|
+
}
|
|
175
177
|
}
|
|
176
178
|
|
|
177
179
|
async refreshStatus(): Promise<void> {
|