From 9a471758319107081b59921772ef69f25f69ce5a Mon Sep 17 00:00:00 2001 From: Sriram Vaidyanathan Date: Sat, 7 Sep 2019 16:08:38 -0400 Subject: [PATCH] Updated documentation for hostname template (#10113) --- source/_components/xiaomi.markdown | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/source/_components/xiaomi.markdown b/source/_components/xiaomi.markdown index f5f625f9bc3..f424933846a 100644 --- a/source/_components/xiaomi.markdown +++ b/source/_components/xiaomi.markdown @@ -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 +```