Home Assitant Integration
This commit is contained in:
@@ -13,6 +13,7 @@ from homeassistant.components.media_player.const import (
|
||||
MediaPlayerState,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import CONF_NAME
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
||||
@@ -137,13 +138,14 @@ class RelayTVMediaPlayer(CoordinatorEntity, MediaPlayerEntity):
|
||||
"""RelayTV as a HA media_player."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = "RelayTV"
|
||||
_attr_name = None
|
||||
|
||||
def __init__(self, entry: ConfigEntry, coordinator, api) -> None:
|
||||
super().__init__(coordinator)
|
||||
self._entry = entry
|
||||
self._api = api
|
||||
self._attr_unique_id = f"{entry.entry_id}_player"
|
||||
self._attr_name = entry.data.get(CONF_NAME, entry.title)
|
||||
|
||||
self._attr_supported_features = (
|
||||
MediaPlayerEntityFeature.PLAY
|
||||
|
||||
Reference in New Issue
Block a user