From 715e5e642ba58d134b62bfbc99cda37c11100f35 Mon Sep 17 00:00:00 2001 From: Diogo Gomes Date: Sat, 10 Feb 2018 16:14:19 +0000 Subject: [PATCH] Added example script (#4615) * Added example script * Update media_player.mediaroom.markdown * Minor cleanup --- .../_components/media_player.mediaroom.markdown | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/_components/media_player.mediaroom.markdown b/source/_components/media_player.mediaroom.markdown index 17724f0d763..047a79d80c5 100644 --- a/source/_components/media_player.mediaroom.markdown +++ b/source/_components/media_player.mediaroom.markdown @@ -50,3 +50,19 @@ The component has been developed for Portuguese TV operators currently using the In most cases (single STB) you just need to setup the *name* and discovery will do the rest. In case you have more than one STB you are required to set the *host* in each one of the entries. If the STB is on the same network segment as Home Assistant, it can determine whether the device is turned on or off. Without this, the component will fail to determine the Set-top box status, and you are required to add the *optimistic* configuration variable. + +### {% linkable_title Example `press_button` script %} + +The `play_media` function can be used in scripts to change channels. + +```yaml +# Example play_media script +# +press_button: + sequence: + service: media_player.play_media + data_template: + entity_id: media_player.mediaroom_stb + media_content_id: "{{ value }}" + media_content_type: "channel" +```