Skip to content

Contributing

Ask a question

For help with setup or usage, search GitHub Discussions and the issues. If nobody has asked yet, start a discussion in Q&A.

Report a bug or suggest a feature

Open an issue. For a bug, include the integration version and debug logs.

Translate the integration

The integration's setup screens, options and action descriptions follow your Home Assistant language. Text that isn't translated yet is shown in English.

Translations are files in custom_components/google_home/translations. You can edit them on GitHub in your browser:

  • To fix a translation, open your language's file, select the pencil icon, and make your changes.
  • To add a language, open en.json, copy its contents, then create a new file and paste them. Name the file after the BCP 47 language tag, such as de.json for German or pt-BR.json for Brazilian Portuguese, and translate the text.

Translate only the text after each colon. Keep the keys before the colons and anything in curly brackets, such as {docs_url}, unchanged. Home Assistant fills those in.

When you save, GitHub creates a copy of the repository under your account and offers to open a pull request.

Develop

You need uv. Fork the repository, create a branch from master, and install the dependencies:

uv sync

Or open the repository in its dev container, in Visual Studio Code or GitHub Codespaces, which has uv and the dependencies installed.

Try your changes

script/develop

This starts Home Assistant at http://localhost:8123 with the integration loaded and its debug logging turned on. It uses config/configuration.yaml; everything else Home Assistant writes to config/ is ignored by git.

Run the checks

Run the tests:

uv run pytest

prek runs the linters and formatters, including ruff and dprint. Run them on all files:

uvx prek run --all-files

To run them on every commit, install the git hook once:

uvx prek install

Edit the docs

The docs are in docs/ and built with Zensical. Preview them at http://localhost:8000 while you edit:

uv run --only-group docs zensical serve

A pull request that changes the docs gets a preview link in a comment.

License

The project is under the MIT License. When you submit a change, it is understood to be under the same license.