From fa028db9d844a304e16b0a6e5042ca62e199b412 Mon Sep 17 00:00:00 2001 From: Robin Date: Sun, 29 Apr 2018 10:11:51 +0100 Subject: [PATCH] Adds update file_path service to the local_file camera (#5228) * Update camera.local_file.markdown * Add entity_id info to service * Update camera.local_file.markdown * Update camera.local_file.markdown * Fix table --- source/_components/camera.local_file.markdown | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/source/_components/camera.local_file.markdown b/source/_components/camera.local_file.markdown index 8175ee35db6..b2b953041dd 100644 --- a/source/_components/camera.local_file.markdown +++ b/source/_components/camera.local_file.markdown @@ -1,7 +1,7 @@ --- layout: page title: "Local File" -description: "Instructions on how to use Local File as a Camera within Home Assistant." +description: "Instructions how to use Local File as a Camera within Home Assistant." date: 2016-06-12 17:00 sidebar: true comments: false @@ -13,9 +13,9 @@ ha_iot_class: "Local Polling" ha_release: 0.22 --- -The `local_file` camera platform allows you to integrate any readable image file from disk into Home Assistant as a camera. If the image is updated on the file system the image displayed in Home Assistant will also be updated. +The `local_file` camera platform allows you to integrate an image file from disk into Home Assistant as a camera. If the image is updated on the file system the image displayed in Home Assistant will also be updated. The service `local_file_update_file_path` can be used to update the image using an automation. -This can for example be used with various camera platforms that save a temporary images locally. It can also be used to display a graph that you render periodically and will then be displayed in Home Assistant. +The `local_file` camera can for example be used with various camera platforms that save a temporary images locally. It can also be used to display a graph that you render periodically and will then be displayed in Home Assistant. To enable this camera in your installation, add the following to your `configuration.yaml` file: @@ -31,7 +31,11 @@ Configuration variables: - **file_path** (*Required*): File to serve as the camera. - **name** (*Optional*): Name of the camera -

-The given `file_path` must be an existing file because the camera platform setup make a readable check on it. -

+### {% linkable_title Service `camera.local_file_update_file_path` %} +Use this service to change the file displayed by the camera. + +| Service data attribute | Description | +| -----------------------| ----------- | +| `entity_id` | String of the `entity_id` of the camera to update. | +| `file_path` | The full path to the new image file to be displayed. |