Continually check automation till completed

I have an automation that will place the house into sleep mode that I want to continually run until the automation is complete. In other words I have 2 triggers (Time and state of entity) but both don’t always happen together. So the trace fails when the triggers are not met. How would I get this to continue till triggers have been met?

use both triggers as conditions as well. that way whichever the last trigger happens and the other trigger is already satisfied then the actions run.

trigger:
  - desired to state of trigger 1
  - desired to state of trigger 2
condition:
  - desired state of trigger 1 already met
  - desired state of trigger 2 already met
1 Like

thanks i will give it a try