Skip to content

Commit

Permalink
Merge pull request #93 from Samsung/dev
Browse files Browse the repository at this point in the history
Fix: SmartThings component issues
  • Loading branch information
jongsu2 authored Jul 29, 2024
2 parents 69be6ab + a4c421b commit 3d0b9bd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
12 changes: 7 additions & 5 deletions 101-SmartThings.html
Original file line number Diff line number Diff line change
Expand Up @@ -2118,7 +2118,7 @@ <h3>Properties</h3>
this.deviceNodeId = selectedDeviceOption.dataset?.deviceNodeId;
}
const selectedCapabilityOption = document.querySelector('#node-input-capabilityId').selectedOptions[0];
if (selectedDeviceOption && selectedDeviceOption.dataset.deviceNodeId) {
if (selectedCapabilityOption && selectedCapabilityOption.dataset.componentId) {
this.componentId = selectedCapabilityOption.dataset?.componentId;
}
},
Expand Down Expand Up @@ -2221,8 +2221,9 @@ <h3>Properties</h3>
if (selectedOption && selectedOption.dataset.deviceNodeId) {
this.deviceNodeId = selectedOption.dataset?.deviceNodeId;
}
if (selectedOption && selectedOption.dataset.componentId) {
this.componentId = selectedOption.dataset?.componentId;
const selectedCapabilityOption = document.querySelector('#node-input-capabilityId').selectedOptions[0];
if (selectedCapabilityOption && selectedCapabilityOption.dataset.componentId) {
this.componentId = selectedCapabilityOption.dataset?.componentId;
}
},
oneditprepare: function () {
Expand Down Expand Up @@ -2400,8 +2401,9 @@ <h3>Properties</h3>
if (selectedOption && selectedOption.dataset.deviceNodeId) {
this.deviceNodeId = selectedOption.dataset?.deviceNodeId;
}
if (selectedOption && selectedOption.dataset.componentId) {
this.componentId = selectedOption.dataset?.componentId;
const selectedCapabilityOption = document.querySelector('#node-input-capabilityId').selectedOptions[0];
if (selectedCapabilityOption && selectedCapabilityOption.dataset.componentId) {
this.componentId = selectedCapabilityOption.dataset?.componentId;
}
},
oneditprepare: function () {
Expand Down
1 change: 1 addition & 0 deletions 101-SmartThings.js
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ module.exports = function (RED) {
var param = {deviceId: ""};

if (RED.nodes.getNode(NODE.deviceNodeId).type == ST_MY_DEVICE) {
deviceConfig = { deviceId: NODE.deviceId, componentId: NODE.componentId };
authToken = RED.nodes.getCredentials(NODE.deviceNodeId).stAccessToken;
param.deviceId = NODE.deviceId || RED.nodes.getNode(NODE.deviceNodeId).device.deviceId
} else {
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": "node-red-contrib-samsung-automation-studio-nodes",
"version": "1.1.21",
"version": "1.1.22",
"description": "Samsung Automation Studio Nodes for Node-RED",
"keywords": [
"SmartThings",
Expand Down

0 comments on commit 3d0b9bd

Please sign in to comment.