Skip to content

Commit b8b9190

Browse files
authored
Camera services (home-assistant#3834)
* Add services * Update description
1 parent 1245fea commit b8b9190

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

source/_components/camera.markdown

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,44 @@ footer: true
1212

1313
The camera component allows you to use IP cameras with Home Assistant. With a little additional work you could use [USB cameras](/blog/2016/06/23/usb-webcams-and-home-assistant/) as well.
1414

15+
### {% linkable_title Service %}
16+
17+
Once loaded, the `camera` platform will expose services that can be called to perform various actions.
18+
19+
Available services: `enable_motion_detection`, `disable_motion_detection`, and `snapshot`.
20+
21+
#### {% linkable_title Service `enable_motion_detection` %}
22+
23+
Enable the motion detection in a camera.
24+
25+
| Service data attribute | Optional | Description |
26+
| ---------------------- | -------- | ----------- |
27+
| `entity_id` | no | Name(s) of entities to enable motion detection, e.g., `camera.living_room_camera`. |
28+
29+
#### {% linkable_title Service `disable_motion_detection` %}
30+
31+
Disable the motion detection in a camera.
32+
33+
| Service data attribute | Optional | Description |
34+
| ---------------------- | -------- | ----------- |
35+
| `entity_id` | no | Name(s) of entities to disable motion detection, e.g., `camera.living_room_camera`. |
36+
37+
#### {% linkable_title Service `snapshot` %}
38+
39+
Take a snapshot from a camera.
40+
41+
| Service data attribute | Optional | Description |
42+
| ---------------------- | -------- | ----------- |
43+
| `entity_id` | no | Name(s) of entities to create a snopshot from, e.g., `camera.living_room_camera`. |
44+
| `filename ` | no | Template of a file name. Variable is `entity_id`, e.g., {% raw %}`/tmp/snapshot_{{ entity_id }}`{% endraw %}. |
45+
46+
### {% linkable_title Test if it works %}
47+
48+
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**.
49+
50+
```json
51+
{
52+
"entity_id": "camera.living_room_camera"
53+
}
54+
```
55+

0 commit comments

Comments
 (0)