Automation that checks for is doors are open before going to bed

c’mon. “doesn’t work” means nothing, especially without a config to look at.

If you think it doesn’t trigger (which is easy to check in States), what can be the cause?
It’s either wrong trigger or condition section.
Make it as simple as possible - remove condition and strip down trigger so it’s simple and yet functional and try to make it work (don’t forget to consult with the docs, don’t just poke around).
Then work with your condition - if it’s a template, test it in Template Editor until you get what you want.

Only then put it all together and check if it works.

Ideally you need to do it yourself as only you have access to your entities and can easily debug your automation, you just need to know how.

If you opt for asking for help - read this, follow it and be patient :wink:

And one more thing - it’s a bad idea to resurrect old topics, better to create a new one and reference the old one as a source of your code.
Also, you need to be careful when using solutions from old topics as HA changes rapidly and the functionality might be different now or doesn’t exist anymore.