mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-18 23:06:58 +00:00
Allow users to set device class for universal media player (#16579)
This commit is contained in:
parent
88b54e55d4
commit
ce12f46d2c
@ -42,6 +42,7 @@ media_player:
|
||||
attributes:
|
||||
is_volume_muted: ENTITY_ID|ATTRIBUTE
|
||||
state: ENTITY_ID|ATTRIBUTE
|
||||
device_class: tv
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
@ -65,6 +66,10 @@ attributes:
|
||||
description: "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."
|
||||
required: false
|
||||
type: string
|
||||
device_class:
|
||||
description: The device class that this entity represents. Can be `tv`, `speaker`, or `receiver`.
|
||||
required: false
|
||||
type: string
|
||||
{% endconfiguration %}
|
||||
|
||||
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.
|
||||
@ -273,6 +278,7 @@ media_player:
|
||||
data:
|
||||
entity_id: remote.alexander_down_guest
|
||||
activity: "{{ source }}"
|
||||
device_class: tv
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user