Automation to turn on TV, Set Top box, set Channel - SmartIR

Hello Dear people,

using SmartIR custom component and a Broadlink RM mini, i got my IR remotes working.
I got an LG TV (Fully smart, can be turned on/off via network), and a set top box that i receive my cable tv.

- alias: Turn on TV/myT on MBC1 
  trigger:
    platform: state
    entity_id: binary_sensor.tv_switch
    to: 'on'
  action:
    - service: media_player.turn_on
      entity_id: media_player.lg_webos_smart_tv
    - service: media_player.turn_on
      entity_id: media_player.myt_box

The above automation works fine, however am trying to send the channel number 230 after a 10 second delay. I did it on the developer tab and it works, but can’t understand how to send it via code.

 - alias: Turn on TV/myT on MBC1 
  trigger:
    platform: state
    entity_id: binary_sensor.tv_switch
    to: 'on'
  action:
    - service: media_player.turn_on
      entity_id: media_player.lg_webos_smart_tv
    - service: media_player.turn_on
      entity_id: media_player.myt_box
    - delay:
         seconds: 10
    - service: media_player.select_source
      entity_id: media_player.myt_box
      source: Channel 230  # This is not working !?
1 Like

Maybe it’s the indent of 3 spaces on the “seconds: 10” line instead of 2.

Hello All,

Figured it out. Putting the solution here in case someone needs:

"Channel 230": ["JgBYAAABIZMSEhQREhMTERMSEhITEhITETgUNhI3EzcUNRM3EjgSNxITEjcTERMSFBETERQRExISNxMSEjgSNxM3EzYTNxI3EwAFIQABJkkTAAxLAAEnSRIADQU=",
                            "JgBQAAABIZMTEhMSEhITEhMSEhIUERITEjcTNxI3EzcSNxM3EzYTNxI3EzYTEhITEhITEhMRExITEhITEjcTNxQ1EzcTNhQ2EwAFJgABJEkSAA0FAAAAAAAAAAA=",
                            "JgBQAAABIpITEhITEhITEhISExISExISEjgSNxQ2EjcTNxM2EzcTNhMSEhMSEhMSEhITEhITEhITNxI4EjcSOBI3EzcSNxI3EwAFIQABJ0kUAA0FAAAAAAAAAAA="
                           ],