Due to ongoing debates about the use and misuse of the “German Support” category to the detriment of users who don’t speak German, the creation of new topics on the category has been closed. Thus, this category is now read-only.
After a trial and error search I found the solution. I have to use the variable to get an output. The quotation marks are also important.
Here is how it works:
when $raspbee_xyz1234567.switch = "1002" then turn Wandlampe on