Lutron Caseta Interface

Hi @upsert !

First, thank you for this fine bit a of work!

I already have Caseta Smart Bridge Pro, but I am near my 50 device limit. I was thinking of picking up Ra2 select bridge to start extending my system (really excited about the occupancy sensors). Would it be possible to run both bridges using your custom component? I rather not have to run the standard caseta integration and your component for the ra2 select stuff. Thanks!

Yes, it certainly works and I have tested that setup with two hubs.

It helped to have a spare mobile device (i.e. an old phone/tablet) to run the app on the different account required for the new hub. Delete from one, then add it to the other. The Lutron app does not have easy account switching and it is easier to keep the spare phone around to make adjustments.

One catch I encountered is that Google Assistant will only support one hub. It seems to be a limitation on the part of Google that assumes you only have one integration of each type and it won’t let you add it again.

Also, I assume you are aware that you cannot add any Caseta devices to a Ra2 Select bridge. The only hardware that works on both models are the Pico remotes and some of their shades.

Continuing the discussion from Lutron Caseta Interface:

Great news, and thanks for the confirmation! Yup I understand about not being caseta compatible. I only really want to add fan controls which seem to be RA2 select only, and maybe a few more switches (the RA2 stuff is so much more expensive!), but i am really excited about the occupancy/motion sensors, we use them at work for commercial lighting and they work amazingly well.

This component seems to offer a lot more than the Lutron component and I was wondering if it supports standard RadioRA2? Is the step of having to generate an integration report (instead of pulling from the repeater) due to a different with Caseta Pro and RadioRA2 select? Thanks!

The RadioRA2 integration report is in a completely different format.

If there is a developer out there with a RadioRA2 Main Repeater, I’m sure the component could be improved with additional HA platforms. Post something in the Feature Requests and it might get picked up.

Thanks for the reply. I figured that out after posting. While not a programmer, I have a basic understating of coding and would be happy to contribute if there’s a want for it.

I’ve got a good way to control Hue bulbs with pico remotes. Message me if you still haven’t figured it out.

So can anyone say if the newest version of HA is still working with the custom component from @upsert? Been a while since I updated and feel I should probably update now.

Yea, still working great with the latest release

2 Likes

Thanks!
10char

I have updated the custom component with a potential fix for an issue where the state of switches is not retained after an upgrade or occasionally errors happen on restart.

If you are running the component, please update to the latest and post any feedback here or on the Github issue.

I have a python script to do the actual controls

    ###pico_control_light.py

entity_id = str(data.get(‘entity_id’))
action = data.get(‘action’)

states = hass.states.get(entity_id)
current_level = states.attributes.get(‘brightness’) or 0
if (action == “on”): # Turning lights on
data = { “entity_id” : entity_id, “brightness” : 255 }
hass.services.call(‘light’, ‘turn_on’, data)

elif (action == “off”): # Turning lights off
data = { “entity_id” : entity_id}
hass.services.call(‘light’, ‘turn_off’, data)

elif (action == “up”): # increase brightness
new_level = current_level + 51
data = { “entity_id” : entity_id, “brightness” : new_level }
hass.services.call(‘light’, ‘turn_on’, data)

elif (action == “down”): # decrease brightness
new_level = current_level - 51
data = { “entity_id” : entity_id, “brightness” : new_level }
hass.services.call(‘light’, ‘turn_on’, data)

elif (action == “fav”): # favorite /40% for now
data = { “entity_id” : entity_id, “brightness” : 100}
hass.services.call(‘light’, ‘turn_on’, data)

It’s called by the following from automations.yaml ( this could be improved but why fix what works…)
#### living room Hue pico ###########

Pico state codes

- On: 1

- Up: 8

- Fav: 2

- Down: 16

- Off: 4

  • alias: Living Room On
    initial_state: True
    hide_entity: True
    trigger:

    • platform: state
      entity_id: sensor.office_Pico_1
      to: ‘1’

    action:

    • service: python_script.pico_control_light #pico handling of hue lights
      data:
      entity_id: light.living_room
      action: “on”
  • alias: Living Room Off
    initial_state: True
    hide_entity: True
    trigger:

    • platform: state
      entity_id: sensor.office_Pico_1
      to: ‘4’
      action:
    • service: python_script.pico_control_light #pico handling of hue lights
      data:
      entity_id: light.living_room
      action: “off”
  • alias: Living Room Brighter
    initial_state: True
    hide_entity: True
    trigger:

    • platform: state
      entity_id: sensor.office_Pico_1
      to: ‘8’
      action:
    • service: python_script.pico_control_light #pico handling of hue lights
      data:
      entity_id: light.living_room
      action: “up”
  • alias: Living Room Dimmer
    initial_state: True
    hide_entity: True
    trigger:

    • platform: state
      entity_id: sensor.office_Pico_1
      to: ‘16’
      action:
    • service: python_script.pico_control_light #pico handling of hue lights
      data:
      entity_id: light.living_room
      action: “down”
  • alias: Living Room Favorite
    initial_state: True
    hide_entity: True
    trigger:

    • platform: state
      entity_id: sensor.office_Pico_1
      to: ‘2’
      action:
    • service: python_script.pico_control_light #pico handling of hue lights
      data:
      entity_id: light.living_room
      action: “fav”
1 Like

Yeah Python scripts are excellent for working with the powerful capabilities of the Pico remote… but FYI, you can remove all but one of your automations and have the same functionality you could trim that way down.

Just use Python variables in your script to store the integer values of the Pico sensors, you could eliminate all of your Automation code except for just one of them… saving tons of lines of automation code to manage.

#At the top of your Python script...
PICO_ON = 1
PICO_FAV = 2
PICO_OFF = 4
PICO_UP = 8
PICO_DOWN  = 16

I have mine working with one simple automation for each pico remote (vs a copy/paste automate for all 5 states for each remote), that calls one Python script to handle all the logic and various scenarios I want that remote to support.

Example Automation:

  #This controls the normal 5 Buttom Pico Dimmer Switch to sync up with the build in Lutron States!
  - alias: Living Room Caseta Pico Switch
    hide_entity: True
    trigger:
      #We want to Trigger on ANY state change, therefore no from/to value is specified
      platform: state
      entity_id: sensor.living_room_pico
    action:
      - service: python_script.pico_living_room_switch

###Python Script:

# Obtain status of the Pico Remote
pico_status = hass.states.get("sensor.living_room_pico")
pico_state_value = int(pico_status.state)

#DEBUG Notification via Pushover
#hass.services.call("notify", "pushover", {"message": "Living Room Pico Switch [Pico={0}]".format(pico_state_value)})

service_data = { "entity_id": "group.living_room_lamps" }

#NOTE: On button == 1 (Full ON)
#NOTE: Center scene button == 2 (Center Scene Button)
if pico_state_value == 1 or pico_state_value == 2:
	#For full ON state we set to 100% brightness
	service_data["brightness_pct"] = 100
	hass.services.call("light", "turn_on", service_data)

#NOTE: Off button == 4 (Full OFF)
elif pico_state_value == 4:
	#For full OFF state we turn the lights off
	hass.services.call("light", "turn_off", service_data)
2 Likes

Spotted a new filing on the FCC.

Looks like Lutron may grant the long-standing request for a fan speed controller on Caseta. Model PD-FSQN if the label is correct. Up to 1.5 amp ceiling fans.

May have to dust off my custom component for Smart Bridge Pro / Ra2 Select and add ‘fan’ platform support. There are fan controllers on Ra2 Select since launch but have not got around to it and I do not own a fan.

Hey upsert, I’m still using your custom component. Any interest in turning it into an official integration?

3 Likes

Ditto! Excellent component that I love dearly :wink: Making it official would be fantastic.

Is it possible to get the “Smart Away” scene into Home Assistant? I’d love to be able to toggle it in an automation when I’m on vacation.

I’ve accepted a pull request on my component and built on it to add full support for fan platform including set_speed and speed_list.

Also a minor potentially breaking change to make area_name, integration_id and scene_id attributes lowercase and snake case.

If I find more time I will try to make some kind of official component, but I don’t know what the timeline will be. I would need to make a library in PyPI which I have not done before and there are some things I would like to rewrite. I’d like to have it supported and configured through integrations in the front-end.

3 Likes

Any word on getting your work merged into HASS? Been holding off updating HASS waiting for this.

The custom component works fine up through the current versions of HASS.