Lutron Caseta FileNotFoundError: [Errno 2] No such file or directory

I have followed the Lutron Caseta instructions here: https://www.home-assistant.io/integrations/lutron_caseta/

As per the directions, I have placed my three files in the configuration directory (…/Home-Assistant/CONFIG_DIR) and modified my …/CONFIG_DIR/configuration.yaml file accordingly:

lutron_caseta:
  - host: 192.168.X.X
    keyfile: caseta.key
    certfile: caseta.crt
    ca_certs: caseta-bridge.crt

After restarting the HA server, the Lutron badge appears on the integrations page with a “Configure” button and this gets logged:

Traceback (most recent call last):
  File "/opt/Home-Assistant/lib/python3.8/site-packages/homeassistant/components/lutron_caseta/config_flow.py", line 84, in async_validate_connectable_bridge_config
    bridge = Smartbridge.create_tls(
  File "{...}/Home-Assistant/CONFIG_DIR/deps/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 59, in create_tls
    ssl_context.load_verify_locations(ca_certs)
FileNotFoundError: [Errno 2] No such file or directory

If I click the button to configure, I get an error, and the badge disappears.

I’ve combed through google results and just can’t figure out where I am going wrong. I haven’t been successful in figuring out where the code is expecting to find the files. I’ve copied them into probably 10 different places and no-go.

I’m having this exact same error after upgrading past 109.6. Any of the releases after that give me this error.

I “think” I sorted out that the problem is the python version. I am still a noob, but the git code seemed to indicate that it was looking for the files in …/python3.7/… and mine were in …/python3.8/…

I started up a fresh docker image of HA with the latest version, put the files in the config directory, edited the .yaml, restarted HA and my lights were available!

Thanks for the follow up. I’m using Python 3.7, so I’m not sure it’s the same issue. Also, I’m not using a docker image. I’m using the python virtual environment, so the setups might be a little different. I’m curious to know what fixed it when you set up a fresh docker.

It’s hard to say what fixed it. My initial install was on my QNAP NAS using a community repo v109.6 HA with python 3.8. I stopped that service and started a docker with 110.4. The config directory on my qnap was /CONFIG_DIR and on the docker is /config. There are so many variables there to try to pinpoint what the actual fix was. But, I hope this helps some.

FYI, I was able to resolve this by listing the full path of the cert files in the configuration.yaml. I had asked this question in another thread to find this answer, but listing it here in case anyone else runs into this issue.

From:
keyfile: caseta.key
certfile: caseta.crt
ca_certs: caseta-bridge.crt

To:
keyfile: /home/homeassistant/.homeassistant/caseta.key
certfile: /home/homeassistant/.homeassistant/caseta.crt
ca_certs: /home/homeassistant/.homeassistant/caseta-bridge.crt