From 322833d68d27f1902a60fe71d3d29bd025035945 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Wed, 12 Feb 2020 08:43:11 +0100 Subject: [PATCH] =?UTF-8?q?Document=20restrictions=20on=20allowed=20charac?= =?UTF-8?q?ters=20in=20MQTT=20discovery=E2=80=A6=20(#12060)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Document restrictions on allowed characters in MQTT discovery topics. As discussed in #30940. --- source/_docs/mqtt/discovery.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/_docs/mqtt/discovery.markdown b/source/_docs/mqtt/discovery.markdown index feab0e06175..face99eab89 100644 --- a/source/_docs/mqtt/discovery.markdown +++ b/source/_docs/mqtt/discovery.markdown @@ -55,8 +55,8 @@ The discovery topic need to follow a specific format: ``` - ``: One of the supported MQTT components, eg. `binary_sensor`. -- `` (*Optional*): ID of the node providing the topic, this is not used by Home Assistant but may be used to structure the MQTT topic. -- ``: The ID of the device. This is only to allow for separate topics for each device and is not used for the `entity_id`. +- `` (*Optional*): ID of the node providing the topic, this is not used by Home Assistant but may be used to structure the MQTT topic. The ID of the node must only consist of characters from the character class `[a-zA-Z0-9_-]` (alphanumerics, underscore and hyphen). +- ``: The ID of the device. This is only to allow for separate topics for each device and is not used for the `entity_id`. The ID of the device must only consist of characters from the character class `[a-zA-Z0-9_-]` (alphanumerics, underscore and hyphen). The payload must be a JSON dictionary and will be checked like an entry in your `configuration.yaml` file if a new device is added. This means that missing variables will be filled with the platform's default values. All configuration variables which are *required* must be present in the initial payload send to `/config`.