I also have gotten a similar issue when setting up a contact sensor, the
sensor won't trigger the automation unless I open the home app or the
actual contact sensor app. I'm almost certain that it's because the home
app is not consistent in checking ...