From baacc8ab8c334e3555b1e78cce48430f5a4ba302 Mon Sep 17 00:00:00 2001 From: Giuseppe Lo Presti Date: Tue, 13 Nov 2018 15:16:01 +0100 Subject: [PATCH] Extended documentation for proxy camera to include PR 18431 https://github.com/home-assistant/home-assistant/pull/18431 --- source/_components/camera.proxy.markdown | 33 +++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/source/_components/camera.proxy.markdown b/source/_components/camera.proxy.markdown index d1c92138edf6..a03525a4478b 100644 --- a/source/_components/camera.proxy.markdown +++ b/source/_components/camera.proxy.markdown @@ -13,7 +13,7 @@ ha_release: 0.65 The `proxy` camera platform allows you to pass another camera's output through post-processing routines and generate a new camera with the post-processed output. -The current post-processing supports resizing the image/MJPEG as well as limiting the maximum refresh rate. +The current post-processing supports resizing and/or cropping the image/MJPEG as well as limiting the maximum refresh rate. The current proxy capabilities are intended to reduce the camera bandwidth for slower internet connections. @@ -39,12 +39,33 @@ name: description: This parameter allows you to override the name of your camera. required: false type: string +mode: + description: The operating mode, either `resize` or `crop`. + required: false + type: string + default: resize max_image_width: - description: The maximum width of single images taken from the camera (aspect ratio will be maintained). + description: The maximum width of single images taken from the camera (aspect ratio will be maintained on resize processing). + required: false + type: integer +max_image_height: + description: The maximum height of single images taken from the camera, used for crop operations. If not provided, the original height is assumed by default. required: false type: integer max_stream_width: - description: The maximum width of the MJPEG stream from the camera (aspect ratio will be maintained). + description: The maximum width of the MJPEG stream from the camera (aspect ratio will be maintained on resize processing). + required: false + type: integer +max_stream_height: + description: The maximum height of the MJPEG stream from the camera, used for crop operations. If not provided, the original height is assumed by default. + required: false + type: integer +image_top: + description: The top (y) coordinate to be used as starting point for crop operations. Defaults to 0. + required: false + type: integer +image_left: + description: The left (x) coordinate to be used as starting point for crop operations. Defaults to 0. required: false type: integer image_quality: @@ -87,4 +108,10 @@ camera: max_stream_width: 360 max_image_width: 480 image_refresh_rate: 5.0 + - platform: proxy + entity_id: camera.mycamera + mode: crop + max_image_width: 480 + max_image_height: 320 + image_left: 100 ```