HomePod voice script execution

Hello everybody,

I’m trying to emulate remote controller via voice commands through HomePod for LG TV.
This was no issue so far - created script to turn on TV via WoL - then through media_playes change source to YouTube or through webos.button send enter, play, stop, etc…

What I’m struggling with is delay caused by Siri to turn on switch/script.
In comparison with voice commands for IKEA lights e.g. “Hey Siri, turn on table lights” > This gets executed immediately. If I say, “Hey Siri, TV Youtube” (name of the script) - this takes for example 5 seconds till gets executed.

In the script itself I’m checking if media_player state is on, then select source_input to YouTube; else: call switch, which sends WoL, then waits 10 seconds for successful initialisation of default IP TV app and then source_input to YouTube. Nothing complex.

Any ideas, why it’s taking so long? I’m thinking of bad naming scheme – TV something, TV something …

Thank you