Here’s the error I’m getting in hassbian and the AIO
ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform caseta
Traceback (most recent call last):
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py”, line 164, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File “/usr/lib/python3.5/asyncio/tasks.py”, line 400, in wait_for
return fut.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/asyncio/tasks.py”, line 239, in _step
result = coro.send(None)
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/sensor/caseta.py”, line 92, in async_setup_platform
yield from async_add_devices(devices)
TypeError: ‘NoneType’ object is not iterable
I just got the Pro bridge tonight to replace my non-pro, since I’m all-in on hass.io I spent some time to figure it out and make it work. Basically you need to make a few changes to the light/caseta.py sensor/caseta.py and switch/caseta.py file
Change this line:
from homeassistant.components import caseta
to:
from custom_components import caseta
and then it should work.
I repackaged the files with my changes at put them in this git repo
Hope it helps someone else. Has anyone tried this version with serena shades?
So to answer my own question - it works with serena shades, but they show up as dimmers. They will work by adjusting the brightness to raise/lower. If I have some free time I’ll attempt to implement a proper cover component.
I will probably fork it with some improvements in a few days. I just modified it to get better names from the JSON: The plugin doesn’t know about “areas” so you end up with 10 “main lights”. I’ve got it prepending the “area name” so it’s “Living room main lights” which I find more useful.
Right now the pico remotes have one output which is a bitmask of the pressed buttons. I am just getting started with HA so I’m not sure if that’s the most useful way or if it should be setting some kind of enumeration like “on” “off” “up” “down”. Does someone with more experience setting up HA have an opinion?
Use the “Send Integration Report” option to email yourself a copy of the integration JSON
Once you have the Integration Report, place the JSON file in a /.homeassistant/caseta_[Lutron bridge IP address].json file
Add the following to your /.homeassistant/configuration.yaml file. You have to manually identify any on/off switches as such or everything will be treated as as a dimmer. You can find these Device IDs from the Integration JSON file.
Added Configurator support to paste in the Integration Report in the frontend
Code cleanup and re-organization, linting etc.
Readme file with custom component and config instructions
I have tested primarily in hass.io and since everything is within the configuration directory, it should work with most installations.
This could form the basis of an official component in Home Assistant, but first it needs testing by a wider audience. The casetify module code also needs breaking out to its own library and publishing to PyPI.
The lutron_caseta component was also just updated to use the undocumented TLS interface and the Pull Request was accepted three days ago, so I think it best to avoid being confused with that update for now.
Just installed and moved over from jhanssen’s custom component… seems to work great! Fixed my switch (only have 1) that would lose its state on reboot.
Found another bug. In light/caseta.py it’s formatting transition times as :XX.Y (basically just putting a : on front of seconds). This is an error, because the hub wants one of: SS.ss, SS, MM:SS, or HH:MM:SS (from http://www.lutron.com/TechnicalDocumentLibrary/040249.pdf ). The easiest thing to do is remove the : and then setting transition times works.
Unfortunately, footnote 1 is Fractions are rounded up to the closest 1/4 second. I was hoping for instant on/off, but I can’t get the dimmer to transition any faster than about 1/4 second, even passing every flavor of zero (or even negative) to that time.
I fixed the transition formatting and pushed an update. I had assumed it was done on purpose but now I’ve fixed it to use float for less than 60 or HH:MM:SS for > 60 seconds.
I am used to the Caseta out-of-the-box timing of 1 second ramp up time so I find the 0.25 to be quite fast. It’s a pity Lutron does not allow that level of programming in the app for all the Picos and keypads.