Sonoff sv not all entities are discovered

Hello

For a while I hade two sonoff sv has the same configuration one for garage door and the other one for a gate.

The one connected for the gate I soldered a wire to the switch so it can be toggled using the doorbell which is hikvision and I used a reed switch in gpio14 to get gate state and it was working very will for a long time until recently I updated the doorbell firmware which makes the relay to normally closed causing the sonoff to reset… I reconfigured the doorbell and sonoff again.

Everything is normal now except one thing, the switch 2 which is reed switch is not discovered by HA.

I use the UI for the most of my configurations, in the tasmota integration there was 11 entities for garage door which includes the reed switch, but for the gate there was only 10 entities the reed switch is not one of them. I can see in console the state of it changing when ever I connect or disconnect the reed switch.

These are my configurations
GPIO14 set to switch 2
Switchmode1 0
Switchmode2 2

I’m sorry for the long story and I appreciate it if read it and hoping someone can help me.

finally, I got it
I managed to find this command
setoption114 1 (to detach all switches)