How to cancel a delay/automation?

Hello

I have an automation that runs various lights on an evening when we aren’t at home. It uses several delays to randomly turn different lights on and off. It works perfectly when we are on holiday but would like to use it in normal life. If our status changes to Home, is there anyway to cancel the automation or the delays please?

Cheers
Mark

You can create an automation that is triggered by you arriving home, and turns off the first automation by using the homeassistant.turn_off service. That will stop the random automation in its tracks. You could then have another automation to turn on the first automation once you depart again.

PERFECT thank you so much. I didn’t realise it would be so straightforward