Easy flow but difficult for me

i just started with node red.
I wanted to create a flow but can't get any further.
I use node red in hassio

the process should be

if the humidity for over 15 minutes is over 65%.
and the window closed (OFF)
then turn on the dehumidifier

if the humidity is below 50% then switch off the dehumidifier

[{"id":"a8c1e633.29ad","type":"function","z":"b09c9f8d.e326a8","name":"","func":"\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":600,"wires":[[]]}]

what i'm missing is an AND node
And a node that has a condition pending for a certain time

if possible without a function node

i hope it was understandable my english is not good.
Thank you very much

There are boolean nodes (search the node red flows site) but if the values are coming in on different paths then you may need to use a Join node to get them into one message. See this post in the cookbooks. Also worth looking through the cookbook to see what is there. Also all the node red docs of course. You can use a Trigger node with a bit of extra logic to do the 15 min bit, have a look at this post earlier today for how to do it for a slightly simpler case. See what you can get going and then come back if still stuck.

To create an AND node, you just put your nodes in series. So for your specific use case, you could use a Trigger node with a 15 minute delay (resetting if humidity < 65%) that sends your "on" message, followed by a Switch node to check the status of your window (you can use a flow/global context to store the current state of the window).

The problem with that is that if the window status becomes valid after the humidity signal triggers then you won't get an event, unless the humidity one keeps sending messages. For situations like this I think it is less confusing to Join the two messages and do the logic, then any time either of them changes the state of the other one is already known.

Thank you
I have solved it now.

[{"id":"c6613d7b.6862c","type":"api-current-state","z":"b09c9f8d.e326a8","name":"Window","server":"c6b27d15.fbeba","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.fenster_bad","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":520,"y":380,"wires":[["49ce8dd7.ee3284"],["21b97b48.39ac24"]]},{"id":"c6b27d15.fbeba","type":"server","z":"","name":"Home Assistant"}]

I'm still not sure if everything is working properly

Good call if the use case requires either situation to trigger the "OFF" event, which is not how I read it. Also would allow you to avoid the use of context variables, though you have to go through the extra step of defining the msg.parts. You'd still need to put the various checks post join to trigger down an "ON" or "OFF" path, or you could use - https://flows.nodered.org/node/node-red-contrib-match to do a single node to check status of all related messages.

You can also just setup checks for an "OFF" path of either below 50% humidity OR the window opening as "OFF" triggers and avoid the need for Join.

Like everything in Node-Red, lot's of different ways to set things up.

Not necessary with the Join node in key/value pair mode

yes one of the conditions should be sufficient to switch off.

Getting into node red and working with home assistant is not easy for me. I am too old and have no experience with programming so far.
But i find it very interesting to realize my own ideas.
many thanks for the help

Once you get the basics and get a couple of flows working, the logic starts making sense and it gets easier