PlexEx — Extend the official Plex integration

Hi there!

I’d like to share PlexEx, a small custom integration that extends the official Home Assistant Plex integration with additional actions for automations.

The goal is simple: make it possible to search your Plex movie library and manage watched status directly from Home Assistant automations.

Features

PlexEx currently provides two actions:

  • plexex.search_movies — search your Plex movie library by title or part of a title. Returns matching movies with their ratingKey, title, release year, view count, and last watched timestamp.
  • plexex.mark_unwatched — mark a movie as unwatched using its Plex ratingKey.

Search results can be accessed through Home Assistant’s response_variable, so you can use them in templates, loops, notifications, and other automation actions.

Why another Plex integration?

PlexEx is not intended to replace the official Plex integration.

Instead, it reuses the server URL and authentication token from an existing official Plex configuration entry. There is no need to configure Plex credentials again.

It also keeps things deliberately lightweight:

  • No additional entities or sensors.
  • No separate Plex connection configuration.
  • Multiple Plex servers are supported.
  • Plex API calls run outside Home Assistant’s event loop.

Example

Search for a movie and use the results in an automation:

sequence:
  - action: plexex.search_movies
    data:
      title: Harry Potter
    response_variable: result

  - repeat:
      for_each: "{{ result.movies }}"
      sequence:
        - action: persistent_notification.create
          data:
            title: Plex search
            message: "{{ repeat.item.title }} ({{ repeat.item.year }})"

Installation

Requirements:

  • Home Assistant 2026.11 or newer.
  • The official Plex integration configured with your Plex server.

You can install PlexEx through the Home Assistant Marketplace by adding the GitHub repository as a custom repository:

After installation, add PlexEx from Settings → Devices & services → Add integration and select your existing Plex server.

The integration is still small and focused, and I’d appreciate feedback, ideas, and suggestions for additional Plex automation actions.

Thanks!

Hi there!

Released new version of PlexEx - 0.3.6

Changes:

  1. Added Plex Pass Sensor - shows does user have Plex Pass or not with additional details in attributes. Disabled for local connect without the token.
  2. Search movies and Make Unwatched actions now receive instance of PlexEx integration in case there are few of them instead of a wide string as service name.
  3. Made a big refactoring to make code clear and obvious.

In plans:

  • Add triggers based on markers (markers are supported with Plex Pass subscription).

I’d still appreciate feedback, ideas, and suggestions for PlexEx improving and developing.

Thanks!

Hi there!

PlexEx 0.7.0 is out!

Changes:

  • Added support for local Plex servers and made PlexEx respect the SSL verification setting from the official Plex integration.
  • The Plex Pass Sensor can report Plex Pass status for local servers; account details are available when the server’s token can be used with plex.​tv.
  • Added a final credits trigger. When playback crosses a movie’s final credits marker, PlexEx fires a Home Assistant event and updates the Playback event entity. Final credits markers require Plex Pass.
  • Improved setup and connection handling, including when the linked Plex server is unavailable or has been changed.

I’d still appreciate your feedback, ideas, and suggestions for PlexEx.

Thanks!

Hi there!

PlexEx 0.8.2 is out!

Changes:

  • Added a plexex.skip_marker action. It seeks a Plex player to the end of the intro, credits, or commercial break it is playing right now. The optional markers field limits it to specific kinds (intro, credits, final_credits, commercial). The action fails if the player is not inside a marker, so it is safe to call from a button. The player has to support seeking, so Plex Web and other clients that can’t be controlled remotely won’t work.
  • Markers are no longer limited to final credits. The Playback event entity now reports when playback enters or leaves an intro, credits, final credits, or commercial marker: intro_started, intro_ended, credits_started, credits_ended, final_credits_started, final_credits_ended, commercial_started, commercial_ended. Marker events work for both movies and TV episodes. Each event is also fired on the Home Assistant event bus with the plexex_ prefix, for example plexex_intro_started. Markers are created by Plex itself, and intro and credits detection require Plex Pass.
  • Added player-based events. Every media player created by the official Plex integration now gets its own Playback event entity, so you can react to one particular player. The entity on the PlexEx server device still receives events from all players. Event data now also includes player_id (the media player’s entity ID), media_type, show_title, season, episode, marker_type, and final.
  • Improved position tracking. Between media player updates, PlexEx estimates the playback position locally and checks it once per second, without polling Plex sessions. Triggers fire more precisely, and seeking and resuming inside a marker are handled consistently (see the README for the details).
  • Internal refactoring of the playback monitor.

Example — skip every intro on every player automatically:

alias: Skip Plex intros
triggers:
  - trigger: event
    event_type: plexex_intro_started
actions:
  - action: plexex.skip_marker
    data:
      entity_id: "{{ trigger.event.data.player_id }}"
      markers:
        - intro

In plans:

  • Offsets for makers.
  • Extend search from only movies on show, season, episode.

I’d still appreciate your feedback, ideas, and suggestions for PlexEx.

Thanks!

Hi there!

PlexEx 0.9.9 is out!

Changes since 0.8.2:

  • Added triggers with an offset. PlexEx now provides its own automation triggers, one per event type and named like the event: plexex.intro_started, plexex.final_credits_started, and so on. Unlike the Playback event entities, each trigger can fire before or after the marker boundary (up to 5 minutes either way), for example to bring the lights up 20 seconds before the final credits begin. In the automation editor, add a trigger, search for Plex, pick the event, select the players, and set Offset. You can target players directly or through a device, area, or label. Without a target in YAML the trigger follows every Plex player. The event fields are available on trigger, for example {{ trigger.title }} and {{ trigger.entity_id }}.
  • Added plexex.search. It searches the library for movies, shows, seasons, or episodes by title (type: movie | show | season | episode) and returns media with ratingKey, title, year, viewCount, lastViewedAt, and for seasons and episodes also showTitle, seasonNumber, and episodeNumber.
  • plexex.search_movies is deprecated and will be removed in 0.10.0. Use plexex.search with type: movie. It returns the same movies, but under media instead of movies, and each item now has a type field.
  • Marker caching is improved. An item Plex had no markers for is read again the next time it is played, so markers Plex detects later are picked up without a restart. If Plex can’t be read, PlexEx retries after a minute.
  • The Playback event entity now shows readable event names, for example Intro started, in the automation editor and in the entity history. YAML still uses the event types.
  • The integration now declares local_push as its IoT class, and the minimum supported Home Assistant version is 2026.11.0.
  • Internal cleanup and refactoring.

Examples:

Lights up 20 seconds before the final credits begin:

triggers:
  - trigger: plexex.final_credits_started
    target:
      entity_id: media_player.plex_plex_for_apple_tv_living_room
    options:
      offset: "-00:00:20"

Find an episode by title:

action: plexex.search
data:
  type: episode
  title: Pilot
response_variable: result

I’d still appreciate your feedback, ideas, and suggestions for PlexEx.

Thanks!