Simple logic question

Hi all,

how can I check several payloads in a single switch node?

Sample: i have a tradfri remote controller with 5 buttons. when i click the central button, then i get a value (empty), when i click top button (payload.stepmode 1 or 0) or left/right button (payload.value 1 or 0) then i get different payload-values.

This works, but i think, that is possible in 1x node and not 3 nodes:

Can you define in words exactly what conditions you are trying to test for for each flow going out ?

Hi Colin!

yes sure...

if payload.stepmode = 0 then ..
if payload.stepmode = 1 then...
if payload.value = 257 then..
if payload.value = 256 then..
if payload = empty then ...

is this in 1 switch node possible or i need a function node? the flow in the screenshot is function, but i think, is not the right way...

What about the combinations of the first four? stepmode 0 and value 257 vs stepmode 0 and value 256 for example.

Edit - also what about other values of value and stepmode?

In first step, is enough for me, when not combinations exist. it is only a sample.

I think you will either have to use multiple switch nodes or use a function node. However it may depend on what you want to do after deciding which conditions are satisfied. If you just need to set values for example it may be possible in a Change node, but if you need to head off down different flow paths then you need a Function or Change nodes I think.

I suggest sticking a debug node on the output of the first node and making it show the entire message.

Then press a few buttons to show people what you are getting. I think that will remove a lot of confusion.

Read my first Posting. I get the payload values in the switches (Screenshot).

It is not important... i closed the thread.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.