mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +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:
|
attributes:
|
||||||
is_volume_muted: ENTITY_ID|ATTRIBUTE
|
is_volume_muted: ENTITY_ID|ATTRIBUTE
|
||||||
state: ENTITY_ID|ATTRIBUTE
|
state: ENTITY_ID|ATTRIBUTE
|
||||||
|
device_class: tv
|
||||||
```
|
```
|
||||||
|
|
||||||
{% configuration %}
|
{% 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."
|
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
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
device_class:
|
||||||
|
description: The device class that this entity represents. Can be `tv`, `speaker`, or `receiver`.
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
{% endconfiguration %}
|
{% 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.
|
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:
|
data:
|
||||||
entity_id: remote.alexander_down_guest
|
entity_id: remote.alexander_down_guest
|
||||||
activity: "{{ source }}"
|
activity: "{{ source }}"
|
||||||
|
device_class: tv
|
||||||
```
|
```
|
||||||
|
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user