Skip to content

Commit

Permalink
Merge 07d1ea6 into c30202c
Browse files Browse the repository at this point in the history
  • Loading branch information
ottoszika authored Dec 13, 2019
2 parents c30202c + 07d1ea6 commit 62d843d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/power-state-read/power-state-read.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
defaults: {
name: { value: '' },
deviceId: { value: '' },
channel: { value: 1 },
auth: { value: '', type: 'ewelink-credentials' }
},
inputs: 1,
Expand All @@ -28,6 +29,10 @@
<label for="node-input-name"><i class="icon-tag"></i> Device ID</label>
<input type="text" id="node-input-deviceId" placeholder="Device ID">
</div>
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Channel</label>
<input type="text" id="node-input-channel" placeholder="Channel">
</div>
<div class="form-row">
<label for="node-input-auth"><i class="icon-tag"></i> eWeLink Credentials</label>
<input type="text" id="node-input-auth" placeholder="eWeLink Credentials">
Expand Down
2 changes: 1 addition & 1 deletion src/power-state-read/power-state-read.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = (RED) => {
RED.nodes.createNode(this, config);

// Initialize device node
eWeLinkConnect.initializeDeviceNode(RED, this, config, 'getDevicePowerState');
eWeLinkConnect.initializeDeviceNode(RED, this, config, 'getDevicePowerState', msg => [config.channel]);
}

// Register node
Expand Down
5 changes: 5 additions & 0 deletions src/power-state-write/power-state-write.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
defaults: {
name: { value: '' },
deviceId: { value: '' },
channel: { value: 1 },
auth: { value: '', type: 'ewelink-credentials' }
},
inputs: 1,
Expand All @@ -29,6 +30,10 @@
<label for="node-input-name"><i class="icon-tag"></i> Device ID</label>
<input type="text" id="node-input-deviceId" placeholder="Device ID">
</div>
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Channel</label>
<input type="text" id="node-input-channel" placeholder="Channel">
</div>
<div class="form-row">
<label for="node-input-auth"><i class="icon-tag"></i> eWeLink Credentials</label>
<input type="text" id="node-input-auth" placeholder="eWeLink Credentials">
Expand Down
2 changes: 1 addition & 1 deletion src/power-state-write/power-state-write.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = (RED) => {
RED.nodes.createNode(this, config);

// Initialize device node
eWeLinkConnect.initializeDeviceNode(RED, this, config, 'setDevicePowerState', msg => [msg.payload.toLowerCase()]);
eWeLinkConnect.initializeDeviceNode(RED, this, config, 'setDevicePowerState', msg => [msg.payload.toLowerCase(), config.channel]);
}

// Register node
Expand Down

0 comments on commit 62d843d

Please sign in to comment.