Roku Remote needs delay_secs variable like Harmony Remote

Harmony Remote has delay_secs variable to help prevent lost commands. Roku needs this too.

I agree and could also use num_repeats, please

Although the documentation doesn’t mention it as of this writing, if you bring up the “remote.send_command” service on the Services page under Developer Tools in the front end, you will see the following. Haven’t yet experimented with it, but it looks like what you were asking about.

Parameter Description Example
entity_id Name(s) of entities to send command from. remote.family_room
device Device ID to send command to. 32756745
command A single command or a list of commands to send. Play
num_repeats An optional value that specifies the number of times you want to repeat the command(s). If not specified, the command(s) will not be repeated. 5
delay_secs An optional value that specifies that number of seconds you want to wait in between repeated commands. If not specified, the default of 0.4 seconds will be used. 0.75

I experimented with this, and it doesn’t work with a Roku remote. Instead, I had to add a 6 sec timer to give the Roku enough time to go to the selected source, and then, when the timer expires, I have a script that sends the commands. I do the actual work in a python script.

I could have added time.sleep() to the script or a delay in the automation, but I try to stay away from those.

Are there any other ideas on how to do this with a Roku remote?

1 Like