Please have a look at the sketch:
Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen. In the case your not familiar with diagrams, try to get help from a friend with skills in electronics or electrical work!
Hello thgoebel,
Thanks again for your help.
I just wanted to tell you that I have now installed and automated them in Homeassistant and it works perfectly!