homebridge-deconz 0.0.18 → 0.0.19
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.
@@ -47,7 +47,7 @@ class FilterMaintenance extends DeconzService.SensorsResource {
|
|
47
47
|
)
|
48
48
|
}
|
49
49
|
if (state.replacefilter != null) {
|
50
|
-
this.values.filterChange = state.
|
50
|
+
this.values.filterChange = state.replacefilter
|
51
51
|
? this.Characteristics.hap.FilterChangeIndication.CHANGE_FILTER
|
52
52
|
: this.Characteristics.hap.FilterChangeIndication.FILTER_OK
|
53
53
|
}
|
@@ -158,16 +158,6 @@ class AirPurifier extends DeconzService.SensorsResource {
|
|
158
158
|
}
|
159
159
|
|
160
160
|
updateState (state) {
|
161
|
-
if (this.values.filterLifeTime != null && state.filterruntime != null) {
|
162
|
-
this.values.filterLifeLevel = 100 - Math.round(
|
163
|
-
100 * state.filterruntime / this.values.filterLifeTime
|
164
|
-
)
|
165
|
-
}
|
166
|
-
if (state.replacefilter != null) {
|
167
|
-
this.values.filterChange = state.replacefilter
|
168
|
-
? this.Characteristics.hap.FilterChangeIndication.CHANGE_FILTER
|
169
|
-
: this.Characteristics.hap.FilterChangeIndication.FILTER_OK
|
170
|
-
}
|
171
161
|
if (state.speed != null) {
|
172
162
|
this.values.active = state.speed > 0
|
173
163
|
? this.Characteristics.hap.Active.ACTIVE
|
@@ -29,13 +29,13 @@ class Switch extends DeconzService.SensorsResource {
|
|
29
29
|
}
|
30
30
|
|
31
31
|
createButtonServices (resource) {
|
32
|
-
if (resource.body.type
|
32
|
+
if (resource.body.type.endsWith('Switch')) {
|
33
33
|
this.buttonResources[resource.rpath] = {
|
34
34
|
buttonEvent: resource.body.state.buttonevent,
|
35
35
|
lastUpdated: '',
|
36
36
|
toButtonEvent: resource.capabilities.toButtonEvent
|
37
37
|
}
|
38
|
-
} else if (resource.body.type
|
38
|
+
} else if (resource.body.type.endsWith('RelativeRotary')) {
|
39
39
|
const keys = Object.keys(resource.capabilities.buttons)
|
40
40
|
this.buttonResources[resource.rpath] = {
|
41
41
|
lastUpdated: '',
|