diff --git a/atom.xml b/atom.xml index 49bf828665..ae9b7ab969 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@
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.
-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 can be controlled from an 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.
A Universal Media Player is created in configuration.yaml
as follows.
# Example configuration.yaml entry
media_player:
@@ -105,22 +105,39 @@
state: ENTITY_ID|ATTRIBUTE
Configuration variables:
-The Universal Media Player will primarily imitate one of its children. The Universal Media Player will control the first child on the list that is active (not idle/off). The Universal Media Player will also inherit its state from the first active child if a state_template
is not provided. Entities in the children list must be media players, but the state template can contain any entity.
It is recommended that the command turn_on, the command turn_off, and the attribute state all be provided together. The state attribute indicates if the Media Player is on or off. If state indicates the media player is off, this status will take precedence over the states of the children. If all the children are idle/off and state is on, the Universal Media Player’s state will be on.
-It is also recommended that the command volume_up, the command volume_down, the command volume_mute, and the attribute is_volume_muted all be provided together. The attribute is_volume_muted should return either True or the on state when the volume is muted. The volume_mute service should toggle the mute setting.
-When providing select_source as a command, it is recommended to also provide the attributes source, and source_list. The source attribute is the currently select source, while the source_list attribute is a list of all available sources.
+(string)(Required)The name to assign the player.
+(list)(Required)Ordered list of child media players this entity will control.
+(template)(Optional)A template 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.
+(string)(Optional)Commands to be overwritten. Possible entries are turn_on
, turn_off
, select_source
, volume_set
, volume_up
, volume_down
and volume_mute
.
(string)(Optional)Attributes that can be overwritten. Possible 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.
The Universal Media Player will primarily imitate one of its children
. The Universal Media Player will control the first child on the list that is active (not idle/off). The Universal Media Player will also inherit its state from the first active child if a state_template
is not provided. Entities in the children:
list must be media players, but the state template can contain any entity.
It is recommended that the command turn_on
, the command turn_off
, and the attribute state
all be provided together. The state
attribute indicates if the media player is on or off. If state
indicates the media player is off, this status will take precedence over the states of the children. If all the children are idle/off and state
is on, the Universal Media Player’s state will be on.
It is also recommended that the command volume_up
, the command volume_down
, the command volume_mute
, and the attribute is_volume_muted
all be provided together. The attribute is_volume_muted
should return either True or the on state when the volume is muted. The volume_mute
service should toggle the mute setting.
When providing select_source
as a command, it is recommended to also provide the attributes source
, and source_list
. The source
attribute is the currently select source, while the source_list
attribute is a list of all available sources.
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.
-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.
+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.
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.
media_player:
platform: universal
name: Test Universal
@@ -165,15 +182,14 @@
volume_level: media_player.receiver|volume_level
source: media_player.receiver|source
source_list: media_player.receiver|source_list
-
In this example, a Kodi Media Player runs in a CEC capable device (OSMC/OpenElec running in a Raspberry Pi 24/7, for example), and, with the JSON-CEC Kodi addon installed, it can turn on and off the attached TV.
-We store the state of the attached TV in a hidden Input Boolean, so we can differentiate the TV being on or off, while Kodi is always ‘idle’, and use the Universal Media Player to render its state with a template. We can hide the Kodi Media Player too, and only show the universal one, which now can differentiate between the ‘idle’ and the ‘off’ state (being the second when it is idle and the TV is off).
-Because the Input Boolean used to store the TV state is only changing when using the Home Assistant turn_on
and turn_off
actions, and Kodi could be controlled by so many ways, we also define some automations to update this Input Boolean when needed.
In an Apple HomeKit scene, we can now expose this Universal Media Player as an on/off switch in Homebridge, and, that way, use Siri to turn on and off the TV.
-The complete yaml config is:
+We store the state of the attached TV in a hidden input boolean, so we can differentiate the TV being on or off, while Kodi is always ‘idle’, and use the universal media player to render its state with a template. We can hide the Kodi Media Player too, and only show the universal one, which now can differentiate between the ‘idle’ and the ‘off’ state (being the second when it is idle and the TV is off).
+Because the input boolean used to store the TV state is only changing when using the Home Assistant turn_on
and turn_off
actions, and Kodi could be controlled by so many ways, we also define some automations to update this Input Boolean when needed.
In an Apple HomeKit scene, we can now expose this universal media player as an on/off switch in Homebridge, and, that way, use Siri to turn on and off the TV.
+The complete configuration is:
homeassistant:
customize:
input_boolean.kodi_tv_state:
diff --git a/sitemap.xml b/sitemap.xml
index 3ad9c670e2..919c3625f7 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -3690,7 +3690,7 @@
https://home-assistant.io/components/switch.hook/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/cookbook/automation_for_rainy_days/
@@ -4362,99 +4362,99 @@
https://home-assistant.io/docs/autostart/init.d/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/api/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/configuration/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/example_apps/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/installation/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/operation/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/reboot/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/running/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/tutorial/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/updating/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/windows/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/ecosystem/certificates/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/ecosystem/hadashboard/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/ecosystem/hass-configurator/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/ecosystem/ios/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/ecosystem/nginx/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/ecosystem/notebooks/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/ecosystem/scenegen/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/ecosystem/synology/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/tools/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/tools/dev-tools/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/tools/hass/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/docs/tools/scripts/
-2017-11-27T16:51:00+00:00
+2017-11-28T08:07:15+00:00
https://home-assistant.io/faq/after-upgrading/
@@ -5570,62 +5570,62 @@
https://home-assistant.io/demo/frontend.html
-2017-11-27T16:50:20+00:00
+2017-11-28T08:06:30+00:00
https://home-assistant.io/demo/index.html
-2017-11-27T16:50:20+00:00
+2017-11-28T08:06:30+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-event.html
-2017-11-27T16:50:20+00:00
+2017-11-28T08:06:30+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-info.html
-2017-11-27T16:50:20+00:00
+2017-11-28T08:06:30+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-service.html
-2017-11-27T16:50:20+00:00
+2017-11-28T08:06:30+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-state.html
-2017-11-27T16:50:20+00:00
+2017-11-28T08:06:30+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-template.html
-2017-11-27T16:50:20+00:00
+2017-11-28T08:06:30+00:00
https://home-assistant.io/demo/panels/ha-panel-history.html
-2017-11-27T16:50:20+00:00
+2017-11-28T08:06:30+00:00
https://home-assistant.io/demo/panels/ha-panel-iframe.html
-2017-11-27T16:50:20+00:00
+2017-11-28T08:06:30+00:00
https://home-assistant.io/demo/panels/ha-panel-logbook.html
-2017-11-27T16:50:20+00:00
+2017-11-28T08:06:30+00:00
https://home-assistant.io/demo/panels/ha-panel-map.html
-2017-11-27T16:50:20+00:00
+2017-11-28T08:06:30+00:00
https://home-assistant.io/googlef4f3693c209fe788.html
-2017-11-27T16:50:20+00:00
+2017-11-28T08:06:30+00:00
https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html
-2017-11-27T16:50:20+00:00
+2017-11-28T08:06:30+00:00
https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html
-2017-11-27T16:50:20+00:00
+2017-11-28T08:06:30+00:00
https://home-assistant.io/static/mdi-demo.html
-2017-11-27T16:50:20+00:00
+2017-11-28T08:06:30+00:00