Aside from a few people mentioning that Lutron’s Pico remotes work with the various Lutron / Caséta components, I haven’t seen a good guide or any examples on how to integrate them directly into Hass.
Can anyone provide an example config or a bit more info on how to capture the button presses?
Lutron has 2 different remotes. The Pico remote works directly with Lutron switches and I’m not sure you can use that version separate from a switch. The Lutron connected remote is a Zigbee device and it can be used as a standalone remote.
If anyone else finds it useful, here’s a simple Pico automation I made to control my bedroom lights (hue), and use the center (fav) button to toggle the lights in the rest of the house.
FWIW - I do have the Lutron Caséta Pro hub.
# Pico state codes
# - On: 1
# - Up: 8
# - Fav: 2
# - Down: 16
# - Off: 4
# Turn on the lights outside of the bedroom if they're all off
- id: br_pico_fav_on
alias: BR Pico fav button pressed
initial_state: True
trigger:
- platform: state
entity_id: sensor.pico
to: '2'
condition:
condition: state
entity_id: group.non_bedroom_lights
state: 'off'
action:
service: homeassistant.turn_on
entity_id: group.non_bedroom_lights
# Turn off the lights outside of the bedroom if any are on
- id: br_pico_fav_on
alias: BR Pico fav button pressed
initial_state: True
trigger:
- platform: state
entity_id: sensor.pico
to: '2'
condition:
condition: state
entity_id: group.non_bedroom_lights
state: 'on'
action:
service: homeassistant.turn_off
entity_id: group.non_bedroom_lights
# Turn on the bedroom lights
- id: br_pico_on
alias: BR Pico on
initial_state: True
trigger:
- platform: state
entity_id: sensor.pico
to: '1'
condition:
condition: state
entity_id: group.bedroom
state: 'off'
action:
service: light.turn_on
entity_id: group.bedroom
# Turn off the bedroom lights
- id: br_pico_off
alias: BR Pico off
initial_state: True
trigger:
- platform: state
entity_id: sensor.pico
to: '4'
condition:
condition: state
entity_id: group.bedroom
state: 'on'
action:
service: light.turn_off
entity_id: group.bedroom
# Brighten the bedroom lights
- id: br_pico_up
alias: BR Pico up
initial_state: True
trigger:
- platform: state
entity_id: sensor.pico
to: '8'
action:
service: light.turn_on
entity_id: group.bedroom
data_template:
brightness: >
{% if is_state('group.bedroom', 'off') %}
51
{% else %}
{% set suggested = states.light.dereks_lamp.attributes.brightness + 51 %}
{% if suggested < 256 %}
{{ suggested }}
{% else %}
255
{% endif %}
{% endif %}
# Dim the bedroom lights
- id: br_pico_down
alias: BR Pico down
initial_state: True
trigger:
- platform: state
entity_id: sensor.pico
to: '16'
action:
service: light.turn_on
entity_id: group.bedroom
data_template:
brightness: >
{% if is_state('group.bedroom', 'off') %}
0
{% else %}
{% set suggested = states.light.dereks_lamp.attributes.brightness - 51 %}
{% if suggested < 0 %}
{{ suggested }}
{% else %}
0
{% endif %}
{% endif %}
Is this now showing up because the connection changed to using ssl? What I don’t see is any entity that matches sensor.Pico_1 and attempting to directly call it via the automation examples above does seem to work. when I press any buttons on it nothing shows up in the console.
Do I have to manually add the sensor under sensor:? if so what type is it?
That is just the output from the Lutron caseta component while it starts up and enumerates the devices. The non-Pro bridge does not send any events for Pico button presses and the component will not create any sensors for you. You need the Pro bridge for that and a custom component.
It’s really weird that the bridge will send the pico devices but not the events from them but yes I modified the existing smartbridge.py and I don’t see pico button pushes showing up to process. Fixing the components would be easy enough but if there is nothing coming in to process then we’re SOL.
Thanks for your code! You do have a typo though. In the “Dim the bedroom lights” part of your code you have the line {% if suggested < 0 %}. The comparator is switched. It should be {% if suggested > 0 %}.
This code works better for Brighten: brightness: "{{ [255, state_attr('light.hue_color_lamp_1', 'brightness')|int(0) + 51]|min }}"
Use this for Dimming: brightness: "{{ [0, state_attr('light.hue_color_lamp_1', 'brightness')|int(0) - 51]|max }}"
Makes it cleaner. Instead of an “IF, THEN” it uses a Min/Max checking to see if 0/255 is lower or higher than the specified value and uses the appropriate Min/Max.
Can anyone share an example of how the data template is used in the hassio GUI automation configuration?
I’ve looked all over google - but not found an example where the screen highlighted data template. Perhaps I’ve also overlooked something in the documentation, but I can’t find any examples there either, on a search in this community.
I couldn’t find an easy way to generalize using a pico remote for any non-lutron light, so I created a quick python_script for HA. This requires the PRO version of the lutron hub and the custom lutron component. Once setup, the below automation will work for any non-lutron light with very little boiler plate.
Dave, been trying to thing of a way to handle the dimmer part for a few weeks now. Just rolled this out and working great.
I’m not a script guy, any way to make the favorite button toggle through some different colors?
Thank you Dave, this is awesome. Saves so much work and reduces the number of automations significantly! Just FYI for anyone, the zero in the trigger of the automation needs the apostrophe and should be ‘0’ instead of 0.
I’ve been using this Python script with reasonable success, but is there any way to progressively dim the lighting while holding the pico brightness up or down?
I got the Pro Bridge (L-BDGPRO2-WH) and I can see the switches in HA, however, I don’t see any sensors created for any of the PICO remotes I added via the Lutron app.
Is there any special procedure to get access to these remotes in HA?