I don't actually think you need both switch and change nodes for this. The change node alone can change values based on the input. So have a look at doing that instead.
Joining these two wires at the "feuchte" node does not mean that msg.feuchte and msg.schwelle are both available at the same time.
The two messages remain entirely separate.
ahhh, I see, the problem is that not both msg arrive in the switch node at the same time. JOIN-node is the solution.
Converting the string into a number doesn't seem necessary either. Thank you for your help!
I have now added a JOIN node (the 2 topics are also assigned), the result in the debug is the following:
What I don't understand yet is how I can use the tow topics (feuchte and schwelle) in the switch node. I tried this, but the result is not correct...
Thank you again...