I wasn’t sure where to put this, but I am having a problem getting the Lutron Caseta Integration to setup. I think that this is because I have no buttons with my system.
I am pretty sure that the fix is to change pylutron_caseta/smartbridge.py line 929 from:
for button_json in button_expanded_json["Buttons"]:
To:
for button_json in button_expanded_json.get("Buttons", []):
I tried to do this, but clearly I don’t understand enough about how docker or patching or pretty much anything works.
Here are my logs:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 388, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/lutron_caseta/__init__.py", line 176, in async_setup_entry
await bridge.connect()
File "/usr/local/lib/python3.11/site-packages/pylutron_caseta/smartbridge.py", line 105, in connect
await self._login_completed
File "/usr/local/lib/python3.11/site-packages/pylutron_caseta/smartbridge.py", line 695, in _login
await self._load_ra3_devices()
File "/usr/local/lib/python3.11/site-packages/pylutron_caseta/smartbridge.py", line 800, in _load_ra3_devices
await self._load_ra3_control_stations(area)
File "/usr/local/lib/python3.11/site-packages/pylutron_caseta/smartbridge.py", line 856, in _load_ra3_control_stations
await self._load_ra3_station_device(
File "/usr/local/lib/python3.11/site-packages/pylutron_caseta/smartbridge.py", line 929, in _load_ra3_station_device
for button_json in button_expanded_json["Buttons"]:
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'Buttons'