Cant add custom_quirks_path to configuration.yaml

i am trying to add a quirk for a thermostat, i have created the directory /config/custom_zha_quirks/ and have added this directory to configuration.yaml in the following format
zha:
custom_quirks_path: /config/custom_zha_quirks/
however i receive the following error message

The system cannot restart because the configuration is not valid: Invalid config for [zha]: not a directory for dictionary value @ data[‘zha’][‘custom_quirks_path’]. Got ‘/config/custom_zha_quirks/’. (See /config/configuration.yaml, line 17).

any help would be appreciated

1 Like

Did you indent the second line? You need to paste code as preformatted text (now in the cogwheel menu in the toolbar) or we can’t tell.

zha:
  custom_quirks_path: /config/custom_zha_quirks/

thank you for your reply sorry yes it is indented.

zha:
  custom_quirks_path: /config/custom_zha_quirks/

Your path is wrong. When checking if the config is right or wrong, HA checks that the path exist and that it’s a valid directory.

You should have:

zha:
  custom_quirks_path: /config/custom_zha_quirks

(Remove /homeassistant/)

Hi thanks for this i have just tried


# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

# Text to speech
tts:
  - platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

zha:
  custom_quirks_path: /config/custom_zha_quirks

and i get the folowing error.

The system cannot restart because the configuration is not valid: Invalid config for [zha]: not a directory for dictionary value @ data[‘zha’][‘custom_quirks_path’]. Got ‘/config/custom_zha_quirks’. (See /config/configuration.yaml, line 17).

Strange. You may double check that the directory exists and double check the spelling

Forward slash on the end?

i added that after and tried again same result.
i have just checked using ssh and the directory appears to exist.

here is what i have

i will try to create the same file structure as you and try again

Hang on, before you tear everything apart. Is there some sort of mapping thing going on here? I don’t know enough about it… :thinking:

What sort of installation have you got?

as far as i am aware is a normal install running on a raspberry pi3 however not though an sd card, the pi boots directly from a SSD

  • Core2023.11.2
  • Supervisor2023.11.3
  • Operating System11.1
  • Frontend20231030.2

I’m even more out of my depth than usual here - would anyone else like to jump in? :roll_eyes:

Hey thank you so much for trying to help, i person in the home assistant group on Facebook suggested removing the leading /

so my configuration.yaml file now reads

zha:
  custom_quirks_path: config/custom_zha_quirks/

I dont know why this works but it has solved the problem.

thanks again for trying to help i have spent most of my day on this :slight_smile:

5 Likes

Found an explanation

1 Like

This makes sense, i was surprised i could not find more posts about people that had the same issue as i did, but i have come out of this a little more knowledgeable. Thanks for looking into this further, its always good to know why what I was trying wouldn’t work.

For others with Home Assistant Yellow that are running into this:

try placing the “custom_zha_quirks” folder in the same folder where you configured “configuration.yaml”.

In the root folder of HAY I had another /config/ folder (containing config.yaml), but that’s not actually where the quirks folder is supposed to be.

I’m kind of new to HA, so I don’t understand why custom_quirks_path: /config/custom_zha_quirks is not pointing to /config/custom_zha_quirks/ but instead to /homeassistant/custom_zha_quirks/ but there must be a good reason!

Hey for anyone having the issue, this resolved the error for me:

Created dir in homeassistant folder “/homeassistant/custom_zha_quirks/” and added the quirks to that folder

Created same dir in the root “/config/custom_zha_quirks/” and added the quirks to that folder as well. (I have not tested if the file needs to be in both dirs)

Now the error is no longer present and HA can be restarted.

I run HA OS on Raspberry Pi 3 B+ directly.

Hope that helps anyone who is having the same issue. I found other solutions that worked for others but I kept getting the same error.