I've been using an LED strip with a Magichome controller running Tasmota for more than a year now. A while back I set up a long press to trigger a stateless programmable button in my HomeKit setup. What I ended up actually using the long press for was a kind of nightlight toggle: If the lights were set to more than 50% I'd set them to 5% and vice versa.
But this setup has a ton of moving parts so from time to time it'd stop working. I knew of Tasmota's rules functionality, so I wanted to switch to it thinking this really should done be on device.
Since figuring how to do this took me a bit of time. I thought I'd write up a small explainer.
Keywords: Tasmota long-press dimmer toggle, Tasmota rules conditional, Tasmota dimmer high-low toggle, Tasmota rules long press action, Tasmota long-press trigger.
Some background settings:
Backlog SwitchMode 5; ButtonTopic 0; SetOption73 1; SetOption32 12