MQTT Switch State controlled by RF signal

I’m using a Sonoff RFBridge flashed with Tasmota and Portisch. I use this to control a couple of cheap RF sockets, sending the ON/OFF payloads works just fine. It’s just that when someone uses the original remote the state in HA is not updated. I can see the remote control command in MQTT and I’m trying to use that to update the state of the switch. I’m not sure how to use the MQTT data in the switch and I only find any examples where the command is a simple “on”/“off” payload.

MQTT Data:

{
    "Time": "2023-01-02T21:17:38",
    "RfRaw": {
        "Data": "AAA411B2008C01AEFFD51455"
    }
}

Switch configuration:

mqtt:
  switch:
    - unique_id: diamant_schakelaar_a
      name: "Diamant Schakelaar A"
      state_topic: "tele/RFBridge1/RESULT"
      state_on: "RfRaw AAA411BC001XXXXXXXXXXXXX"
      state_off: "RfRaw AAA411BC000XXXXXXXXXXXXX"
      command_topic: "cmnd/RFBridge1/backlog"
      payload_on: "rfraw AA B0 21 03 08 01B8 0078 1180 XXXXXXXXXXXXXXXXXXXXXXXXXXXX 55"
      payload_off: "rfraw AA B0 21 03 08 01B8 0078 116C XXXXXXXXXXXXXXXXXXXXXXXXXXXX 55"
      optimistic: true
      qos: 0
      retain: true