M5 Atom IR Receiver - which data value to include in binary_sensor definition?

I’m setting up an M5 Atom Lite with an IR receiver, with the intention to use IR codes from my remote control to trigger scripts in HA.
I am seeing my IR events in the ESPHome device logs, but for every button press I am seeing 3 lines of data - for example:

[13:05:40][D][remote.pronto:238]: Received Pronto: data=0000 006D 0022 0000 0159 00AC 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0041 0015 0016 0015 0017 0014 0016 0015 0041 0015 0041 0015 0016 0015 0016
[13:05:40][D][remote.pronto:240]: 0015 0016 0015 0016 0015 0016 0015 0016 0015 0017 0014 0016 0015 0041 0015 0041 0015 0041 0015 0041 0015 0041 0015 0041 0015 06C3
[13:05:40][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0159 0057 0015 06C3

Can anyone advise on which of these 3 lines I should include in my binary_sensor definition?

Most likely you’ll need to test a bit.

What I normally do is log the same button 10 times and pick one that seems to be the cleanest.

I would test each one individually and look at combining them too.

And if you have no luck with pronto I would move across to raw pretty quickly.

Jeez I had no idea that there was so much variation in the codes generated from pressing the same button. This is what I got from four successive presses of the on/off button on one of my remotes. No two are the same!

[19:07:18][D][remote.pronto:238]: Received Pronto: data=0000 006D 0022 0000 015B 00AA 0017 0014 0017 0014 0017 0014 0017 0014 0017 0014 0017 0014 0017 0014 0017 0014 0017 0014 0016 0015 0017 0014 0017 0014 0017 003F 0016 0015 0017 0014 0017 0014 0017 0014 0017 0014 0017 0014 0017 0014
[19:07:18][D][remote.pronto:240]: 0017 0014 0016 0015 0017 0014 0016 0015 0017 003F 0017 003F 0017 003F 0017 003F 0017 003F 0017 003F 0017 003F 0017 003F 0017 06C3

[19:10:59][D][remote.pronto:238]: Received Pronto: data=0000 006D 0022 0000 015A 00AB 0015 0016 0015 0016 0016 0015 0015 0016 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0015 0016 0015 0041 0015 0016 0016 0015 0015 0016 0016 0015 0016 0015 0015 0016 0015 0016
[19:10:59][D][remote.pronto:240]: 0016 0015 0015 0016 0016 0015 0016 0015 0015 0041 0016 0040 0015 0041 0015 0041 0015 0041 0016 0040 0015 0041 0016 0040 0016 06C3

[19:11:02][D][remote.pronto:238]: Received Pronto: data=0000 006D 0022 0000 0159 00AC 0016 0015 0016 0015 0015 0016 0016 0015 0016 0015 0015 0016 0015 0016 0016 0015 0015 0016 0016 0015 0016 0015 0016 0015 0016 0040 0016 0015 0016 0015 0016 0015 0016 0015 0015 0016 0015 0016 0015 0016
[19:11:02][D][remote.pronto:240]: 0016 0015 0016 0015 0016 0015 0016 0015 0016 0040 0016 0040 0016 0040 0016 0040 0016 0040 0016 0040 0015 0041 0015 0041 0016 06C3

[19:11:10][D][remote.pronto:238]: Received Pronto: data=0000 006D 0022 0000 015A 00AB 0016 0015 0015 0016 0016 0015 0015 0016 0015 0016 0016 0015 0015 0016 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0015 0041 0016 0015 0015 0016 0016 0015 0016 0015 0016 0015 0015 0016 0015 0016
[19:11:10][D][remote.pronto:240]: 0016 0015 0016 0015 0016 0015 0016 0015 0016 0040 0016 0040 0015 0041 0015 0041 0016 0040 0016 0040 0016 0040 0016 0040 0016 06C3

[19:11:13][D][remote.pronto:238]: Received Pronto: data=0000 006D 0022 0000 015A 00AB 0015 0016 0016 0015 0015 0016 0016 0015 0015 0016 0016 0015 0016 0015 0016 0015 0015 0016 0016 0015 0015 0016 0016 0015 0016 0040 0016 0015 0016 0015 0016 0015 0015 0016 0016 0015 0016 0015 0016 0015
[19:11:13][D][remote.pronto:240]: 0016 0015 0015 0016 0015 0016 0016 0015 0015 0041 0016 0040 0016 0040 0016 0040 0016 0040 0016 0040 0016 0040 0016 0040 0016 06C3

[19:11:14][D][remote.pronto:238]: Received Pronto: data=0000 006D 0022 0000 0159 00AC 0016 0015 0015 0016 0016 0015 0015 0016 0015 0016 0015 0016 0015 0016 0016 0015 0016 0015 0015 0016 0015 0016 0016 0015 0015 0041 0016 0015 0016 0015 0016 0015 0015 0016 0016 0015 0016 0015 0015 0016
[19:11:14][D][remote.pronto:240]: 0015 0016 0016 0015 0015 0016 0015 0016 0015 0041 0016 0040 0015 0041 0016 0040 0016 0040 0016 0040 0016 0040 0016 0040 0015 06C3

…and this binary sensor gets triggered every time I press any button on any remote that I’ve tried:

binary_sensor:
  - platform: remote_receiver
    name: "Humax IR On-Off"
    pronto:
      data: 0000 006D 0002 0000 015A 0056 0016 06C3

How does using RAW differ from Pronto? How would I specify the binary_sensor yaml, and using which data (if I try to use the “raw” remote code protocol it seems to expect integers only) ?

I would switch to raw now. If you search around, you’ll find quite a lot of other threads of people starting with Pronto (as it “initially appears to be the right protocol” ) but switching to raw (and eventually getting that working after varying levels of headache).

Search some threads and you’ll find the answers. I’ll see if I can dig up one or two. You’ll get there. But it may be more painful than you were expecting.

Edit: start with this one and the posts below it.

Thanks for the tip. Unfortunately I’m not getting any raw codes at all when I press any of the buttons on the remote - I only get pronto codes (and I have dump: all specified)
From what I’ve read in the links that I’ve followed, the challenge for most people is transmitting IR codes which are correctly recognised by the target device. In my case I’m having a problem with the receiver not being able to differentiate between one button press and another - my binary sensor is triggering every time I press any button
???

Did you try step 1 here? I.e dump: raw ?

My bet is once you switch to raw your button presses will be different.

Ah OK yes I’ve set dump: raw and I now see the raw codes - thanks!