diff --git a/lib/HueSensor.js b/lib/HueSensor.js index 2d99541..d57e5c8 100644 --- a/lib/HueSensor.js +++ b/lib/HueSensor.js @@ -2249,10 +2249,10 @@ HueSensor.prototype.addEntry = function (changed) { HueSensor.prototype.checkButtonevent = function ( buttonevent, lastupdated, event ) { - if (event || this.obj.state.lastupdated < lastupdated) { + if (this.obj.state.lastupdated < lastupdated) { this.log.debug( '%s: sensor %s %j on %s', this.name, this.type.key, - buttonevent, this.obj.state.lastupdated + buttonevent, lastupdated ) const buttonIndex = this.type.homekitValue(buttonevent) const action = this.type.homekitAction( @@ -2391,10 +2391,10 @@ HueSensor.prototype.checkDaylight = function (daylight) { HueSensor.prototype.checkLastupdated = function (lastupdated) { if (this.obj.state.lastupdated < lastupdated) { - // this.log.debug( - // '%s: sensor lastupdated changed from %s to %s', this.name, - // this.obj.state.lastupdated, lastupdated - // ) + this.log.debug( + '%s: sensor lastupdated changed from %s to %s', this.name, + this.obj.state.lastupdated, lastupdated + ) this.obj.state.lastupdated = lastupdated } const hkLastupdated = dateToString(this.obj.state.lastupdated)