Skip to content

Conversation

Hedda
Copy link
Contributor

@Hedda Hedda commented Sep 22, 2025

Proposed change

Added a guide for how-to add a custom zha quirk for testing.

Additional information

This is a compliment to the guide for writting quirks -> #4349

New #4355 PR could also replace old PR -> #2419

Device diagnostics

Not applicable for this context.

Checklist

  • The changes are tested and work correctly
  • pre-commit checks pass / the code has been formatted using Black
  • Tests have been added to verify that the new code works
  • Device diagnostics data has been attached

Added a guide for how-to add a custom zha quirk for testing.
Copy link

codecov bot commented Sep 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.13%. Comparing base (2e2bbd9) to head (bc42364).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #4355   +/-   ##
=======================================
  Coverage   92.13%   92.13%           
=======================================
  Files         358      358           
  Lines       11919    11919           
=======================================
  Hits        10981    10981           
  Misses        938      938           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Hedda
Copy link
Contributor Author

Hedda commented Oct 14, 2025

For reference, noted that @TheJulianJES has now included a slightly different variant of this guide as part of a PR (#4396). Quote:

Testing

This is an experimental and untested quirk. We need device diagnostics to make sure this fixes the issue.

If you want to test this as a custom quirk, you can do the following:

  1. Install an addon that allows you to modify files in Home Assistant's /config directory.
    The "Samba share" addon or VSCode addon can be used for this.
  2. Create a zha_custom_quirks folder in Home Assistant's /config directory. So, in the folder where HA's configuration.yaml is.
  3. Use the download button on the linked GitHub page to get the custom quirk as a .py file.
  4. Copy the custom quirk file you've just downloaded into the newly created zha_custom_quirks.
  5. Now, add the following to HA's configuration.yaml:
zha:
  custom_quirks_path: /config/zha_custom_quirks

(Make sure you only have one zha: entry in your configuration.yaml. If you modified other ZHA YAML settings, you may need to merge your modifications with the one above.)

  1. Restart Home Assistant.
  2. Check if ZHA still works. if not, check the logs and post any errors.
  3. Check if the custom quirk works as expected.

If you search the web, you should also be able to find some more info on installing custom quirks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant