Sonoff basic with Tasmota - can change even when it is powered off

What would you like to happen when you unplug your Tasmota device?

Have a look at this post. The first topic is about openHAB knowing whether your Tasmota device is connected to your MQTT broker (basically off/on or connected/disconnected from WiFi). The second and fourth topics combine for a simple way of ensuring that openHAB Items are updated after you reconnect your Tasmota device.

If you’re using Sitemaps you can use the visibility parameter to dynamically hide controls depending on the state of an Item. So you can hide your Tasmota controls if the Tasmota device is not reachable.