Card Plex - dckiller51/astrion-custom-dashboard GitHub Wiki
๐๏ธ Plex Card (plex)
Browse your Plex server on the remote: On Deck, Recently added movies and Recently added TV shows, as rows of posters. Pick something and play it on your TV.
The card talks directly to your Plex server, not through Home Assistant. Playing on the TV goes through Home Assistant.
๐ธ Preview
โจ Features & Possibilities
- Poster rows that scroll sideways. Movies and TV shows are found by themselves in your libraries; no library name to type.
- Tap a poster: the details window with the synopsis, genres and, for an episode, the rest of its season. Its Play button starts it on the TV.
- Hold a poster: browse the whole library it belongs to.
- Light on the remote: the server sends small posters, and only the visible ones are loaded.
How "Play" works
| You set | Play does |
|---|---|
Only media_entity |
Opens the Plex app on the TV (media_player.select_source with source). You then pick the item there. |
play_entity too |
Starts that exact item (media_player.play_media). |
For play_entity, two options:
- Home Assistant's Plex integration: use the
media_playerof the TV's Plex app (Plex client).play_content_type:video(default). The Plex app must already be open on the TV: Home Assistant can't wake it. - Home Assistant's Apple TV integration: use the Apple TV's
media_playerwithplay_content_type:url.
โ๏ธ Options Reference
| Parameter | Type | Default | Description |
|---|---|---|---|
type |
string | โ | plex |
host |
string | โ | Plex server address, e.g. http://192.168.1.20:32400. Required. |
token |
string | โ | Your X-Plex-Token. Required. |
media_entity |
string | โ | The TV's media_player, to open the Plex app. Required. |
source |
string | Plex |
Name of the Plex app in that player's source list. |
play_entity |
string | โ | A media_player that can play a Plex item, see above. |
play_content_type |
string | video |
url for Home Assistant's Apple TV integration. |
show_on_deck |
bool | true |
The On Deck row. |
show_recently_added_movies |
bool | true |
The Recently added movies row. |
show_recently_added_shows |
bool | true |
The Recently added TV shows row. |
items_per_row |
int | 12 |
Posters per row, 1 to 30. |
Finding your token
In Plex Web, open any item โบ โฏ โบ Get Info โบ View XML. The address of the page that opens ends with X-Plex-Token=โฆ: that's it.
๐ Unlike the Home Assistant token, the Plex token is saved in
dashboard.json, so it's also in your backups. Don't share a backup publicly.
๐ JSON Configuration Example
{
"type": "plex",
"options": {
"host": "http://192.168.1.20:32400",
"token": "YOUR_PLEX_TOKEN",
"media_entity": "media_player.living_room_tv",
"play_entity": "media_player.plex_living_room_tv",
"show_recently_added_shows": false,
"items_per_row": 15
}
}
See also: Card Media player ยท Apple TV