From eb55086c820b106f2f72ed601b86289f7856bdbd Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Wed, 12 Feb 2020 08:24:57 +0100 Subject: [PATCH] Document restrictions on allowed characters in MQTT discovery topics. 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 feab0e061751..face99eab89d 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`.