Skip to content

Commit 9ea0d12

Browse files
authored
* Add 'whitelist_external_dirs' * Add 'whitelist_external_dirs' and update style
1 parent 043753d commit 9ea0d12

File tree

2 files changed

+49
-11
lines changed

2 files changed

+49
-11
lines changed

source/_components/camera.markdown

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Take a snapshot from a camera.
4343
| `entity_id` | no | Name(s) of entities to create a snopshot from, e.g., `camera.living_room_camera`. |
4444
| `filename ` | no | Template of a file name. Variable is `entity_id`, e.g., {% raw %}`/tmp/snapshot_{{ entity_id }}`{% endraw %}. |
4545

46+
The `filename` must be an entry in the `whitelist_external_dirs` in your [`homeassistant:`](/docs/configuration/basic/) section of your `configuration.yaml` file.
47+
4648
### {% linkable_title Test if it works %}
4749

4850
A simple way to test if you have set up your `camera` platform correctly, is to use <img src='/images/screenshots/developer-tool-services-icon.png' alt='service developer tool icon' class="no-shadow" height="38" /> **Services** from the **Developer Tools**. Choose your service from the dropdown menu **Service**, enter something like the sample below into the **Service Data** field, and hit **CALL SERVICE**.

source/_components/camera.rpi_camera.markdown

+47-11
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,53 @@ camera:
2424
- platform: rpi_camera
2525
```
2626
27-
Configuration variables:
28-
29-
- **name** (*Optional*): Name of the camera
30-
- **image_width** (*Optional*): Set the image width (default: 640)
31-
- **image_height** (*Optional*): Set the image height (default: 480)
32-
- **image_quality** (*Optional*): Set the image quality (from 0 to 100, default: 7)
33-
- **image_rotation** (*Optional*): Set image rotation (0-359, default: 0)
34-
- **horizontal_flip** (*Optional*): Set horizontal flip (0 to disable, 1 to enable, default: 0)
35-
- **vertical_flip** (*Optional*): Set vertical flip (0 to disable, 1 to enable, default: 0)
36-
- **timelapse** (*Optional*): Takes a picture every ms (default: 1000)
37-
- **file_path** (*Optional*): Save the picture in a custom file path (default: camera components folder)
27+
{% configuration %}
28+
image_width:
29+
description: Set the image width.
30+
required: false
31+
default: 640
32+
type: int
33+
name:
34+
description: Name of the camera.
35+
required: false
36+
default: Raspberry Pi Camera
37+
type: string
38+
image_height:
39+
description: Set the image height.
40+
required: false
41+
default: 480
42+
type: int
43+
image_quality:
44+
description: Set the image quality (from 0 to 100).
45+
required: false
46+
default: 7
47+
type: int
48+
image_rotation:
49+
description: Set image rotation (0-359).
50+
required: false
51+
default: 0
52+
type: int
53+
horizontal_flip:
54+
description: Set horizontal flip (0 to disable, 1 to enable).
55+
required: false
56+
default: 0
57+
type: int
58+
vertical_flip:
59+
description: Set vertical flip (0 to disable, 1 to enable).
60+
required: false
61+
default: 0
62+
type: int
63+
timelapse:
64+
description: Takes a picture every millisecond.
65+
required: false
66+
default: 1000
67+
type: int
68+
file_path:
69+
description: Save the picture in a custom file path.
70+
required: false
71+
default: The camera components folder.
72+
type: string
73+
{% endconfiguration %}
3874
3975
The given **file_path** must be an existing file because the camera platform setup make a writeable check on it.
4076

0 commit comments

Comments
 (0)