Skip to content

num_repeats only sends command once for roku remote #34912

@trancefam

Description

@trancefam

The problem

I am trying to send the volume_down command multiple times using the num_repeats option of remote. When I run the script, it only presses the volume down button once. remote.bedroom_tv is a roku tv added using the roku integration.

Environment

Problem-relevant configuration.yaml

- service: remote.send_command
      data:
        entity_id: remote.bedroom_tv
        command: volume_down
        num_repeats: 40

Traceback/Error logs

2020-04-30 02:47:54 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.139635338688144] Received {'type': 'call_service', 'domain': 'remote', 'service': 'send_command', 'service_data': {'entity_id': 'remote.bedroom_tv', 'command': 'volume_down', 'num_repeats': 40}, 'id': 22}
2020-04-30 02:47:54 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=remote, service=send_command, service_data=entity_id=remote.bedroom_tv, command=volume_down, num_repeats=40>
2020-04-30 02:47:54 DEBUG (SyncWorker_1) [roku] /keypress/VolumeDown
2020-04-30 02:47:54 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.139635338688144] Sending {'id': 22, 'type': 'result', 'success': True, 'result': {'context': Context(user_id='2d96a9063fed423ead05199edcae42d3', parent_id=None, id='098f73f94b864ffb851393e4acb6e139')}}

Additional information

Multiple commands do work if they are sent like this:

- service: remote.send_command
      data:
        entity_id: remote.bedroom_tv
        command: 
          - right
          - right
          - right
          - right
          - right
          - right
          - right

However, I'd like to avoid 40 lines doing the same thing

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions