homebridge-lib 6.2.1 → 6.2.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.
@@ -75,9 +75,9 @@ class Power extends History {
75
75
  this._runningConsumption = 0 // 10-min-interval running value
76
76
  this._totalConsumption = params.consumptionDelegate.value // life-time value
77
77
  this._power = params.powerDelegate.value // current power
78
- this._time = History.now // start time of current power
78
+ this._time = History.now() // start time of current power
79
79
  params.powerDelegate.on('didSet', (value) => {
80
- const now = History.now
80
+ const now = History.now()
81
81
  if (this._time != null) {
82
82
  const delta = this._power * (now - this._time) // Ws
83
83
  this._runningConsumption += Math.round(delta / 60.0) // 0.1W * 10 min
@@ -100,7 +100,7 @@ class Power extends History {
100
100
  if (params.onDelegate != null) {
101
101
  this.entry.o = params.onDelegate.value ? 1 : 0
102
102
  params.onDelegate.on('didSet', (value) => {
103
- const now = History.now
103
+ const now = History.now()
104
104
  if (params.lastActivationDelegate != null) {
105
105
  params.lastActivationDelegate.value = this.lastActivationValue(now)
106
106
  }
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": "6.2.1",
6
+ "version": "6.2.2",
7
7
  "keywords": [
8
8
  "homekit",
9
9
  "homebridge"