How to compare code in events to multiple values (rf bridge related)

I am using the sonoff bridge rf with esphome and it seems it uses events for sending me the codes, but what would be the optimal way of triggering a single event based on a few specific event data?

I have a few smoke detectors, a few water leak sensors, pir sensors around the house, and some remotes.

Have a read of this topic:

They use Tasmota instead of ESPHome but the same strategies should apply.

thank you, but I migrated from tasmota. It was unreliable. I used to miss messages(from rf sensors).I am not sure if it was due to the mqtt.

Ar the events also based on mqtt?

Are the events supposed to be more reliable than mqtt message

I tried to create automatisations, but I can only use an event for the trigger. I found no way to compare multiple codes in the same automatisation.

I found that you can create sensors based on events:

But what if I want to create binary sensors directly inside the bridge?
Unfortunately, I don´t know C++, so I´m not sure how to write it.
The bridge is working fine.
For example, this is what I have:

rf_bridge:
  on_code_received:
    then:
      - if:
          condition:
            - lambda: 'return format_hex(data.code)=="0x6C08DC";'
          then:
            - logger.log: "mov!!!"
1 Like