Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions homeassistant/components/androidtv/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from androidtv.exceptions import LockNotAcquiredException
import voluptuous as vol

from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity
from homeassistant.components.media_player.const import (
SUPPORT_NEXT_TRACK,
SUPPORT_PAUSE,
Expand Down Expand Up @@ -373,7 +373,7 @@ def _adb_exception_catcher(self, *args, **kwargs):
return _adb_decorator


class ADBDevice(MediaPlayerDevice):
class ADBDevice(MediaPlayerEntity):
"""Representation of an Android TV or Fire TV device."""

def __init__(
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/anthemav/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import anthemav
import voluptuous as vol

from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity
from homeassistant.components.media_player.const import (
SUPPORT_SELECT_SOURCE,
SUPPORT_TURN_OFF,
Expand Down Expand Up @@ -79,7 +79,7 @@ def async_anthemav_update_callback(message):
async_add_entities([device])


class AnthemAVR(MediaPlayerDevice):
class AnthemAVR(MediaPlayerEntity):
"""Entity reading values from Anthem AVR protocol."""

def __init__(self, avr, name):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/apple_tv/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pyatv.const as atv_const

from homeassistant.components.media_player import MediaPlayerDevice
from homeassistant.components.media_player import MediaPlayerEntity
from homeassistant.components.media_player.const import (
MEDIA_TYPE_MUSIC,
MEDIA_TYPE_TVSHOW,
Expand Down Expand Up @@ -76,7 +76,7 @@ def on_hass_stop(event):
async_add_entities([entity])


class AppleTvDevice(MediaPlayerDevice):
class AppleTvDevice(MediaPlayerEntity):
"""Representation of an Apple TV device."""

def __init__(self, atv, name, power):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/aquostv/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sharp_aquos_rc
import voluptuous as vol

from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity
from homeassistant.components.media_player.const import (
SUPPORT_NEXT_TRACK,
SUPPORT_PAUSE,
Expand Down Expand Up @@ -121,7 +121,7 @@ def wrapper(obj, *args, **kwargs):
return wrapper


class SharpAquosTVDevice(MediaPlayerDevice):
class SharpAquosTVDevice(MediaPlayerEntity):
"""Representation of a Aquos TV."""

def __init__(self, name, remote, power_on_enabled=False):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/arcam_fmj/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from arcam.fmj.state import State

from homeassistant import config_entries
from homeassistant.components.media_player import MediaPlayerDevice
from homeassistant.components.media_player import MediaPlayerEntity
from homeassistant.components.media_player.const import (
MEDIA_TYPE_MUSIC,
SUPPORT_SELECT_SOUND_MODE,
Expand Down Expand Up @@ -63,7 +63,7 @@ async def async_setup_entry(
return True


class ArcamFmj(MediaPlayerDevice):
class ArcamFmj(MediaPlayerEntity):
"""Representation of a media device."""

def __init__(self, state: State, name: str, turn_on: Optional[ConfigType]):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/blackbird/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from serial import SerialException
import voluptuous as vol

from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity
from homeassistant.components.media_player.const import (
SUPPORT_SELECT_SOURCE,
SUPPORT_TURN_OFF,
Expand Down Expand Up @@ -128,7 +128,7 @@ def service_handle(service):
)


class BlackbirdZone(MediaPlayerDevice):
class BlackbirdZone(MediaPlayerEntity):
"""Representation of a Blackbird matrix zone."""

def __init__(self, blackbird, sources, zone_id, zone_name):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/bluesound/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import voluptuous as vol
import xmltodict

from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity
from homeassistant.components.media_player.const import (
ATTR_MEDIA_ENQUEUE,
MEDIA_TYPE_MUSIC,
Expand Down Expand Up @@ -200,7 +200,7 @@ async def async_service_handler(service):
)


class BluesoundPlayer(MediaPlayerDevice):
class BluesoundPlayer(MediaPlayerEntity):
"""Representation of a Bluesound Player."""

def __init__(self, hass, host, port=None, name=None, init_callback=None):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/braviatv/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from homeassistant.components.media_player import (
DEVICE_CLASS_TV,
PLATFORM_SCHEMA,
MediaPlayerDevice,
MediaPlayerEntity,
)
from homeassistant.components.media_player.const import (
SUPPORT_NEXT_TRACK,
Expand Down Expand Up @@ -115,7 +115,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
)


class BraviaTVDevice(MediaPlayerDevice):
class BraviaTVDevice(MediaPlayerEntity):
"""Representation of a Bravia TV."""

def __init__(self, client, name, pin, unique_id, device_info, ignored_sources):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/cast/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
)
import voluptuous as vol

from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity
from homeassistant.components.media_player.const import (
MEDIA_TYPE_MOVIE,
MEDIA_TYPE_MUSIC,
Expand Down Expand Up @@ -171,7 +171,7 @@ def async_cast_discovered(discover: ChromecastInfo) -> None:
hass.async_add_executor_job(setup_internal_discovery, hass)


class CastDevice(MediaPlayerDevice):
class CastDevice(MediaPlayerEntity):
"""Representation of a Cast device on the network.

This class is the holder of the pychromecast.Chromecast object and its
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/channels/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pychannels import Channels
import voluptuous as vol

from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity
from homeassistant.components.media_player.const import (
MEDIA_TYPE_CHANNEL,
MEDIA_TYPE_EPISODE,
Expand Down Expand Up @@ -116,7 +116,7 @@ def service_handler(service):
)


class ChannelsPlayer(MediaPlayerDevice):
class ChannelsPlayer(MediaPlayerEntity):
"""Representation of a Channels instance."""

def __init__(self, name, host, port):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/clementine/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from clementineremote import ClementineRemote
import voluptuous as vol

from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity
from homeassistant.components.media_player.const import (
MEDIA_TYPE_MUSIC,
SUPPORT_NEXT_TRACK,
Expand Down Expand Up @@ -67,7 +67,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
add_entities([ClementineDevice(client, config[CONF_NAME])])


class ClementineDevice(MediaPlayerDevice):
class ClementineDevice(MediaPlayerEntity):
"""Representation of Clementine Player."""

def __init__(self, client, name):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/cmus/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pycmus import exceptions, remote
import voluptuous as vol

from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity
from homeassistant.components.media_player.const import (
MEDIA_TYPE_MUSIC,
MEDIA_TYPE_PLAYLIST,
Expand Down Expand Up @@ -72,7 +72,7 @@ def setup_platform(hass, config, add_entities, discover_info=None):
add_entities([cmus_remote], True)


class CmusDevice(MediaPlayerDevice):
class CmusDevice(MediaPlayerEntity):
"""Representation of a running cmus."""

# pylint: disable=no-member
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/demo/media_player.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Demo implementation of the media player."""
from homeassistant.components.media_player import MediaPlayerDevice
from homeassistant.components.media_player import MediaPlayerEntity
from homeassistant.components.media_player.const import (
MEDIA_TYPE_MOVIE,
MEDIA_TYPE_MUSIC,
Expand Down Expand Up @@ -93,7 +93,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
)


class AbstractDemoPlayer(MediaPlayerDevice):
class AbstractDemoPlayer(MediaPlayerEntity):
"""A demo media players."""

# We only implement the methods that we support
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/denon/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import voluptuous as vol

from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity
from homeassistant.components.media_player.const import (
SUPPORT_NEXT_TRACK,
SUPPORT_PAUSE,
Expand Down Expand Up @@ -86,7 +86,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
add_entities([denon])


class DenonDevice(MediaPlayerDevice):
class DenonDevice(MediaPlayerEntity):
"""Representation of a Denon device."""

def __init__(self, name, host):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/denonavr/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import denonavr
import voluptuous as vol

from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity
from homeassistant.components.media_player.const import (
MEDIA_TYPE_CHANNEL,
MEDIA_TYPE_MUSIC,
Expand Down Expand Up @@ -159,7 +159,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
add_entities(receivers)


class DenonDevice(MediaPlayerDevice):
class DenonDevice(MediaPlayerEntity):
"""Representation of a Denon Media Player Device."""

def __init__(self, receiver):
Expand Down
6 changes: 3 additions & 3 deletions homeassistant/components/directv/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from directv import DIRECTV

from homeassistant.components.media_player import MediaPlayerDevice
from homeassistant.components.media_player import MediaPlayerEntity
from homeassistant.components.media_player.const import (
MEDIA_TYPE_CHANNEL,
MEDIA_TYPE_MOVIE,
Expand Down Expand Up @@ -77,7 +77,7 @@ async def async_setup_entry(
async_add_entities(entities, True)


class DIRECTVMediaPlayer(DIRECTVEntity, MediaPlayerDevice):
class DIRECTVMediaPlayer(DIRECTVEntity, MediaPlayerEntity):
"""Representation of a DirecTV receiver on the network."""

def __init__(self, *, dtv: DIRECTV, name: str, address: str = "0") -> None:
Expand Down Expand Up @@ -141,7 +141,7 @@ def unique_id(self):

return self._address

# MediaPlayerDevice properties and methods
# MediaPlayerEntity properties and methods
@property
def state(self):
"""Return the state of the device."""
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/dlna_dmr/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from async_upnp_client.profiles.dlna import DeviceState, DmrDevice
import voluptuous as vol

from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity
from homeassistant.components.media_player.const import (
MEDIA_TYPE_CHANNEL,
MEDIA_TYPE_EPISODE,
Expand Down Expand Up @@ -194,7 +194,7 @@ async def async_setup_platform(
async_add_entities([device], True)


class DlnaDmrDevice(MediaPlayerDevice):
class DlnaDmrDevice(MediaPlayerEntity):
"""Representation of a DLNA DMR device."""

def __init__(self, dmr_device, name=None):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/dunehd/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from pdunehd import DuneHDPlayer
import voluptuous as vol

from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity
from homeassistant.components.media_player.const import (
SUPPORT_NEXT_TRACK,
SUPPORT_PAUSE,
Expand Down Expand Up @@ -55,7 +55,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
add_entities([DuneHDPlayerEntity(DuneHDPlayer(host), name, sources)], True)


class DuneHDPlayerEntity(MediaPlayerDevice):
class DuneHDPlayerEntity(MediaPlayerEntity):
"""Implementation of the Dune HD player."""

def __init__(self, player, name, sources):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/emby/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pyemby import EmbyServer
import voluptuous as vol

from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity
from homeassistant.components.media_player.const import (
MEDIA_TYPE_CHANNEL,
MEDIA_TYPE_MOVIE,
Expand Down Expand Up @@ -134,7 +134,7 @@ async def stop_emby(event):
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, stop_emby)


class EmbyDevice(MediaPlayerDevice):
class EmbyDevice(MediaPlayerEntity):
"""Representation of an Emby device."""

def __init__(self, emby, device_id):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/enigma2/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from openwebif.api import CreateDevice
import voluptuous as vol

from homeassistant.components.media_player import MediaPlayerDevice
from homeassistant.components.media_player import MediaPlayerEntity
from homeassistant.components.media_player.const import (
MEDIA_TYPE_TVSHOW,
SUPPORT_NEXT_TRACK,
Expand Down Expand Up @@ -117,7 +117,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
add_devices([Enigma2Device(config[CONF_NAME], device)], True)


class Enigma2Device(MediaPlayerDevice):
class Enigma2Device(MediaPlayerEntity):
"""Representation of an Enigma2 box."""

def __init__(self, name, device):
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/epson/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
)
import voluptuous as vol

from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity
from homeassistant.components.media_player.const import (
SUPPORT_NEXT_TRACK,
SUPPORT_PREVIOUS_TRACK,
Expand Down Expand Up @@ -124,7 +124,7 @@ async def async_service_handler(service):
)


class EpsonProjector(MediaPlayerDevice):
class EpsonProjector(MediaPlayerEntity):
"""Representation of Epson Projector Device."""

def __init__(self, websession, name, host, port, encryption):
Expand Down
Loading