homebridge-lib 7.0.0 → 7.0.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.
|
@@ -150,6 +150,10 @@ class TotalConsumptionValue extends HistoryValue {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
prepareEntry (entry) {
|
|
153
|
+
if (this._delegate.value < this._parent.values.consumption) {
|
|
154
|
+
// Total consumption has been reset
|
|
155
|
+
this._parent.values.consumption = 0
|
|
156
|
+
}
|
|
153
157
|
const consumption =
|
|
154
158
|
(this._delegate.value - this._parent.values.consumption) * 1000 * 3600 // Ws
|
|
155
159
|
const period = entry.time - this._parent.values.time // s
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Library for homebridge plugins",
|
|
4
4
|
"author": "Erik Baauw",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
-
"version": "7.0.
|
|
6
|
+
"version": "7.0.2",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"homekit",
|
|
9
9
|
"homebridge"
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
29
|
"homebridge": "^1.8.1",
|
|
30
|
-
"node": "20.
|
|
30
|
+
"node": "20.14.0||^20||^18"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@homebridge/plugin-ui-utils": "~1.0.3",
|
|
34
|
-
"hb-lib-tools": "~2.0.
|
|
34
|
+
"hb-lib-tools": "~2.0.2"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"prepare": "standard && rm -rf out && jsdoc -c jsdoc.json",
|