Skip to content

Commit

Permalink
Update HueSensor.js
Browse files Browse the repository at this point in the history
Issue #1148.
  • Loading branch information
ebaauw committed Mar 5, 2023
1 parent 1b78132 commit ac7c2fa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/HueSensor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ac7c2fa

Please sign in to comment.