From b2de26526da146fd05d5fa2d134d4771a422208c Mon Sep 17 00:00:00 2001 From: Joe Pavitt Date: Thu, 8 Aug 2024 11:01:02 +0100 Subject: [PATCH] UI Switch: Ensure server-side accounts for decouple config --- nodes/widgets/ui_switch.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nodes/widgets/ui_switch.js b/nodes/widgets/ui_switch.js index 9399611b0..f110bc41d 100644 --- a/nodes/widgets/ui_switch.js +++ b/nodes/widgets/ui_switch.js @@ -21,6 +21,10 @@ module.exports = function (RED) { // ensure we have latest instance of the widget's node const wNode = RED.nodes.getNode(node.id) + if (!config.passthru && config.decouple) { + return + } + node.status({ fill: value ? 'green' : 'red', shape: 'ring',