homebridge-deconz 0.1.0 → 0.1.2
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.
@@ -98,7 +98,9 @@ class Sensor extends DeconzAccessory {
|
|
98
98
|
}
|
99
99
|
if (this.serviceByServiceName.AirQuality != null) {
|
100
100
|
const service = this.serviceByServiceName.AirQuality
|
101
|
-
|
101
|
+
if (service.characteristicDelegate('vocDensity') != null) {
|
102
|
+
params.vocDensityDelegate = service.characteristicDelegate('vocDensity')
|
103
|
+
}
|
102
104
|
}
|
103
105
|
if (this.serviceByServiceName.Flag != null) {
|
104
106
|
const service = this.serviceByServiceName.Flag
|
@@ -37,9 +37,9 @@ class DeconzAccessory extends homebridgeLib.AccessoryDelegate {
|
|
37
37
|
manufacturer: device.resource.manufacturer,
|
38
38
|
model: device.resource.model,
|
39
39
|
firmware: device.resource.firmware,
|
40
|
-
category
|
40
|
+
category,
|
41
|
+
logLevel: gateway.logLevel
|
41
42
|
})
|
42
|
-
this.values.logLevel = gateway.logLevel
|
43
43
|
|
44
44
|
this.context.gid = gateway.id
|
45
45
|
|
@@ -232,7 +232,7 @@ class DeconzAccessory extends homebridgeLib.AccessoryDelegate {
|
|
232
232
|
exposeScenes: this.service.values.exposeScenes,
|
233
233
|
multiClip: undefined,
|
234
234
|
multiLight: undefined,
|
235
|
-
logLevel: this.logLevel,
|
235
|
+
logLevel: this.values.logLevel,
|
236
236
|
lowBatteryThreshold: this.serviceByServiceName.Battery == null
|
237
237
|
? undefined
|
238
238
|
: this.serviceByServiceName.Battery.values.lowBatteryThreshold,
|
@@ -281,7 +281,7 @@ class DeconzAccessory extends homebridgeLib.AccessoryDelegate {
|
|
281
281
|
}
|
282
282
|
break
|
283
283
|
case 'logLevel':
|
284
|
-
value = OptionParser.toInt(key, body[key], 0,
|
284
|
+
value = OptionParser.toInt(key, body[key], 0, 3)
|
285
285
|
this.values[key] = value
|
286
286
|
responseBody[key] = value
|
287
287
|
continue
|
@@ -82,6 +82,17 @@ class Light extends DeconzService.LightsResource {
|
|
82
82
|
})
|
83
83
|
}
|
84
84
|
|
85
|
+
if (
|
86
|
+
this.resource.body.config != null &&
|
87
|
+
this.resource.body.config.color != null &&
|
88
|
+
this.resource.body.config.color.execute_if_off != null
|
89
|
+
) {
|
90
|
+
this.addCharacteristicDelegate({
|
91
|
+
key: 'colorExecuteIfOff',
|
92
|
+
value: this.resource.body.config.color.execute_if_off
|
93
|
+
})
|
94
|
+
}
|
95
|
+
|
85
96
|
if (this.capabilities.ct) {
|
86
97
|
this.colorTemperatureDelegate = this.addCharacteristicDelegate({
|
87
98
|
key: 'colorTemperature',
|
@@ -431,6 +442,21 @@ class Light extends DeconzService.LightsResource {
|
|
431
442
|
super.updateState(state)
|
432
443
|
}
|
433
444
|
|
445
|
+
updateConfig (config) {
|
446
|
+
for (const key in config) {
|
447
|
+
const value = config[key]
|
448
|
+
switch (key) {
|
449
|
+
case 'color':
|
450
|
+
if (value.execute_if_off != null) {
|
451
|
+
this.values.colorExecuteIfOff = value.execute_if_off
|
452
|
+
}
|
453
|
+
break
|
454
|
+
default:
|
455
|
+
break
|
456
|
+
}
|
457
|
+
}
|
458
|
+
}
|
459
|
+
|
434
460
|
updateScenes (scenes) {
|
435
461
|
const sceneById = {}
|
436
462
|
for (const scene of scenes) {
|
@@ -500,10 +526,15 @@ class Light extends DeconzService.LightsResource {
|
|
500
526
|
if (
|
501
527
|
this.adaptiveLighting == null || // not supported
|
502
528
|
this.values.activeTransitionCount === 0 // disabled
|
503
|
-
// !this.values.on // light is off
|
504
529
|
) {
|
505
530
|
return
|
506
531
|
}
|
532
|
+
if (!this.values.on && !this.values.colorExecuteIfOff) {
|
533
|
+
if (this.values.colorExecuteIfOff != null && !this.values.colorExecuteIfOff) {
|
534
|
+
this.values.colorExecuteIfOff = true
|
535
|
+
}
|
536
|
+
return
|
537
|
+
}
|
507
538
|
const ct = this.adaptiveLighting.getCt(
|
508
539
|
this.values.brightness * this.gateway.values.brightnessAdjustment
|
509
540
|
)
|
@@ -78,7 +78,7 @@ class Switch extends DeconzService.SensorsResource {
|
|
78
78
|
if (this.buttonServices[i] != null) {
|
79
79
|
this.buttonServices[i].update(
|
80
80
|
buttonResource.buttonEvent, oldValue,
|
81
|
-
this.accessoryDelegate.settingsService.values.repeat
|
81
|
+
false // this.accessoryDelegate.settingsService.values.repeat
|
82
82
|
)
|
83
83
|
}
|
84
84
|
} else {
|