mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-17 22:36:30 +00:00
Media player: sound mode structure (#17)
* Media player: sound mode structure see this Issue in the architecture fork: https://github.com/home-assistant/architecture/issues/23 * remove select_sound_mode_supported
This commit is contained in:
parent
698c5423cc
commit
9f3ca0bf2c
@ -11,6 +11,19 @@ sidebar_label: Media Player
|
|||||||
|
|
||||||
| Name | Type | Default | Description
|
| Name | Type | Default | Description
|
||||||
| ---- | ---- | ------- | -----------
|
| ---- | ---- | ------- | -----------
|
||||||
|
| sound_mode | string | None | The current sound mode of the media player
|
||||||
|
| sound_mode_list | list | None | Dynamic list of available sound modes (set by platform, empty means sound mode not supported)
|
||||||
|
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
### Select sound mode
|
||||||
|
Optional. Switch the sound mode of the media player.
|
||||||
|
|
||||||
|
class MyMediaPlayer(MediaPlayerDevice):
|
||||||
|
# Implement one of these methods.
|
||||||
|
|
||||||
|
def select_sound_mode(self, sound_mode):
|
||||||
|
"""Switch the sound mode of the entity."""
|
||||||
|
|
||||||
|
def async_select_sound_mode(self, sound_mode):
|
||||||
|
"""Switch the sound mode of the entity."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user