Updated documentation for hostname template (#10113)

This commit is contained in:
Sriram Vaidyanathan 2019-09-07 16:08:38 -04:00 committed by Franck Nijhof
parent f7899afcd4
commit 9a47175831

View File

@ -65,7 +65,7 @@ name:
host:
description: The IP address or hostname of the camera.
required: true
type: string
type: template
model:
description: The model of Xiaomi Camera, currently supporting yi and xiaofang.
required: true
@ -112,3 +112,16 @@ camera:
path: /home/camera/feed
ffmpeg_arguments: '-vf scale=800:450'
```
## Hostname template
The hostname/ip address can be provided either a value or from the existing entity attributes.
```yaml
camera:
- platform: xiaomi
name: Front Camera
host: "{{ states.device_tracker.front_camera.attributes.ip }}"
model: 'yi'
password: 1234
path: /tmp/sd/record
```