again probably a really simple question, but, again, I can´t figure it how somehow
Here is what I want to accomplish. I have a function node which is triggered when my outdoor light sensor falls under a certain threshold. This function node should now trigger two things
Open my roller shutter (if closed) AND
Switch of the lights (when on)
This is what I tried in order to "split" the two comments for the different actions:
But have you learnt as much as if you had spent a little while reading the docs, reading relevant parts of the w3schools site and working out how to do it yourself?
No @Colin, in fact I learned more. Nothing is more helpful than learning by solving actual problems rather than just reading through documentations that might or might not address the issue one is trying to solve. Therefore, I´m really grateful if people take their precious time to drop me some lines of code that I can then use to go on with self-teaching.
I agree with you 100% but in this case, I gave you the reason your code wasn’t doing what you wanted it to do. Then I pointed you to the documentation that would give you your solution so you could learn more by solving your actual problem.
You did point out that the return ended the function, so second return is unreachable, but asynchronous messages was not the most relevant answer. All the OP really needed was pushing to send both responses in the same return, he could of read about asynchronous messages all day with out understanding that he could send both payloads in one go.
Some people could read documents all day long and still not understand, then when they get a simple example it clicks. Either way the OP learnt what their issue was and learnt how to resolve it, so this discussion is just moot
RTFM: Finding and reading the docs is in many cases not easy. But pointing to the relevant pieces of the doc may help to A) solve the current problem and B) learn where to find information (in the future).