![]() Needs to be unique within the media_player platform. It was originally based on PS3 Media Server by shagrath, in order to ensure greater stability and file-compatibility. It is capable of sharing video, audio and images between most modern devices. The Universal Media Player will primarily imitate one of its children. Universal Media Server is a DLNA-compliant UPnP Media Server. 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. Universal Media Server is another free and open-source software in the list that can also be installed easily on Windows 10 just like any other executable file to stream music, photos, and videos with the standards DLNA (Digital Living Network Alliance) and UPnP (Universal Plug and Play) devices. If not provided, the toggle command will delegate to turn_on or turn_off based on the state. ![]() 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. When using state_template, if you use a template that depends on the current time it is recommended to use now(). Using now() will cause templates to be refreshed at the start of every new minute. Usage examples Chromecast & Kodi control with switches For more information see the time section in the template documentation. 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.
0 Comments
Leave a Reply. |