Multiple scriptcall / delay / loop to change TV channel

Hey,

I’m trying to make a “hey google, channel 156” automation for my TV

  • IFTTT “channel #” ==> webhook
  • Broadlink remote : channel 1 > delay > channel 5 > delay > channel 6

For now, it’s only working for 0 - 9 channels…

I made a python script that call a HA script “channel_once” for each char of the number with a progressive delay value (because no sleep or wait method in python scripts for some good reasons)

The “channel_once” script is like :

  • delay : 00:00:{{delay}}
  • script.tv_channel_{{channel}}

The problem is that a same script cannot run multiple times !

Any idea ?

As I were stucked, I looked on AppDaemon.
It seems really powerfull and have a fonction to start a call after a delay !
I will try to make it works tonight.

To start the module I’m not sure …

  • Throw an events with some params
  • Use a “target channel” sensor or something like that

I’m in love with HA ! :smiley: :heart_eyes: