New Caseta Integration

Very happy to have Lutron Caseta integration back. It also seems like this is using a “supported channel” so hopefully there won’t have to be anymore hacks/workarounds.

I have generated the certs and have everything working well. Except one major show stopped, for me at least.

In the new app you can “group” items. So let’s say I have a master bedroom light and fan. I also have a Office light and fan. I have a kids bedroom light and fan.

I have three groups: Office, Master Bedroom and Kids Bedroom. Under each of those I have a “Lights” and “Fan”.

This works out absolutely great for the Caseta app. I see “Kids Bedroom” and i just have “Lights” and “Fan”

Within Alexa smart home I see “Kids Bedroom Lights” and i see “Kids Bedroom Fans” - perfect!

Here’s my issue with home-assistant: Things show up as light.lights_* where * is a random number. That itself was not quite a problem.

homeassistant:
   customize:
     light.lights_1: 
       friendly_name: Kids Lights

And we are good to go.

EXCEPT…every time I restart home assistant, light.lights_* ordering changes. I’m ASSuming that the caseta component is passing in “light.lights” for multiple devices and HA is going “i have a light.lights, append _1, append _2, etc”.

So a couple questions:

Is there a way to read the “zones”? I see a Device ID and a Zone ID. If i could map the Zone ID to a group this would be great.

If not - could some “sanity check” be put in place in the caseta component where if a device name is equal to

switch.fan
switch.fans
light.light
light.lights

Then append the Device ID? I could work around that with a friendly_name, then.

Hi, I’ve been frustrated with this new issue too…finally looking in to it, I’ve found that the dictionary coming back from smartbridge has a key named “FullyQualifiedName” which is a list. That last element of the list is also the value of the “Name” key.

{"href":"/device/5","Name":"Lights","FullyQualifiedName":["Kitchen","Lights"],"Parent":{"href":"/project"},...

Referencing code: https://github.com/gurumitts/pylutron-caseta/blob/dev/pylutron_caseta/smartbridge.py#L321
Change line from device_name = device["Name"] to device_name = " ".join(device["FullyQualifiedName"]) does the trick for me.

You can test by modifying pylutron_caseta/smartbridge.py in <config-dir>/deps/lib/python3.5/site-packages/

My results:

2017-12-31 18:45:39 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: new_state=<state switch.kitchen_lights=off; Device ID=5, Zone ID=3, friendly_name=Kitchen Lights @ 2017-12-31T18:45:39.457162-08:00>, entity_id=switch.kitchen_lights, old_state=None>```

complete newbie here, how exactly would I go about updating the smartbridge.py? running HASSIO on RPI-3. I do not see any files or folders in the config/deps folder. does this need to be done from command line?