I forked the lutron-caseta-pro project and added long and double press to pico-remote. If you already have this custom_components setup, you just need to:
add 64 to original button value to register double press, add 128 to register long press. e.g., if the button value is 1, use 65 for double press and 129 for long press.
set enable_long_and_double to False will fallback to original behavior.
Once long and double press is enabled, there would be no more physical button release event. Instead a single release (set state to 0) will immediate follow the press event.
Note that due to the nature of the communication, if you set the double press time to be really small then you will end up getting two single press. I found 0.8s to be a good value to start. The long press is pretty reliable. Be cautious that you should not hold the button for extended period of time (>5s) that might put the controller to factory default
@Dalong
Just a heads up that 2021.12 is throwing warnings about this custom component
(<class 'custom_components.lutron_caseta_pro.sensor.CasetaPicoRemote'>) implements device_state_attributes. Please report it to the custom component author.
From what I’ve seen with other components, it might be an easy change, but not sure.
BTW, love the double tap and long press capabilites. This has been a game changer for me. Thanks
Looks like another easy update and there is a year before it matters
[homeassistant.components.fan] SUPPORT_SET_SPEED was used from lutron_caseta_pro, this is a deprecated constant which will be removed in HA Core 2025.1. Use FanEntityFeature.SET_SPEED instead, please create a bug report at Pull requests · coldfire0200/lutron-caseta-pro · GitHub
I promise I wont keep bothering you @Dalong . Looks like some of this integration will break in 2025. I really like the double tap and long press support. If you’re able to update that would great. Thank you for this