Use device_class
This commit is contained in:
parent
3c61e1ddcf
commit
985e58d622
1 changed files with 2 additions and 2 deletions
|
@ -44,12 +44,12 @@ A motion detection device which can be represented by a [binary sensor](/compone
|
|||
|
||||
- Configuration topic: `homeassistant/binary_sensor/garden/config`
|
||||
- State topic: `homeassistant/binary_sensor/garden/state`
|
||||
- Payload: `{"name": "garden", "sensor_class": "motion"}`
|
||||
- Payload: `{"name": "garden", "device_class": "motion"}`
|
||||
|
||||
To create a new sensor manually. For more details please refer to the [MQTT testing section](/component/mqtt_testing).
|
||||
|
||||
```bash
|
||||
$ mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/binary_sensor/garden/config" -m '{"name": "garden", "sensor_class": "motion"}'
|
||||
$ mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/binary_sensor/garden/config" -m '{"name": "garden", "device_class": "motion"}'
|
||||
```
|
||||
Update the state.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue