I'm looking for feedback on how I could accomplish the following:
Given that I have a remote device that produces a "On Pressed" "On Released" event when a button is pressed, and subsequently released, but not one for when it is held.
I would like to know in an automation the time between the pressed, and the released triggers, so that I can perform an action based on them.
The use case is I have a lutron Caseta pico remote, and I want to use the center button to set, and activate a specific brightness value for a light.
I've worked out that i'll need a helper to save the favorited value, but i'm not sure what the best way is to say "if pressed is held for 5s do path A, if pressed is released in <1s do path B"