Add documentation regarding the mediaroom media_content_type (#13182)

This commit is contained in:
Joao Carreira 2020-05-25 22:19:35 +01:00 committed by GitHub
parent 6c5d85940a
commit 35eaf03870
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,24 +50,43 @@ If the STB is on the same network segment as Home Assistant, it can determine wh
## Examples
### Example `press_button` script
The `play_media` function can be used in scripts to change channels and emulate button pressing from a remote control.
### Example scripts
The `play_media` function can be used in scripts to change channels:
{% raw %}
```yaml
# Example play_media script
# Example play_media script to change channel
#
change_channel:
sequence:
service: media_player.play_media
data_template:
entity_id: media_player.mediaroom_stb
media_content_id: "{{ channel_number }}"
media_content_type: "channel"
```
{% endraw %}
The `play_media` function can also be used to trigger actions on the set-up-box such opening the videoclub:
{% raw %}
```yaml
# Example play_media script to trigger an action
#
press_button:
sequence:
service: media_player.play_media
data_template:
entity_id: media_player.mediaroom_stb
media_content_id: "{{ value }}"
media_content_type: "channel"
media_content_id: "{{ action }}"
media_content_type: "mediaroom"
```
{% endraw %}
Check [here](https://github.com/dgomes/pymediaroom) for the list of possible media_content_id's
### Example configuration with 2 STB
```yaml