diff --git a/101-SmartThings.html b/101-SmartThings.html index 1bde589f..797eb9d1 100644 --- a/101-SmartThings.html +++ b/101-SmartThings.html @@ -2118,7 +2118,7 @@

Properties

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; } }, @@ -2221,8 +2221,9 @@

Properties

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 () { @@ -2400,8 +2401,9 @@

Properties

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 () { diff --git a/101-SmartThings.js b/101-SmartThings.js index ffeb3f6b..f687f51b 100644 --- a/101-SmartThings.js +++ b/101-SmartThings.js @@ -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 { diff --git a/package.json b/package.json index 75011d9c..f7af23bf 100644 --- a/package.json +++ b/package.json @@ -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",