From 2f3ec31936dca9a0a6236252639231ba1bbb86e6 Mon Sep 17 00:00:00 2001 From: hobbyquaker Date: Sat, 29 Sep 2018 10:11:43 +0200 Subject: [PATCH] functions filter (#20) --- nodes/ccu-set-value.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nodes/ccu-set-value.js b/nodes/ccu-set-value.js index 08a4a65..b6136dc 100644 --- a/nodes/ccu-set-value.js +++ b/nodes/ccu-set-value.js @@ -87,6 +87,12 @@ module.exports = function (RED) { } } + if (this.functions) { + if (!this.ccu.channelFunctions[address] || !this.ccu.channelFunctions[address].includes(this.functions)) { + return; + } + } + const psKey = this.ccu.paramsetName(iface, channel, 'VALUES'); if (this.ccu.paramsetDescriptions[psKey] && Object.keys(this.ccu.paramsetDescriptions[psKey]).includes(this.datapoint)) {