Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain better how dependencies work with mqtt example #1768

Merged
merged 5 commits into from May 4, 2023

Conversation

jbouwh
Copy link
Contributor

@jbouwh jbouwh commented May 4, 2023

Proposed change

When dependencies are added, to the integrations manifest file. This ensures the integration was loaded, but it does not ensure the entries were set up yet. As mqtt is used as an example and many integrations migrate to a config entry set up with config flow we should be aware of the new behavior.

Type of change

  • Document existing features within Home Assistant
  • Document new or changing features which there is an existing pull request elsewhere
  • Spelling or grammatical corrections, or rewording for improved clarity
  • Changes to the backend of this documentation
  • Removed stale or deprecated documentation

Additional information

jbouwh and others added 3 commits May 4, 2023 17:34
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick@koston.org>
@bdraco bdraco merged commit 6c31867 into home-assistant:master May 4, 2023
5 checks passed
@@ -92,7 +92,7 @@ If this integration is being submitted for inclusion in Home Assistant, it shoul

## Dependencies

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.
Dependencies are other Home Assistant integrations you want Home Assistant to set up successfully before the integration is loaded. Adding an integration to dependencies will ensure the depending integration is loaded before setup, but it does not guarantee all dependency configuration entries have been set up. Adding dependencies can be necessary if you want to offer functionality from that other integration, like webhooks or an MQTT connection. Adding an [after dependency](#after-dependencies) might be a better alternative if a dependency is optional but not critical. See the [MQTT section](#mqtt) for more details on handling this for MQTT.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Dependency for mqtt component does not work as expected
2 participants