Contributing to the GitHub Copilot Home Assistant Integration should be as easy and transparent as possible, whether it's:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Improving documentation
GitHub is used to host code, to track issues and feature requests, as well as accept pull requests.
Pull requests are the best way to propose changes to the codebase.
- Fork the repo and create your branch from
main. - If you've changed something, update the documentation.
- Make sure your code lints with
ruff(runpython3 -m ruff check .). - Test your contribution.
- Issue that pull request!
This integration is based on the integration_blueprint template.
- Use the provided
.devcontainer.jsonfor Visual Studio Code development - The container includes a standalone Home Assistant instance
- Configuration is in
config/configuration.yaml
This integration uses a patched github-copilot-sdk 0.1.22+ha wheel bundled in wheels/ for Home Assistant OS compatibility. The wheel is installed automatically from manifest.json — no manual steps are needed. If you need to rebuild it, run the .github/workflows/build-sdk.yml workflow (see wheels/README.md for details).
python3 -m ruff check .python3 -m ruff check --fix .- Use Ruff for linting (configuration in
.ruff.toml) - Follow Home Assistant's coding standards
- Use type hints (
from __future__ import annotations) - Use async/await for I/O operations
- Document functions and classes with docstrings
- All API methods should be async
- Include proper error handling with custom exceptions
- Use aiohttp for HTTP requests
- Implement connection testing in
async_test_connection()
- Extend
ConversationEntityfrom Home Assistant - Implement
async_process()for message handling - Maintain conversation history appropriately
- Handle errors gracefully with user-friendly messages
- Validate credentials during setup
- Provide clear error messages
- Support optional configuration parameters
- Follow Home Assistant's config flow patterns
Before submitting a PR:
- Test the integration in a Home Assistant instance
- Verify configuration flow works correctly
- Test conversation agent functionality
- Check error handling
- Ensure all linting passes
In short, when you submit code changes, your submissions are understood to be under the same GNU GPLv3 that covers the project.
Report Bugs Using GitHub's Issues
GitHub issues are used to track public bugs. Report a bug by opening a new issue.
Great Bug Reports tend to have:
- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Include Home Assistant version
- Include integration version
- Include relevant logs from
Settings→System→Logs
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
For feature requests, please:
- Check if the feature already exists
- Describe the use case clearly
- Explain why this would be useful to others
- Consider if it aligns with the integration's goals
When contributing:
- Update
README.mdfor user-facing changes - Update this guide for contributing/development documentation changes
- Update translations in
translations/en.json - Add code comments for complex logic
By contributing, you agree that your contributions will be licensed under the GNU GPLv3.