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 +```