@Nasser how do you configured your module, that openhab auto creates a switch channel?
i use a D1 mini with a PIR sensor attached and do not get a “homeassistant/switch/*” topic from tasmota.
i have created a issue here: https://community.openhab.org/t/oh3-home-assistant-autodiscovery-with-d1-mini-tasmota-pir-as-switch1/114921/3