New dev integration rf_bridge

Hi everyone! My idea is switch a binary sensor in (developer mode) rf_bridge device but I can’t look for proper configuration. Probably it’s only my low knowledge about… here the example code:

rf_bridge:
  on_code_received:
    then:
      - binary_sensor.template.publish:
          id: unlock
          state: !lambda 'char buffer [10];return itoa(data.code,buffer,16);'  ///need if to compare an int/string
binary_sensor:
  - platform: template
    device_class: motion
    name: UNLOCK
    id: unlock
    filters:
      delayed_off: 5s 

I can’t proper write a lambda or if selection to compare the code received … (or write in english too). Any help is much appreciated.