From 6184eef85e67de592c06b410a1b9aeb5ce74718a Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Thu, 8 Oct 2020 09:54:06 +0200 Subject: [PATCH] Document MQTT integration discovery (#671) Co-authored-by: Diogo Gomes Co-authored-by: Paulus Schoutsen --- docs/config_entries_config_flow_handler.md | 7 ++++--- docs/creating_integration_manifest.md | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/config_entries_config_flow_handler.md b/docs/config_entries_config_flow_handler.md index 1818ee4d..33506137 100644 --- a/docs/config_entries_config_flow_handler.md +++ b/docs/config_entries_config_flow_handler.md @@ -49,11 +49,12 @@ There are a few step names reserved for system use: | Step name | Description | | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `discovery` | _DEPRECATED_ Invoked if your integration has been discovered by the discovery integration. | +| `homekit` | Invoked if your integration has been discovered via HomeKit as specified [using `homekit` in the manifest](creating_integration_manifest.md#homekit). | +| `mqtt` | Invoked if your integration has been discovered via MQTT as specified [using `mqtt` in the manifest](creating_integration_manifest.md#mqtt). | +| `ssdp` | Invoked if your integration has been discovered via SSDP/uPnP as specified [using `ssdp` in the manifest](creating_integration_manifest.md#ssdp). | | `user` | Invoked when a user initiates a flow via the user interface. | | `zeroconf` | Invoked if your integration has been discovered via Zeroconf/mDNS as specified [using `zeroconf` in the manifest](creating_integration_manifest.md#zeroconf). | -| `homekit` | Invoked if your integration has been discovered via HomeKit as specified [using `homekit` in the manifest](creating_integration_manifest.md#homekit). | -| `ssdp` | Invoked if your integration has been discovered via SSDP/uPnP as specified [using `ssdp` in the manifest](creating_integration_manifest.md#ssdp). | -| `discovery` | _DEPRECATED_ Invoked if your integration has been discovered by the discovery integration. | ## Unique IDs diff --git a/docs/creating_integration_manifest.md b/docs/creating_integration_manifest.md index a5cc342c..206ba754 100644 --- a/docs/creating_integration_manifest.md +++ b/docs/creating_integration_manifest.md @@ -165,6 +165,20 @@ Discovery via HomeKit does not mean that you have to talk the HomeKit protocol t When a discovery info is routed to your integration because of this entry in your manifest, the discovery info is no longer routed to integrations that listen to the HomeKit zeroconf type. +## MQTT + +If your integration supports discovery via MQTT, you can add the topics used for discovery. If the user has the `mqtt` integration loaded, it will load the `mqtt` step of your integration's config flow when it is discovered. + +MQTT discovery works by subscribing to MQTT topics specified in the manifest.json. + +```json +{ + "mqtt": [ + "tasmota/discovery/#" + ] +} +``` + ## Integration Quality Scale The [Integration Quality Scale](https://www.home-assistant.io/docs/quality_scale/) scores an integration on the code quality and user experience. Each level of the quality scale consists of a list of requirements. If an integration matches all requirements, it's considered to have reached that level.