
If the Chromecast is idle and Kodi is playing, the universal media player will change to reflect its status. If the Chromecast is playing, the Universal Media Player will reflect its status.

The children are a Chromecast and a Kodi player. The select_source command will be passed directly to an A/V receiver. The turn_on and turn_off commands will be redirected to the television, and the volume commands will be redirected to an audio receiver. These could be command line switches or any other entity in Home Assistant. Switches are also available to turn the volume up, turn the volume down, and mute the audio. In this example, a switch is available to control the power to the television. Usage examples Chromecast & Kodi control with switches For more information see the time section in the template documentation. Using now() will cause templates to be refreshed at the start of every new minute. When using state_template, if you use a template that depends on the current time it is recommended to use now(). The source attribute is the currently select source, while the source_list attribute is a list of all available sources. When providing select_source as a command, it is recommended to also provide the attributes source, and source_list. The volume_mute service should toggle the mute setting. The attribute is_volume_muted should return either True or the on state when the volume is muted. 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. If not provided, the toggle command will delegate to turn_on or turn_off based on the state. If all the children are idle/off and state is on, the Universal Media Player’s state will be on. If state indicates the media player is off, this status will take precedence over the states of the children. The state attribute indicates if the media player is on or off. It is recommended that the command turn_on, the command turn_off, and the attribute state all be provided together.


Entities in the children: list must be media players, but the state template can contain any entity. The Universal Media Player will also inherit its state from the first active child if a state_template is not provided. The Universal Media Player will control the first child on the list that is active (not idle/off). The Universal Media Player will primarily imitate one of its children.

The device class that this entity represents.
