Pause between two api blocks

Hi, is there a way to create a wait of time ( variable ) between 2 blocks?. For example If I say " sitting light on for 15 minutes", then api block is activated to turn the light ON and after a wait of variable of minutes (here it is 15 minutes), another api block is activated to turn the light OFF.

how do you expect Alexa speak in that case? like this?

  • light on via api
  • alexa speaks something like “turned the light on”
  • light off via api 15mins later
  • alexa speaks something like "turned the light off

If I say ( Light on for {wait} minutes), I want Alexa speak ( ok {wait} ), to be sure that the ON duration of the Light ( which is variable ) is correct.

ok. so your flow what you expect might be like this:

(user utterance) --> API block(on) --> speak block(alexa says “ok” and wait for 15mins) --> API block(off)

I think this might be difficult. blocks are not executed in sequential order. In the case above, actual order will be like this:

API block(on) --> API block(off) --> speak block(alexa says “ok”)

this is because of alexa’s request and response system. If an user says something, Alexa responds back something. After she speak, she cannot do anything other than waiting for user’s utterance only.
This is Alexa’s limitation.

It sound like Pause and Resume Intent can only be triggered by voice command not with custom code!

Actually I tried putting custom code block for sleeping between api blocks, but I couldn’t suceeded. (JS doesn’t have sleep function, so I tried a few ways…)

even if i could suceeded for sleep, alexa’s response should be in about 8 secs. For 15 mins long sleep, we need some tricks.

blank audio is one of workarounds to keep session connected but it has a limit for 240secs…