From 5ed68e4f0cc7b3877bc22ead95e6f2d1744f44a5 Mon Sep 17 00:00:00 2001 From: akasma74 Date: Mon, 10 Feb 2020 16:45:52 +0000 Subject: [PATCH] add after_dependencies (#404) * add after_dependencies A missing part of https://github.com/home-assistant/home-assistant/pull/23148 Had to learn it hard way so think it needs to be improved. * tweak Co-Authored-By: Paulus Schoutsen * extra info added Co-Authored-By: Paulus Schoutsen * Update creating_integration_manifest.md Co-authored-by: Paulus Schoutsen --- docs/creating_integration_manifest.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/creating_integration_manifest.md b/docs/creating_integration_manifest.md index 5351eab9..842b7f78 100644 --- a/docs/creating_integration_manifest.md +++ b/docs/creating_integration_manifest.md @@ -11,6 +11,7 @@ Since 0.92.0, every integration has a manifest file to specify basic information "name": "Philips Hue", "documentation": "https://www.home-assistant.io/components/hue", "dependencies": ["mqtt"], + "after_dependencies": ["http"], "codeowners": ["@balloob"], "requirements": ["aiohue==1.9.1"], "quality_scale": "platinum" @@ -46,6 +47,10 @@ The website containing documentation on how to use your integration. If this int Dependencies are other Home Assistant integrations that you want Home Assistant to set up successfully prior to the integration being loaded. This can be necessary in case you want to offer functionality from that other integration, like using webhooks or an MQTT connection. +## After dependencies + +This option is used to specify optional dependencies that might be used. When `after_dependencies` is present, set up of an integration will wait for the other dependency to be set up before being set up. It will also make sure that the requirements of `after_dependencies` are installed so methods from the integration can be safely imported. + ## Code Owners GitHub usernames or team names of people that are responsible for this integration. You should add at least your GitHub username here, as well as anyone who helped you to write code that is being included.