[OH3] Home Assistant autodiscovery with D1-Mini Tasmota (Pir as "Switch1")

hello to all!
I have a D1 Mini with Tasmota 9.2. With gpio5 I have connected a pir sensor and configured it with “Switch1” (160). I have also connected a DHT22 sensor.
Then I wanted to switch on the auto discovery function with the help of the following tutorial “[OH3] Tasmota via MQTT Autodiscovery”.

The following problem occurs when the thing is automatically created in openhab3:
The thing is created, but without a switch channel. The DHT22 sensor works perfectly.

My question:
What have I configured wrong on the D1 mini that openhab does not recognise the switch (Pir sensor)? I have read the tasmota docs, but they do not give me the answer. i.e.: supported-entities or Commands

the d1 mini has the following settings:

[10:21:41] cmnd/tasmota1_dht22/gpio 
[10:21:41] stat/tasmota1_dht22/RESULT {"GPIO0":{"0":"None"},"GPIO1":{"0":"None"},"GPIO2":{"0":"None"},"GPIO3":{"0":"None"},"GPIO4":{"1216":"AM2301"},"GPIO5":{"160":"Switch1"},"GPIO12":{"0":"None"},"GPIO13":{"0":"None"},"GPIO14":{"0":"None"},"GPIO15":{"0":"None"},"GPIO16":{"0":"None"},"GPIO17":{"0":"None"}}}

[10:26:08] stat/tasmota1_dht22/RESULT {"SetOption114":"ON"}
[10:26:36] stat/tasmota1_dht22/RESULT {"SetOption30":"OFF"}
[10:27:04] stat/tasmota1_dht22/RESULT {"SwitchMode1":1}

and this is the automatically created thing:

You can try out SetOption30 1 like described here

thanks for the hint!
But i already tried itout without success. i noticed, that tasmota does not create a auto discovery topic for the binary sensor at startup. it should be send a topic like “homeassistant/binary_sensor/switch1/config = …”. so openhab cannot recognize the sensor without this topic
i created a issue at tasmota repo #10660

check the logs for any warning of missing transforms. You need to ensure you also add the Jinja? transform before it will work.

i have all the required transformations installed. all other tasmota sensors are working. only the switch channels is missing …

ok, now it works (i resetted the d1 mini and configured it new).
to use mqtt autodiscovery with (tasmota)switches in openhab you have to set the following:
“switchmode1 1” -> binary sensor (ON/OFF)
"switchtopic " -> must be set to a custom value, to use mqtt autodiscovery for switches (acc. to. supported entities)
“setoption19 1” -> enable homeassistant auto discovery

1 Like