mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-15 13:26:54 +00:00
Document restrictions on allowed characters in MQTT discovery… (#12060)
Document restrictions on allowed characters in MQTT discovery topics. As discussed in #30940.
This commit is contained in:
parent
eb57b85d78
commit
322833d68d
@ -55,8 +55,8 @@ The discovery topic need to follow a specific format:
|
||||
```
|
||||
|
||||
- `<component>`: One of the supported MQTT components, eg. `binary_sensor`.
|
||||
- `<node_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.
|
||||
- `<object_id>`: The ID of the device. This is only to allow for separate topics for each device and is not used for the `entity_id`.
|
||||
- `<node_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).
|
||||
- `<object_id>`: 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`.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user