Thanks but at the end I got a trigger sensor from Taras and it is working well.
I marked that topic as solved but it was not really a solution, more a workaround.
I did open a new one, this one, to go to the bottom of the reason why it was not always true
or false
.
Even if I don’t have the end of the story yet, I’d assume that it is about the performances of my RPi and will see how it behaves the day I’ll change it. It will be fairly easy to assess as today, this sensor is unknown at least 2 or 3 times per day.
P.S.: For who is interested in the trigger sensor, here is the link to the topic, look at the post marked as solution.