The goal of my piston to tell whoever is in the kitchen to feed the dog if it is within the right timeframe (morning) and the dog has not yet been fed (cupboard with dog food has not been opened) but only remind us once per hour. Most days it works fine, but some days it will fire multiple times within 30-45 seconds. It feels like a race condition where the motion sensor fires multiple times and the variable is not set yet as multiple executions happen in parallel. From my programming days, I would expect to use a lock statement around the checking and setting of my variable FeedFerrisMorning_LastHour.
Any ideas on how to fix this? Thanks!
Here is my piston: