|
@@ -6,7 +6,7 @@ import os.path
|
|
|
import voluptuous as vol
|
|
import voluptuous as vol
|
|
|
|
|
|
|
|
from homeassistant.components.media_player import (
|
|
from homeassistant.components.media_player import (
|
|
|
- MediaPlayerDevice, PLATFORM_SCHEMA)
|
|
|
|
|
|
|
+ MediaPlayerEntity, PLATFORM_SCHEMA)
|
|
|
from homeassistant.components.media_player.const import (
|
|
from homeassistant.components.media_player.const import (
|
|
|
SUPPORT_TURN_OFF, SUPPORT_TURN_ON, SUPPORT_PREVIOUS_TRACK,
|
|
SUPPORT_TURN_OFF, SUPPORT_TURN_ON, SUPPORT_PREVIOUS_TRACK,
|
|
|
SUPPORT_NEXT_TRACK, SUPPORT_VOLUME_STEP, SUPPORT_VOLUME_MUTE,
|
|
SUPPORT_NEXT_TRACK, SUPPORT_VOLUME_STEP, SUPPORT_VOLUME_MUTE,
|
|
@@ -80,7 +80,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
|
|
hass, config, device_data
|
|
hass, config, device_data
|
|
|
)])
|
|
)])
|
|
|
|
|
|
|
|
-class SmartIRMediaPlayer(MediaPlayerDevice, RestoreEntity):
|
|
|
|
|
|
|
+class SmartIRMediaPlayer(MediaPlayerEntity, RestoreEntity):
|
|
|
def __init__(self, hass, config, device_data):
|
|
def __init__(self, hass, config, device_data):
|
|
|
self.hass = hass
|
|
self.hass = hass
|
|
|
self._unique_id = config.get(CONF_UNIQUE_ID)
|
|
self._unique_id = config.get(CONF_UNIQUE_ID)
|