Skip to content

Commit

Permalink
Changed default of “hold” to true and removed need for rounding by de…
Browse files Browse the repository at this point in the history
…fault
  • Loading branch information
lprhodes committed Apr 20, 2017
1 parent a32d4bb commit 7304dd2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions accessories/windowCovering.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class WindowCoveringAccessory extends BroadlinkRMAccessory {
if (!this.currentPosition) this.currentPosition = 0;

let { percentageChangePerSend } = config;
if (!percentageChangePerSend) percentageChangePerSend = 10;
if (!percentageChangePerSend) percentageChangePerSend = 1;

let difference = this.targetPosition - this.currentPosition;

Expand Down Expand Up @@ -76,7 +76,8 @@ class WindowCoveringAccessory extends BroadlinkRMAccessory {
let { hold, percentageChangePerSend, interval, disableAutomaticOff, onDuration, onDurationOpen, onDurationClose, totalDurationOpen, totalDurationClose } = config;
const { off } = data;

if (!interval) interval = 0.5;
if (interval === undefined) interval = 0.5;
if (hold === undefined) hold = true;
if (!percentageChangePerSend) percentageChangePerSend = 10;
if (disableAutomaticOff === undefined) disableAutomaticOff = true;
if (!onDuration) onDuration = this.opening ? onDurationOpen : onDurationClose;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homebridge-broadlink-rm",
"version": "1.3.8",
"version": "1.3.9",
"description": "Broadlink RM plugin (including the mini and pro) for homebridge: https://github.com/nfarina/homebridge",
"license": "ISC",
"keywords": [
Expand Down

0 comments on commit 7304dd2

Please sign in to comment.