Rename MediaPlayerDevice to MediaPlayerEntity (#479)

This commit is contained in:
Erik Montnemery 2020-04-26 21:54:07 +02:00 committed by GitHub
parent 2486f366cb
commit 762d1da8ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,7 @@ sidebar_label: Media Player
:::info Incomplete
This entry is incomplete. Contribution welcome.
:::
A media player entity controls a media player. Derive a platform entity from [`homeassistant.components.media_player.MediaPlayerEntity`](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/media_player/__init__.py).
## Properties
@ -27,7 +28,7 @@ Properties should always only return information from memory and not do I/O (lik
### Select sound mode
Optional. Switch the sound mode of the media player.
class MyMediaPlayer(MediaPlayerDevice):
class MyMediaPlayer(MediaPlayerEntity):
# Implement one of these methods.
def select_sound_mode(self, sound_mode):
@ -39,7 +40,7 @@ Optional. Switch the sound mode of the media player.
### Select source
Optional. Switch the selected input source for the media player.
class MyMediaPlayer(MediaPlayerDevice):
class MyMediaPlayer(MediaPlayerEntity):
# Implement one of these methods.
def select_source(self, source):
@ -65,7 +66,7 @@ Required. Returns one of the defined constants from the below list that matches
|MEDIA_TYPE_GAME|
|MEDIA_TYPE_APP|
class MyMediaPlayer(MediaPlayerDevice):
class MyMediaPlayer(MediaPlayerEntity):
# Implement the following method.
@property