Remove the other trailing comma and minor copyedit (mqtt/discovery) (#21431)

This commit is contained in:
Marc Randolph 2022-02-02 02:15:10 -06:00 committed by GitHub
parent 56f24a1f04
commit 48f6777125
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -339,7 +339,7 @@ A motion detection device which can be represented by a [binary sensor](/integra
- State topic: `homeassistant/binary_sensor/garden/state` - State topic: `homeassistant/binary_sensor/garden/state`
- Payload: `{"name": "garden", "device_class": "motion", "state_topic": "homeassistant/binary_sensor/garden/state"}` - Payload: `{"name": "garden", "device_class": "motion", "state_topic": "homeassistant/binary_sensor/garden/state"}`
To create a new sensor manually. For more details please refer to the [MQTT testing section](/docs/mqtt/testing/). To create a new sensor manually.
```bash ```bash
mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/binary_sensor/garden/config" -m '{"name": "garden", "device_class": "motion", "state_topic": "homeassistant/binary_sensor/garden/state"}' mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/binary_sensor/garden/config" -m '{"name": "garden", "device_class": "motion", "state_topic": "homeassistant/binary_sensor/garden/state"}'
@ -357,6 +357,8 @@ Delete the sensor by sending an empty message.
mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/binary_sensor/garden/config" -m '' mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/binary_sensor/garden/config" -m ''
``` ```
For more details please refer to the [MQTT testing section](/docs/mqtt/testing/).
### Sensors with multiple values ### Sensors with multiple values
Setting up a sensor with multiple measurement values requires multiple consecutive configuration topic submissions. Setting up a sensor with multiple measurement values requires multiple consecutive configuration topic submissions.
@ -453,7 +455,7 @@ Setting up a climate integration (heat only):
{ {
"mode":"off", "mode":"off",
"target_temp":"21.50", "target_temp":"21.50",
"current_temp":"23.60", "current_temp":"23.60"
} }
``` ```
@ -477,7 +479,7 @@ Setting up a device tracker:
- State topic: `homeassistant/device_tracker/paulus/state` - State topic: `homeassistant/device_tracker/paulus/state`
- Example state payload: `home` or `not_home` or `location name` - Example state payload: `home` or `not_home` or `location name`
If the device supports gps coordinates then they can be sent to Home Assistant by specifying an attributes topic (i.e. "json_attributes_topic") in the configuration payload: If the device supports GPS coordinates then they can be sent to Home Assistant by specifying an attributes topic (i.e. "json_attributes_topic") in the configuration payload:
- Attributes topic: `homeassistant/device_tracker/paulus/attributes` - Attributes topic: `homeassistant/device_tracker/paulus/attributes`
- Example attributes payload: - Example attributes payload:
@ -506,5 +508,5 @@ The entity id is automatically generated from the entity's name. All MQTT entity
} }
``` ```
In the example above, the the entity_id will be `sensor.device1` instead of `sensor.my_super_device`. In the example above, the entity_id will be `sensor.device1` instead of `sensor.my_super_device`.