MQTT tracker discovery (#15427)

This commit is contained in:
PeteBa 2020-12-07 12:31:35 +00:00 committed by GitHub
parent e02e94ba67
commit 57602f6faf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@ Supported by MQTT discovery:
- [Binary sensors](/integrations/binary_sensor.mqtt/)
- [Cameras](/integrations/camera.mqtt/)
- [Covers](/integrations/cover.mqtt/)
- [Device Trackers](/integrations/device_tracker.mqtt/)
- [Device Triggers](/integrations/device_trigger.mqtt/)
- [Fans](/integrations/fan.mqtt/)
- [HVACs](/integrations/climate.mqtt/)
@ -405,3 +406,36 @@ Setting up a climate integration (heat only):
"current_temp":"23.60",
}
```
### Presence detection (device tracker)
Setting up a device tracker:
- Configuration topic: `homeassistant/device_tracker/paulus/config`
- Example configuration payload:
```json
{
"name":"Paulus",
"state_topic": "homeassistant/device_tracker/paulus/state",
"payload_home": "home",
"payload_not_home": "not_home",
"source_type": "bluetooth",
}
```
- State topic: `homeassistant/device_tracker/paulus/state`
- Example state payload: `home` or `not_home` or `location name`
If the device supports gps co-ordinates 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`
- Example attributes payload:
```json
{
"latitude": 32.87336,
"longitude": -117.22743,
"gps_accuracy": 1.2,
}
```