Tasmota light switch device with custom template not showing switch entity

I have a no-name/unknown-brand Tuya based switch that was reflashed to Tasmota 12.4.0 and with a custom template created as per the unknown device guide. Everything works (LED, Relay, Button). However, when configured to connect to HA via MQTT the device is only showing basic Tasmota entities but no switch entity.

I have Wireshark captures of the MQTT messages from this device, and a device which is working (both are running Tasmota 12.4.0).

Device without switch entity showing:

0....tele/tasmota_F07086/STATE{"Time":"2023-03-27T09:27:55","Uptime":"0T00:07:31","UptimeSec":451,"Heap":25,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER":"OFF","Wifi":{"AP":1,"SSId":"melonhead-iot","BSSId":"0A:55:31:02:66:94","Channel":11,"Mode":"11n","RSSI":70,"Signal":-65,"LinkCount":1,"Downtime":"0T00:00:03"}}0+..stat/tasmota_F07086/RESULT{"POWER":"OFF"}1...stat/tasmota_F07086/POWEROFF

Device with switch entity (working device):

0+..stat/tasmota_6D31C0/RESULT{"POWER":"OFF"}0...stat/tasmota_6D31C0/POWEROFF0...cmnd/tasmota_6D31C0/Power1OFF0+..stat/tasmota_6D31C0/RESULT{"POWER":"OFF"}0...stat/tasmota_6D31C0/POWEROFF0...cmnd/tasmota_6D31C0/Power1OFF0+..stat/tasmota_6D31C0/RESULT{"POWER":"OFF"}0...stat/tasmota_6D31C0/POWEROFF

From Tasmota and MQTT’s perspective, the only difference between these two devices is the templates, which are:

Device missing switch entity

{"NAME":"Nobrand 1G Switch","GPIO":[0,0,0,0,0,64,0,0,0,0,0,224,544,0],"FLAG":0,"BASE":18}

Device with switch entity (working)

{"NAME":"Deta 1G Switch","GPIO":[0,0,0,0,544,0,0,0,0,224,0,0,64,0],"FLAG":0,"BASE":18}

The differences are just which GPIO the Ledlink, Button, and Relay are linked to. Note that the values are in different positions but they are still 64,224,554.

I just don’t get why the newer device is not showing the switch entity in HA.