Double and long press support for lutron-caseta-pro

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:

  1. overwrite (do backup first) the original script with files in https://github.com/coldfire0200/lutron-caseta-pro
  2. add these lines to configuration file:
      enable_long_and_double: True
      long_press_time: 1.4
      double_press_time: 0.8
  1. 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.
  2. set enable_long_and_double to False will fallback to original behavior.
  3. 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

3 Likes

@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

@ptdalen

Fixed. Thanks for reporting!

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

Thanks for this integration. I use it often

1 Like

@Dalong - Looks like I forgot to tag you in my post. Just tagging FYSA. Thanks again

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