Binary sensor only registers half of the status changes

Hello,
I have a binary sensor like this

binary_sensor:
- platform: mqtt
  name: doorbell
  off_delay: 1
  state_topic: "tele/tasmota_EDEBDA/RESULT"
  value_template: '{{ value_json["RfRaw"]["Data"].split()[6] }}'
  payload_available: "Online"
  payload_not_available: "Offline"
  payload_on: '2819090909......'
  payload_off: 'off'

first I had a normal sensor, but I was having the same issue.
Only every other button push gets registered.
image
I checked this here.and the first click the status doesn’t change.
the 2nd one it changes. (and back after 1 sec)
3rth one doesn’t change. and the 4th one works again.

In my tasmota console, I see all button pushes passing by like this

20:23:44.815 MQT: tele/tasmota_EDEBDA/RESULT = {"Time":"2021-03-21T20:23:44","RfRaw":{"Data":"AA B1 03 060E 0212 1C3E 281909....... 55"}}

but for some reason HA doesn’t accept them. I tried defauld MQTT as well as the tasmota plugin.
and always the same result.
can someone tell me what I am missing here? thank you

I found the issue,
my button was using 2 different. almost simular codes.
I didn’t spot this before for some reason.
I went back to “sensor” instead of binary and added 2 triggers.
now it works
I know for binary, I can set both off and on. but I’m not sure if it can never happen that the same code is being send twice in a row.