mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Add documentation regarding the mediaroom media_content_type (#13182)
This commit is contained in:
parent
6c5d85940a
commit
35eaf03870
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user