Skip to content

Commit c8d9f58

Browse files
hunterjmfabaff
authored andcommitted
Add documentation for stream component (#8838)
* add documentation for stream component * update docs per changes to PR * remove keepalive for now * Apply suggestions from code review Co-Authored-By: hunterjm <hunterjm@gmail.com> * Update configuration sample * Remove whitespaces
1 parent 72ce74d commit c8d9f58

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

source/_components/camera.markdown

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The camera component allows you to use IP cameras with Home Assistant. With a li
1515

1616
Once loaded, the `camera` platform will expose services that can be called to perform various actions.
1717

18-
Available services: `turn_on`, `turn_off`, `enable_motion_detection`, `disable_motion_detection`, and `snapshot`.
18+
Available services: `turn_on`, `turn_off`, `enable_motion_detection`, `disable_motion_detection`, `snapshot`, and `play_stream`.
1919

2020
#### {% linkable_title Service `turn_on` %}
2121

@@ -72,6 +72,26 @@ action:
7272
```
7373
{% endraw %}
7474
75+
#### {% linkable_title Service `play_stream` %}
76+
77+
Play a live stream from a camera to selected media player(s). Requires `stream` component to be set up.
78+
79+
| Service data attribute | Optional | Description |
80+
| ---------------------- | -------- | ----------- |
81+
| `entity_id` | no | Name of entity to fetch stream from, e.g., `camera.living_room_camera`. |
82+
| `media_player` | no | Name of media player to play stream on, e.g., `media_player.living_room_tv`. |
83+
| `format` | yes | Stream format supported by `stream` component and selected `media_player`. Default: `hls` |
84+
85+
For example, the following action in an automation would send an `hls` live stream to your chromecast.
86+
87+
```yaml
88+
action:
89+
service: camera.play_stream
90+
data:
91+
entity_id: camera.yourcamera
92+
media_player: media_player.chromecast
93+
```
94+
7595
### {% linkable_title Test if it works %}
7696

7797
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/stream.markdown

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
layout: page
3+
title: "Stream"
4+
description: "Instructions on how to integrate live streams within Home Assistant."
5+
date: 2019-02-06 13:40
6+
sidebar: true
7+
comments: false
8+
sharing: true
9+
footer: true
10+
logo: home-assistant.png
11+
ha_category:
12+
- Other
13+
ha_release: "0.90"
14+
ha_iot_class: Local Push
15+
ha_qa_scale: internal
16+
---
17+
18+
The `stream` component provides a way to proxy live streams through Home Assistant. The component currently only supports the HLS format.
19+
20+
## {% linkable_title Configuration %}
21+
22+
To enable the random binary sensor, add the following lines to your `configuration.yaml` file:
23+
24+
```yaml
25+
# Example configuration.yaml entry
26+
stream:
27+
```

0 commit comments

Comments
 (0)