Thanks @erikg. I like to minimize lines of code so I personally don’t use variables for static values. However, I will update the BP to use the nested choose statements since it would optimize the code logic.
I updated the BP with the nested choose statements.
I also forgot that templating support was changed a few updates ago to be automatically “understood”. Makes for much cleaner code. Thanks again @erikg
So the 2-button remote has a name of PJ2-2B-GXX-X01 (Pico2Button) and has the same button numbers (2 == on, 4 == off). Is there any way to specify multiple device constraints for a selector? Or a regex for the model string?
However, selector will only accept a dictionary (not a list), and model will only accept a string (no list or regex). If there’s a workaround, you could cover both remotes with this one blueprint vs. having to have separate blueprints for each.
An alternative would be to leave off the ‘model:’ entirely, but then you get ALL the Lutron devices, not just Pico remotes.
You can probably replace the model with a variable or allow the model to also be a separate input…even a toggle eg. If PJ2-2B-GXX-X01 toggled on then.....etc
Allowing multiple pico remote options isn’t the point of concern for me though. It’s with regard to how confusing the UI will become and also how bloated the yaml structure would become for such a simple automation. Having used a few other consumer automation platforms has made me a firm believer in the KISS principle.
To me, adding multiple remotes does not increase the value of the BP enough to make it worth the extra complexity. Just my opinion of course and I’m sure many may disagree. I’d be happy to test and help implement such a blueprint but I won’t be updating my BP to support that. At least not until the HA devs allow for better UI options with the Blueprint editor (like hiding entire sections based on user input). At that point, at least it would act more like an app and wouldn’t be confusing to the user.
In this case, though, the 2-button remote can work with this blueprint without any modifications to the trigger/action sections. Obviously any actions you assign to the middle/raise/lower buttons will have no effect for the 2-button remote, but the rest of it works as-is. That’s why I was looking for a way to allow both types of remotes to be selected in the input selector.
This and the 2 and 4 button BPs are great. I had to make a 4th BP just for the Fan Pico. As it’s model number is 1 character different from the standard Pico. (PJ2-3BRL-GXX-F01). I just copied stephs and swapped out the model number. Other than leaving the model selector out is there an easier way without having to add another BP?
Unfortunately, BP’s don’t let you pick and choose models…so the only options would be a single Pico model or All Lutron devices. There is a feature request to allow lists in selectors but I dont think that feature would be added anytime soon.
There was a pretty sweet automation in Lutron Caseta Pico Remotes and Node-Red that detects multiple and long press from a pico remote, I know this is using a different integration where the remote is an entity and not just firing events but I was wondering if the same logic could be added to the blueprint to surface these interactions with the remotes?
The picos don’t natively send any “held” events. The only was to capture these would be by using timestamps, etc. I have tried these type of synthetic button events on other automation systems and historically they haven’t been reliable. I haven’t tried it with HA but I suspect it would be the same…unreliable. I may give it a shot when I have some extra time in the future. Feel free to use my existing BP as a template if you feel comfortable editing it.
When did the core integration get updated to work with pico remotes? I thought that was only possible on the upsert custom integration… any reason to stay on that now that it’s available in core?
I’m not sure “restart” is the best mode for this (though I’m not sure which is tbh). Took me a few minutes to figure out, but I had a script that I was triggering off of the “favorite” button that takes several seconds to run (Sonos grouping) and it was failing to complete until I changed the mode to “queued”.
I assume “restart” was stopping the execution of the script when the “Release” event came in, as the script ran fine if I held the button down until it finished . Probably only relevant for complex scripts/actions – I would assume single actions would complete before the “Release” event came in.
Anyway, with that little tweak it seems fine – this will make setting up the rest of my pico remotes much easier. Thanks!
Yeah…there’s no “correct” mode as it would depend on what the Automation is designed to do (ie multiple quick actions, long extended actions with delays, etc).
I wonder if I can have the mode as a UI option now that the latest HA update allows “select” selectors.
Will look into it.
I added an option to select the mode the automation will run in. The select selector worked perfectly for this use case. @ogiewon, @mattsheffiel (in case you wanted to update your BP’s to include this functionality).
Does anyone have an example for Up/Down for dimming/increasing lights or opening/closing shades? I’m currently just setting it to say 25% but there must be some good way to jump in 5-10% increments or something any ideas?
Thanks for all of the work you’ve done on this, I’ve been using it and it works great. I like the brightness increase but I really wanted to replicate the regular Caseta dimmers press and hold to increase and decrees brightness.
I followed these instructions to create an automation for smooth dimming since I use Deconz for most of my lights. Is this something that can be ammended to this blueprint or a whole new one has to be created?