Use Switch to show current state

Originally you had

You appear to have changed that for some reason, if you look at what you have coming in from mqtt you will see they don't match. I suggest changing the switch node back to what you had before.
I had assumed you were sending strings, but I see they are objects, so you won't need the JSON nodes on the inputs

Sorry for keeping you waiting for the answer, yesterday I've reached the 24h reply limit for new users... Well, good news! I've managed to solve it by changing the value from 1 and 0 to True and False, both on Python and NodeRED. So now my ui-Switch node sends {"lamp1":true} or {"lamp1":false}
Your tip about using debug nodes to compare the messages comming in and comming out really helped me to understrand what was wrong! Thanks so much I wouldn't made it without you!

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