Integrations

A good template to use as a reference is blueprint.

Requirements

For a integration repository to be valid these are the requirements:

Repository structure

  • There is only one integration (one directory under ROOT_OF_THE_REPO/custom_components/) per repository (if you have more, only the first one will be managed).
  • The integration (all the Python files for it) are located under ROOT_OF_THE_REPO/custom_components/INTEGRATION_NAME/.

OK example:

custom_components/awesome/__init_.py
custom_components/awesome/sensor.py
custom_components/awesome/manifest.json
info.md
README.md

Not OK example (1):

awesome/__init_.py
awesome/sensor.py
awesome/manifest.json
info.md
README.md

Not OK example (2):

__init_.py
sensor.py
manifest.json
info.md
README.md

manifest.json

In the integration directory, there is a manifest.json file.

GitHub releases (optional)

If there are releases

When installing/upgrading it will scan the content in the latest release.

If there are multiple releases in the repository the user have some options to install a specific version. The choices will be the last 5 releases and the default branch.

If you are using releases you can also set a minimum Home Assistant version in the manifest.json file, example:

https://github.com/ludeeus/integration-hacs/blob/0.2.0/custom_components/integration-hacs/manifest.json

{
"homeassistant": "0.96.0"
}

If the user try to install this and the minimum Home Assistant requirement is not met, the user will receive a warning and it will block install/upgrade until Home Assistant is upgraded.

min_version

If there are no releases

It will scan files in the branch marked as default.

Last updated on 11/1/2019