mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-25 10:17:23 +00:00
Updated documentation for hostname template (#10113)
This commit is contained in:
parent
f7899afcd4
commit
9a47175831
@ -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
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user