mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-18 23:06:58 +00:00
Update universal.markdown (#21504)
This commit is contained in:
parent
534b824a6e
commit
a486944dc9
@ -11,9 +11,9 @@ ha_platforms:
|
|||||||
- media_player
|
- media_player
|
||||||
---
|
---
|
||||||
|
|
||||||
Universal Media Players combine multiple existing entities in Home Assistant into one media player entity. This is used for creating a single entity that controls an entire media center.
|
A Universal Media Player can combine multiple existing entities in Home Assistant into a single media player entity. This is used to create a single media player entity that can control an entire media center.
|
||||||
|
|
||||||
Multiple media player entities can be controlled from a universal media player. Additionally, the universal media player allows volume and power commands to be re-routed to other entities in Home Assistant. This allows the power and volume to control external devices like a television or audio receiver.
|
Multiple media player entities may be controlled from a Universal Media Player. Additionally, the Universal Media Player can enable volume and power commands to be directed to other Home Assistant entities. This enables the media player power and volume commands to control devices like a television, amplifier or audio receiver, for example.
|
||||||
|
|
||||||
A Universal Media Player is created in `configuration.yaml` as follows.
|
A Universal Media Player is created in `configuration.yaml` as follows.
|
||||||
|
|
||||||
@ -61,23 +61,23 @@ media_player:
|
|||||||
|
|
||||||
{% configuration %}
|
{% configuration %}
|
||||||
name:
|
name:
|
||||||
description: The name to assign the player.
|
description: The name to assign to the player.
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
children:
|
children:
|
||||||
description: Ordered list of child media players this entity will control.
|
description: Ordered list of child media players that this entity will control.
|
||||||
required: false
|
required: false
|
||||||
type: list
|
type: list
|
||||||
state_template:
|
state_template:
|
||||||
description: "A [template](/topics/templating/) can be specified to render the state of the media player. This way, the state could depend on entities different from media players, like switches or input booleans."
|
description: "A [template](/topics/templating/) can be specified to render the state of the media player. In this way, the state may depend on entities that are not themselves media players, like switches or input booleans."
|
||||||
required: false
|
required: false
|
||||||
type: template
|
type: template
|
||||||
commands:
|
commands:
|
||||||
description: "Commands to be overwritten. Almost all media player service commands can be overwritten. Example entries are `turn_on`, `turn_off`, `select_source`, `volume_set`, `volume_up`, `volume_down`, `volume_mute`, `media_play`, `media_pause`, `media_stop`, `media_previous_track`, `media_next_track` and `play_media` (refer to the [`media_player` documentation](/integrations/media_player/) to see the full list)."
|
description: "Media player commands to be overridden. Almost all media player service commands may be overridden. Example entries are `turn_on`, `turn_off`, `select_source`, `volume_set`, `volume_up`, `volume_down`, `volume_mute`, `media_play`, `media_pause`, `media_stop`, `media_previous_track`, `media_next_track` and `play_media` (refer to the [`media_player` documentation](/integrations/media_player/) to see the full list)."
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
attributes:
|
attributes:
|
||||||
description: "Attributes that can be overwritten. Most, if not all, media player attributes can be overwritten. Example entries are `is_volume_muted`, `state`, `source`, `source_list` and `volume_level`. The values should be an entity ID and state attribute separated by a pipe character (|). If the entity ID's state should be used, then only the entity id should be provided."
|
description: "Attributes that can be overridden. Most, if not all, media player attributes can be overridden. Example entries are `is_volume_muted`, `state`, `source`, `source_list` and `volume_level`. The values should be an entity ID and state attribute separated by a pipe character (|). If the entity ID's state should be used, then only the entity id needs to be provided."
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
device_class:
|
device_class:
|
||||||
@ -100,7 +100,7 @@ When using `state_template`, if you use a template that depends on the current t
|
|||||||
|
|
||||||
### Chromecast & Kodi control with switches
|
### Chromecast & Kodi control with switches
|
||||||
|
|
||||||
In this example, a switch is available to control the power of the television. Switches are also available to turn the volume up, turn the volume down, and mute the audio. These could be command line switches or any other entity in Home Assistant. The `turn_on` and `turn_off` commands will be redirected to the television, and the volume commands will be redirected to an audio receiver. The `select_source` command will be passed directly to an A/V receiver.
|
In this example, a switch is available to control the power to the television. Switches are also available to turn the volume up, turn the volume down, and mute the audio. These could be command line switches or any other entity in Home Assistant. The `turn_on` and `turn_off` commands will be redirected to the television, and the volume commands will be redirected to an audio receiver. The `select_source` command will be passed directly to an A/V receiver.
|
||||||
|
|
||||||
The children are a Chromecast and a Kodi player. If the Chromecast is playing, the Universal Media Player will reflect its status. If the Chromecast is idle and Kodi is playing, the universal media player will change to reflect its status.
|
The children are a Chromecast and a Kodi player. If the Chromecast is playing, the Universal Media Player will reflect its status. If the Chromecast is idle and Kodi is playing, the universal media player will change to reflect its status.
|
||||||
|
|
||||||
@ -271,36 +271,36 @@ media_player:
|
|||||||
- platform: universal
|
- platform: universal
|
||||||
name: Media Room TV
|
name: Media Room TV
|
||||||
attributes:
|
attributes:
|
||||||
state: remote.alexander_down_guest
|
state: remote.harmony_hub
|
||||||
source_list: remote.alexander_down_guest|activity_list
|
source_list: remote.harmony_hub|activity_list
|
||||||
source: remote.alexander_down_guest|current_activity
|
source: remote.harmony_hub|current_activity
|
||||||
commands:
|
commands:
|
||||||
turn_on:
|
turn_on:
|
||||||
service: remote.turn_on
|
service: remote.turn_on
|
||||||
target:
|
target:
|
||||||
entity_id: remote.alexander_down_guest
|
entity_id: remote.remote.harmony_hub
|
||||||
turn_off:
|
turn_off:
|
||||||
service: remote.turn_off
|
service: remote.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id: remote.alexander_down_guest
|
entity_id: remote.remote.harmony_hub
|
||||||
volume_up:
|
volume_up:
|
||||||
service: remote.send_command
|
service: remote.send_command
|
||||||
target:
|
target:
|
||||||
entity_id: remote.alexander_down_guest
|
entity_id: remote.remote.harmony_hub
|
||||||
data:
|
data:
|
||||||
device: Receiver
|
device: Receiver
|
||||||
command: VolumeUp
|
command: VolumeUp
|
||||||
volume_down:
|
volume_down:
|
||||||
service: remote.send_command
|
service: remote.send_command
|
||||||
target:
|
target:
|
||||||
entity_id: remote.alexander_down_guest
|
entity_id: remote.remote.harmony_hub
|
||||||
data:
|
data:
|
||||||
device: Receiver
|
device: Receiver
|
||||||
command: VolumeDown
|
command: VolumeDown
|
||||||
select_source:
|
select_source:
|
||||||
service: remote.turn_on
|
service: remote.turn_on
|
||||||
target:
|
target:
|
||||||
entity_id: remote.alexander_down_guest
|
entity_id: remote.remote.harmony_hub
|
||||||
data:
|
data:
|
||||||
activity: "{{ source }}"
|
activity: "{{ source }}"
|
||||||
device_class: tv
|
device_class: tv
|
||||||
|
Loading…
x
Reference in New Issue
Block a user