Sonoff RF hacked, flashed, working. Now how to pull into HA?

I have the Sonoff RF Bridge R2 v2.2. I did the hardware hack, flashed the bin, added the device in integrations, and can see the data coming in on the ESPHome logs.

This is where i get a little lost. I added this to my HA configuration.yaml

However when i hit “Check Configuration” I get this error:

Im not sure what im doing wrong; anyone able to help? thanks!

EDIT: Ive been following this how-to: Using ESPHome on Sonoff RF Bridge

I think the remote_receiver is a configuration for an ESPHome YAML configuration and not for HA.
Try to see what is in the HA event bus instead.

My Sonoff RF Bridge 433 ESPHome YAML looks like the below code:
I have a captive portal abd wifi fallback enable and static ip.
The output comes on the HA event bus and there is a service call to send codes too.

This is based on this guide:

esphome:
  name: rfbridge1

esp8266:
  board: esp01_1m
   
# Enable logging
#logger:

# Enable Home Assistant API
api:
  password: !secret api_pass
  encryption:
    key: !secret api_key
  services:
    - service: send_rf_code
      variables:
        sync: int
        low: int
        high: int
        code: int
      then:
        - rf_bridge.send_code:
            sync: !lambda 'return sync;'
            low: !lambda 'return low;'
            high: !lambda 'return high;'
            code: !lambda 'return code;'
    - service: learn
      then:
        - rf_bridge.learn

ota:
  password: !secret esphome_ota_pass

wifi:
  ssid: DWsh
  password: !secret dwsh_pass
  manual_ip:
    static_ip: 10.10.12.14
    subnet: 255.255.255.0
    gateway: 10.10.12.1
    dns1: 10.10.12.1

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    password: !secret esphome_fallback_wifi_pass

captive_portal:

uart:
  tx_pin: 1
  rx_pin: 3
  baud_rate: 19200

logger:
  baud_rate: 0

rf_bridge:
  on_code_received:
    - homeassistant.event:
        event: esphome.rf_code_received
        data:
          sync: !lambda 'return format_hex(data.sync);'
          low: !lambda 'return format_hex(data.low);'
          high: !lambda 'return format_hex(data.high);'
          code: !lambda 'return format_hex(data.code);'

output:
- platform: esp8266_pwm
  id: green_led
  pin: GPIO13
  inverted: true

light:
- platform: monochromatic
  name: "RF Bridge 1 LED"
  output: green_led

got it working! thanks!

does not work for R2.2

can you send rf codes also? i did the hack and can only receive

It looks like the indentation is wrong.

Edit: Ahh, it is the first line that has been moved out in the copy/paste action.
It should still work for R2.2, but R2.2 can not be patched with the Portisch firmware for the radio, so it might have some limitations on which signals it accept compared to the R1 with Portisch flashed on it.
I do not know if that is the case for your setup.