mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-16 13:56:29 +00:00
Add dev documentation for media player source (#54)
* Add dev documentation for media player source * Clarification and whitespace fixes
This commit is contained in:
parent
bacd84862e
commit
7770ccd735
@ -13,6 +13,8 @@ sidebar_label: Media Player
|
||||
| ---- | ---- | ------- | -----------
|
||||
| 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)
|
||||
| source | string | None | The currently selected input source for the media player.
|
||||
| source_list | list | None | The list of possible input sources for the media player. (This list should contain human readable names, suitible for frontend display)
|
||||
|
||||
|
||||
## Methods
|
||||
@ -26,4 +28,16 @@ Optional. Switch the sound mode of the media player.
|
||||
"""Switch the sound mode of the entity."""
|
||||
|
||||
def async_select_sound_mode(self, sound_mode):
|
||||
"""Switch the sound mode of the entity."""
|
||||
"""Switch the sound mode of the entity."""
|
||||
|
||||
### Select source
|
||||
Optional. Switch the selected input source for the media player.
|
||||
|
||||
class MyMediaPlayer(MediaPlayerDevice):
|
||||
# Implement one of these methods.
|
||||
|
||||
def select_source(self, source):
|
||||
"""Select input source."""
|
||||
|
||||
def async_select_source(self, source):
|
||||
"""Select input source."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user