Tasmota SENSOR starts always in "ON" state on Sonoff Basic

Hi All,

maybe i just dont get it , but i subscribe to a basic contact(reed) connected to a
Sonoff Basic RF R2. The switch/contact is set on GPIO3 and working half fine. See console output of Tasmota below:


So far so good: whenever i open or close the contact, it throws the expected message!

In OH3 i also have successfully created the respective items to get the status via the respective mqqt command. See below:


Plus: i can switch it on and off, like charm.

However for the state of the sensor, things are not working 100%.
Whenever the Sonoff powers off and back on, the sensor “Switch1” starts in state “ON”.
even though the contacts are closed. It should be “OFF” when contacts are open on startup. Or am i wrong? I have tried eihter a Pull-UP or a Pull-DOWN. But same behavior for both. See below console output in Tasmota.


Any ideas what i miss?

So when your door is shut and you loose power it opens?

This is a TASMOTA software issue and you can’t do anything in the hardware to change that.

If you can’t change TASMOTA you will need to filter the messages coming into openHAB

The openHAB channel you showed us does not relate to the /SENSOR topic from the Tasmota.

You might also need to think about if you have a ‘retained’ message in your MQTT broker.