Automation stop issue while running (i want to be able to stop it midway)


webmafia

Members
Aug 3, 2023
2
3
Thank you in advance for any help. I have Xiaomi products sensors etc as an alarm system at home. So I have a manual ARM and Disarm automation that amongst other things sets the smart gateway to away from home on and off respectively.



Since the sound of the alarm is lame I have bought a siren that runs on 230V power so I have plugged it in a Xiaomi smart plug. I have created an automation that once the smart gateway gives an alarm it waits for 4 seconds then activates the smart plug, then wait a minute and deactivate it and again a minute an activate in a small circle so that the siren sounds 3-4 times with intervals (so that the siren does not burn out).



In Disarm command I have added the order to close the automation above. The problem I have is although I do this the automation keeps running until it is completed so although I want the alarm to stop it keeps going off until the automation cycle is completed. Does anyone know how I could solve this problem? I tried to explain it to the best of my abilities although it may be confusing.