homebridge-deconz 1.0.20 → 1.0.22
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/jsdoc.json
CHANGED
@@ -25,9 +25,19 @@ class Alarm extends DeconzService.SensorsResource {
|
|
25
25
|
}
|
26
26
|
|
27
27
|
updateState (state) {
|
28
|
+
if (state.test) {
|
29
|
+
if (this.testTimout) {
|
30
|
+
clearTimeout(this.testTimeout)
|
31
|
+
}
|
32
|
+
this.test = true
|
33
|
+
this.testTimout = setTimeout(() => {
|
34
|
+
delete this.testTimeout
|
35
|
+
this.test = false
|
36
|
+
}, 5000)
|
37
|
+
}
|
28
38
|
if (state.alarm) {
|
29
39
|
this.values.alarm = true
|
30
|
-
} else if (
|
40
|
+
} else if (this.test) {
|
31
41
|
this.values.alarm = true
|
32
42
|
} else {
|
33
43
|
this.values.alarm = false
|
@@ -25,9 +25,19 @@ class CarbonMonoxide extends DeconzService.SensorsResource {
|
|
25
25
|
}
|
26
26
|
|
27
27
|
updateState (state) {
|
28
|
+
if (state.test) {
|
29
|
+
if (this.testTimout) {
|
30
|
+
clearTimeout(this.testTimeout)
|
31
|
+
}
|
32
|
+
this.test = true
|
33
|
+
this.testTimout = setTimeout(() => {
|
34
|
+
delete this.testTimeout
|
35
|
+
this.test = false
|
36
|
+
}, 5000)
|
37
|
+
}
|
28
38
|
if (state.carbonmonoxide) {
|
29
39
|
this.values.carbonmonoxide = this.Characteristics.hap.CarbonMonoxideDetected.CO_LEVELS_ABNORMAL
|
30
|
-
} else if (
|
40
|
+
} else if (this.test) {
|
31
41
|
this.values.carbonmonoxide = this.Characteristics.hap.CarbonMonoxideDetected.CO_LEVELS_ABNORMAL
|
32
42
|
} else {
|
33
43
|
this.values.carbonmonoxide = this.Characteristics.hap.CarbonMonoxideDetected.CO_LEVELS_NORMAL
|
@@ -25,10 +25,22 @@ class Leak extends DeconzService.SensorsResource {
|
|
25
25
|
}
|
26
26
|
|
27
27
|
updateState (state) {
|
28
|
-
if (state.
|
29
|
-
this.
|
30
|
-
|
31
|
-
|
28
|
+
if (state.test) {
|
29
|
+
if (this.testTimout) {
|
30
|
+
clearTimeout(this.testTimeout)
|
31
|
+
}
|
32
|
+
this.test = true
|
33
|
+
this.testTimout = setTimeout(() => {
|
34
|
+
delete this.testTimeout
|
35
|
+
this.test = false
|
36
|
+
}, 5000)
|
37
|
+
}
|
38
|
+
if (state.water) {
|
39
|
+
this.values.leak = this.Characteristics.hap.LeakDetected.LEAK_DETECTED
|
40
|
+
} else if (this.test) {
|
41
|
+
this.values.leak = this.Characteristics.hap.LeakDetected.LEAK_DETECTED
|
42
|
+
} else {
|
43
|
+
this.values.leak = this.Characteristics.hap.LeakDetected.LEAK_NOT_DETECTED
|
32
44
|
}
|
33
45
|
super.updateState(state)
|
34
46
|
}
|
@@ -30,11 +30,21 @@ class Smoke extends DeconzService.SensorsResource {
|
|
30
30
|
}
|
31
31
|
|
32
32
|
updateState (state) {
|
33
|
+
if (state.test) {
|
34
|
+
if (this.testTimout) {
|
35
|
+
clearTimeout(this.testTimeout)
|
36
|
+
}
|
37
|
+
this.test = true
|
38
|
+
this.testTimout = setTimeout(() => {
|
39
|
+
delete this.testTimeout
|
40
|
+
this.test = false
|
41
|
+
}, 5000)
|
42
|
+
}
|
33
43
|
let status = 0
|
34
44
|
if (state.fire) {
|
35
45
|
this.values.smoke = this.Characteristics.hap.SmokeDetected.SMOKE_DETECTED
|
36
46
|
status |= this.Characteristics.eve.ElgatoDeviceStatus.SMOKE_DETECTED
|
37
|
-
} else if (
|
47
|
+
} else if (this.test) {
|
38
48
|
this.values.smoke = this.Characteristics.hap.SmokeDetected.SMOKE_DETECTED
|
39
49
|
status |= this.Characteristics.eve.ElgatoDeviceStatus.ALARM_TEST_ACTIVE
|
40
50
|
} else {
|
package/package.json
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
"ebaauw"
|
8
8
|
],
|
9
9
|
"license": "Apache-2.0",
|
10
|
-
"version": "1.0.
|
10
|
+
"version": "1.0.22",
|
11
11
|
"keywords": [
|
12
12
|
"homebridge-plugin",
|
13
13
|
"homekit",
|
@@ -27,12 +27,12 @@
|
|
27
27
|
},
|
28
28
|
"engines": {
|
29
29
|
"deCONZ": "2.28.1",
|
30
|
-
"homebridge": "^1.8.
|
30
|
+
"homebridge": "^1.8.5||^2.0.0-beta",
|
31
31
|
"node": "^22||^20||^18"
|
32
32
|
},
|
33
33
|
"dependencies": {
|
34
|
-
"hb-deconz-tools": "~2.0.
|
35
|
-
"homebridge-lib": "~7.0
|
34
|
+
"hb-deconz-tools": "~2.0.5",
|
35
|
+
"homebridge-lib": "~7.1.0"
|
36
36
|
},
|
37
37
|
"scripts": {
|
38
38
|
"prepare": "standard && rm -rf out && jsdoc -c jsdoc.json",
|