Delay between switches
Posted: Thursday 23 February 2017 12:39
I am switching on 2 switches via a LUA script. Optimally, I would like to have a delay of ~6 seconds between them.
I could do this via a Scene with an On Delay for the second switch, but I only need the delay if Switch 1 was initially OFF and then switched to ON by th script. (I can check the status of Switch 1 with the script, so I can determine whether I need to switch it.)
I know that it's not advisable to put a delay in a device script, but I don't think the 6 seconds is going to cause any problems with my setup.
Can anyone suggest please a way to do what I want, or should I just go with the Scene and an extra delay each time?
I could do this via a Scene with an On Delay for the second switch, but I only need the delay if Switch 1 was initially OFF and then switched to ON by th script. (I can check the status of Switch 1 with the script, so I can determine whether I need to switch it.)
I know that it's not advisable to put a delay in a device script, but I don't think the 6 seconds is going to cause any problems with my setup.
Can anyone suggest please a way to do what I want, or should I just go with the Scene and an extra delay each time?