Why does not this automation based on press on a dimmer wheel work reliably?

I solved it with the help of @tom_l in this thread. It was similar to your suggestion, but with a series of conditions that filtered out everything but the physical press. :grin: