Trying to trigger an action based on the sequence of two contact sensors opening or not opening

Hello Dave,

If you want someone to help, please post the YAML. That is ridiculously hard to look at.
Use the </> button or this when you post it:
Here is an example of how to fix it from the site FAQ Page.
How to help us help you - or How to ask a good question.