Remote_receiver switching mode

I have strange issue when using ‘remote-receiver’ on D1 mini. If I get too close to the IR receiver LED it changes from outputting raw codes, to RC codes?

Is that normal and side effect of overwhelming the device?

This is the yml, pretty straightforward. I know the transmit code is not inverted but didn’t get that far.

Also, using npn Trans as switch to 5V is very weak.

  remote_receiver:
    pin:
      number: GPIO5
      inverted: true
    dump: all

  remote_transmitter:
    pin: GPIO4
    # Infrared remotes use a 50% carrier signal
    carrier_duty_percent: 50%

  switch:
    - platform: template
      name: Window Vent Power
      turn_on_action:
        - remote_transmitter.transmit_raw:
            carrier_frequency: 38kHz
            code: [-1297, 420, -1270, 419, -426, 1261, -1269, 422, -1298, 391, -426, 1263, -428, 1261, -427, 1263, -426, 1262, -1273, 418, -426, 1261, -455, 8069, -1293, 422, -1268, 421, -426, 1261, -1270, 419, -1268, 422, -425, 1261, -427, 1262, -454, 1235,
            -426, 1262, -1268, 424, -445, 1239, -426, 8097, -1297, 419, -1267, 421, -428, 1260, -1270, 420, -1267, 422, -424, 1263, -424, 1265, -425, 1263, -425, 1263, -1270, 420, -427, 1260, -426, 8099, -1289, 425, -1266, 422, -422, 1266, -1266, 423, -1266, 423,
            -422, 1265, -426, 1262, -425, 1264, -422, 1267, -1265, 423, -426, 1262, -422, 8101, -1269, 448, -1264, 426, -425, 1261, -1242, 449, -1265, 424, -425, 1262, -424, 1265, -399, 1291, -423, 1266, -1240, 450, -421, 1267, -422, 8104, -1288, 428, -1239, 449,
            -420, 1268, -1263, 428, -1237, 452, -422, 1267, -420, 1268, -419, 1271, -396, 1292, -1239, 452, -418, 1269, -418, 8109, -1258, 431, -1285, 428, -392, 1296, -1235, 455, -1258, 430, -418, 1270, -397, 1292, -393, 1295, -418, 1272, -1262, 427, -417, 1270,
            -418, 8106, -1288, 428, -1236, 454, -395, 1295, -1256, 430, -1235, 454, -394, 1294, -392, 1296, -418, 1271, -397, 1291, -1238, 452, -417, 1271, -394]

This example when about 3 feet away:

  [08:08:26][D][remote.raw:028]: Received Raw: 1255, -434, 1252, -460, 389, -1278, 1256, -434, 1230, -483, 385, -1281, 415, -1275, 410, -1279, 409, -1278, 1257, -458, 385, -1281, 412, -8141, 1256, -459, 1231, -438, 385, -1301, 1256, -436, 1253, -434, 385, -1303, 413, -1278, 387, -1301, 
[08:08:26][D][remote.raw:028]:   413, -1279, 1255, -433, 411, -1277, 414, -8139, 1256, -439, 1253, -432, 411, -1278, 1256, -436, 1254, -433, 413, -1278, 413, -1275, 411, -1277, 412, -1280, 1255, -433, 411, -1278, 413, -8141, 1259, -453, 1233, -433, 412, -1276, 1263, -429, 1253, -435, 
[08:08:26][D][remote.raw:028]:   413, -1276, 410, -1278, 414, -1277, 413, -1277, 1260, -429, 412, -1277, 411, -8140, 1257, -437, 1254, -433, 411, -1277, 1257, -433, 1255, -435, 411, -1279, 409, -1277, 414, -1276, 413, -1278, 1255, -432, 415, -1275, 416, -8134, 1257, -439, 1252, -433, 
[08:08:26][D][remote.raw:028]:   409, -1279, 1257, -435, 1253, -435, 412, -1277, 409, -1278, 412, -1278, 413, -1277, 1258, -431, 412, -1278, 412, -8138, 1257, -434, 1257, -431, 411, -1275, 1260, -445, 1243, -432, 413, -1277, 412, -1280, 410, -1274, 415, -1275, 1258, -432, 410, -1278, 
[08:08:26][D][remote.raw:041]:   413, -8139, 1255, -436, 1256, -434, 408, -1277, 1284, -409, 1255, -433, 410, -1276, 415, -1274, 413, -1277, 414, -1274, 1284, -408, 409, -1278, 414

and then this if I move remote closer:

[07:52:50][D][remote.rc_switch:256]: Received RCSwitch Raw: protocol=4 data='11011000010'