i use a lot of Xiaomi Door/windows Sensor (old and new one). All working good but i have one Problem. When Openhab restart or the Items File is changed and reloaded the Status of the Door Sensors is unknown until i open the Windows/Door. is there any possibility to change that so that after a restart the right Status is shown?
This is normal behavior. All of the states are only temporary and gone if you reload or restart the items engine or openHAB.
To keep the states between those, you have to “persist” those status. You can choose from different persistence services and all of your states will be saved there.
I recommend the MapDB persistence, which just saves the latest state. If you add restoreOnStartup to the strategies, all states will be restored on restarting openHAB or reloading items files.