Turn on/off broadlink switch without blast IR code?

Hi !

Is there a way to turn on/off a broadlink switch without blast IR code ?

I would like to add a IR receiver to my RPI and when I will use the original IR remote of my TV (instead of HA with broadlink) I would like to turn the tv braodlink switch on but do not send the IR.

thanks

I have something similar might be helpful for you:

switch.yaml

- platform: template
  switches:
    tv_set_switch:
      value_template: "{{ is_state('binary_sensor.tv_panasonic', 'on') }}"
      turn_on:
        service: script.tv_set_on
      turn_off:
        service: script.tv_set_off

script.yaml

'tv_set_on':
  alias: TV Set on
  sequence:
  - entity_id: switch.tv
    service: switch.turn_on
  - delay: 00:00:10
  - entity_id: switch.tv_hdmi
    service: switch.turn_on
  - delay: 00:00:01
  - entity_id: switch.mibox_power
    service: switch.turn_on
  - delay: 00:00:02
  - data: {}
    entity_id: switch.amplituner_hdmi_input
    service: switch.turn_on

It is a switch template on top of script which actualy turn on/off broadlink swithc.
I don’t care about the broadlink switch state.