Skip to content

Commit 985e58d

Browse files
committed
Use device_class
1 parent 3c61e1d commit 985e58d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/_docs/mqtt/discovery.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ A motion detection device which can be represented by a [binary sensor](/compone
4444

4545
- Configuration topic: `homeassistant/binary_sensor/garden/config`
4646
- State topic: `homeassistant/binary_sensor/garden/state`
47-
- Payload: `{"name": "garden", "sensor_class": "motion"}`
47+
- Payload: `{"name": "garden", "device_class": "motion"}`
4848

4949
To create a new sensor manually. For more details please refer to the [MQTT testing section](/component/mqtt_testing).
5050

5151
```bash
52-
$ mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/binary_sensor/garden/config" -m '{"name": "garden", "sensor_class": "motion"}'
52+
$ mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/binary_sensor/garden/config" -m '{"name": "garden", "device_class": "motion"}'
5353
```
5454
Update the state.
5555

0 commit comments

Comments
 (0)