My approach would be to use helpers for this.
You could have an automation trigger at the state “Rain” and have it write the time stamp to a datetime helper with:
{{ now() + timedelta( days = 2) }}
That helper then is the trigger for the alert automation. Since the datetime is set to later time each time it rains, it will only trigger when it isn’t set for two days. Of course one could decide to set it at a certain time, todays ahead. But that’s fine tuning.
The window case is slightly more challenging and I do not have time for that at the moment. Maybe tomorrow, if not someone else already responded with a brilliant solution.
For the window one, I think I’d create an input_boolean helper. An automation would reset it to off at midnight (or whenever you want your “before 10am” to start):
Do you mean five minutes in one go or 2+2+1 = 5?
If you want the accumulative then you can use a history stats sensor that will count the time the window has been opened.
If you mean 5 minutes in one go then what Troon posted is a good solution.
Except I would make it one automation with choose.