Broadlink & Roku Custom Card

Hi, so I’ve recently been playing around with my Broadlink RM3 along with SmartIR to control my AC units, and was also playing around with it controlling the TV in my bed room, I currently control the Roku in that room, using the Roku Custom Card from HACS, and was playing with the volume_up volume_down buttons on the remote and managed to add in the revelant IR commands and service calls as below

entity: media_player.bedroom
tv: true
type: 'custom:roku-card'
volume_down:
  tap_action:
    action: call-service
    service: broadlink.send
    data:
      host: 192.168.1.18
      packet:         JgBYAAABIZQSFBE4EhQSExISEhMSExMSETgTExI4EjgROBI4FDYUERMSEDkTOBMSExETExM2EhMUNhEUExITNxE4EjgSFBI3EgAFRQABJksTAAxWAAEmSxEADQUAAAAAAAAAAAAAAAAAAA==
volume_up:
  tap_action:
    action: call-service
    service: broadlink.send
    data:
      host: 192.168.1.18
      packet:    JgCAAAABIZURFBI4ERQRExMSEhQSEhQREjgTEhI4ETkTNhI4EzgSEhM3EjgRORI4EhIVEREUEhMSEhMTExETEhI4EjgTNxE4FQAFQgABJ0sRAAxYAAElSxMADFkAASNLEQAMWAABJUsUAAxZAAEiSxIADFcAASZLEgAMVgABJ0oSAA0FAAAAAAAA

However - when i try to send the command i get the following error

Failed to call service broadlink/send. required key not provided @ data['packet']

and when I go to look at the card again i noticed that it has added this >- infront of the packet? does anyone have any ideas?

entity: media_player.bedroom
tv: true
type: 'custom:roku-card'
volume_down:
  tap_action:
    action: call-service
    service: broadlink.send
    data:
      host: 192.168.1.18
      packet: >-
        JgBYAAABIZQSFBE4EhQSExISEhMSExMSETgTExI4EjgROBI4FDYUERMSEDkTOBMSExETExM2EhMUNhEUExITNxE4EjgSFBI3EgAFRQABJksTAAxWAAEmSxEADQUAAAAAAAAAAAAAAAAAAA==
volume_up:
  tap_action:
    action: call-service
    service: broadlink.send
    data:
      host: 192.168.1.18
      packet: >-
        JgCAAAABIZURFBI4ERQRExMSEhQSEhQREjgTEhI4ETkTNhI4EzgSEhM3EjgRORI4EhIVEREUEhMSEhMTExETEhI4EjgTNxE4FQAFQgABJ0sRAAxYAAElSxMADFkAASNLEQAMWAABJUsUAAxZAAEiSxIADFcAASZLEgAMVgABJ0oSAA0FAAAAAAAA

Try putting the code in quotes.

Yeah tried doubles and singles, all no joy :frowning:

Edit: change data: to service_data:

1 Like

Yeah if i do it manually it works fine, so i tried to copy it from there and boom error… even if i add it as just a Button and not part of the custom card, i get the same error

Huzzah! superstar, thanks @Burningstone, i even spotted that bit in the Broadlink notes for the integration, but figured the custom card had everything else as data, it needed to be the same :stuck_out_tongue:

1 Like