Home Assitant Integration

This commit is contained in:
2026-02-23 15:23:00 -06:00
parent 3204f07947
commit 87de29797e
7 changed files with 606 additions and 176 deletions
+3 -1
View File
@@ -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