I have a bunch of Z-wave water/leak sensors. I have setup automation for any state changes of 2 of the binary sensors in each device: water leak detected, low battery level.
If the "water leak detected" binary sensor goes from off->on, then a second or more later goes from on->off, the automation triggers twice, just as I wanted. However if both state transitions occur in the same second, I only get the automation for the off->on state change. Similarly, if the state first goes on->off then goes off->on in the same second, the automation only triggers for the on->off state change. Logs show all state transitions being detected correctly, only automation is the issue.