Skip to content

Commit

Permalink
configurable revertTime (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbyquaker committed Mar 13, 2019
1 parent 462a6dd commit 1e5f8f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion nodes/redmatic-homekit-homematic-garage.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
directionOpened: {value: 'true'},
directionClosed: {value: 'true'},
duration: {value: 15, required: true},
durationClose: {value: 15, required: true}
durationClose: {value: 15, required: true},
revertTime: {value: 0.5, required: true}
},
inputs: 0,
outputs: 0,
Expand Down Expand Up @@ -341,6 +342,10 @@
<label for="node-input-duration"><i class="icon-tags"></i> Fahrzeit öffnen</label>
<input type="number" id="node-input-duration">
</div>
<div class="form-row">
<label for="node-input-revertTime"><i class="icon-tags"></i> Wartezeit Richtungsumkehr</label>
<input type="number" id="node-input-revertTime">
</div>
<style>
.form-row select {
width: 70%;
Expand Down
4 changes: 2 additions & 2 deletions nodes/redmatic-homekit-homematic-garage.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module.exports = function (RED) {
this.updateSensor();
setTimeout(() => {
move(direction).then(resolve).catch(reject);
}, 500);
}, (parseFloat(config.revertTime) || 0.5) * 1000);
} else {
resolve();
}
Expand All @@ -64,7 +64,7 @@ module.exports = function (RED) {
this.updateSensor();
setTimeout(() => {
move(direction).then(resolve).catch(reject);
}, 500);
}, (parseFloat(config.revertTime) || 0.5) * 1000);
} else {
resolve();
}
Expand Down

0 comments on commit 1e5f8f7

Please sign in to comment.