Skip to content

Commit

Permalink
Fix logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisIsQasim committed May 7, 2024
1 parent 005bde5 commit c1d376c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/SimpleBlinds2Accessory.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class SimpleBlinds2Accessory extends BaseAccessory {
this.device.on('change', changes => {
if (changes.hasOwnProperty(this.dpControl) && this.commandedState !== changes[this.dpControl]) {
this.commandedState = changes[this.dpControl];
console.log("[TuyaAccessory] SimpleBlinds3 " + this.device.context.name + " commanded to " + this.commandedState);
console.log("[TuyaAccessory] SimpleBlinds2 " + this.device.context.name + " commanded to " + this.commandedState);

switch (this.commandedState) {
case this.cmdOpen:
Expand Down Expand Up @@ -113,15 +113,15 @@ class SimpleBlinds2Accessory extends BaseAccessory {
position = this.targetPosition;
}

console.log("[TuyaAccessory] SimpleBlinds3 " + this.device.context.name + " resetting position to " + position + " after timeout.");
console.log("[TuyaAccessory] SimpleBlinds2 " + this.device.context.name + " resetting position to " + position + " after timeout.");
characteristicPositionState.updateValue(Characteristic.PositionState.STOPPED);
characteristicCurrentPosition.updateValue(position);
characteristicTargetPosition.updateValue(position);
});
}, this.positionUpdateTimeoutDuration);

} else if (changes.hasOwnProperty(this.dpPosition) && !this.targetRecentlyChanged) {
console.log("[TuyaAccessory] SimpleBLinds3 " + this.device.context.name + " saw change to " + changes[this.dpPosition]);
console.log("[TuyaAccessory] SimpleBLinds2 " + this.device.context.name + " saw change to " + changes[this.dpPosition]);
this.currentPosition = this._getCurrentPosition(changes[this.dpPosition]);
characteristicCurrentPosition.updateValue(this.currentPosition);

Expand All @@ -133,7 +133,7 @@ class SimpleBlinds2Accessory extends BaseAccessory {
}
}
} else {
console.log("[TuyaAccessory] SimpleBlinds3 " + this.device.context.name + " skipping message (likely due to recent target change): " + JSON.stringify(changes));
console.log("[TuyaAccessory] SimpleBlinds2 " + this.device.context.name + " skipping message (likely due to recent target change): " + JSON.stringify(changes));
}
});
}
Expand All @@ -159,7 +159,7 @@ class SimpleBlinds2Accessory extends BaseAccessory {
}

setTargetPosition(value, callback) {
console.log('[TuyaAccessory] SimpleBlinds3 ' + this.device.context.name + ' target position set to ' + value);
console.log('[TuyaAccessory] SimpleBlinds2 ' + this.device.context.name + ' target position set to ' + value);

this.targetPosition = value;

Expand Down Expand Up @@ -226,4 +226,4 @@ class SimpleBlinds2Accessory extends BaseAccessory {

}

module.exports = SimpleBlinds2Accessory;
module.exports = SimpleBlinds2Accessory;

0 comments on commit c1d376c

Please sign in to comment.