The AND node looks at msg.topic and compares the values you specify. So you feed each get state node or get entities (it’s cleaner looking this way) into the AND node. Once all the nodes are fed into the node, you tell it which topics you want to match. This is typically the devices full name. Like binary_sensor.front_window. Just feed the values and comparison you want.
thank you very much vor the help. Now i could fix it. My problem was, that i only saw the cloesed state at the AND Gate. Now i added it like this and it works.