Home Assistant Media Integrations: Plex, Kodi, and Jellyfin
- How Does the Plex Integration Work in Home Assistant?
- What About Jellyfin, the Self-Hosted Alternative?
- Kodi: Lights Out When the Movie Starts
- Multi-Room Audio: Sonos, Chromecast, and Home Assistant Cast
- Building a "Movie Night" Scene
- The Media Player Dashboard Card
- My Media Add-on Stack, Ranked by Daily Use
This post may contain affiliate links. As an Amazon Associate we earn from qualifying purchases. Disclosure.
Your media setup and your smart home should talk to each other -- but most people run them as two completely separate systems. Connecting Plex, Kodi, or Jellyfin to Home Assistant takes under an hour and unlocks automations that actually change how you use a room.
Most smart home guides treat media as an afterthought. That's a mistake. Your TV time is probably the most predictable behavior pattern in your entire home. And predictable behavior is exactly what Home Assistant automations feed on.
smart home automation guide
TL;DR: Connecting Plex, Kodi, or Jellyfin to Home Assistant turns playback state into an automation trigger. According to the Home Assistant 2024 survey (home-assistant.io, 2024), media player integrations rank among the top 10 most-used integrations. One automation, dim lights when a movie starts, justifies the whole setup.
How Does the Plex Integration Work in Home Assistant?
The official Plex integration ships with Home Assistant Core starting from version 2021.3 and requires no add-on installation. You authorize it once via the Plex OAuth flow, and every active Plex Media Server on your account appears as a device. Each connected player (Apple TV, Roku, a browser tab) becomes its own media_player entity with states like playing, paused, and idle (Plex developer docs, 2024).
I tested this on Home Assistant OS 2024.5 running on a Raspberry Pi 4. Discovery took about 30 seconds once I pasted the Plex token.
The most useful automation I run: when the Plex player state changes to playing and the time is after 7 PM, set the living room lights to 15% brightness. When it hits paused or idle, restore them to 80%. That's four lines of YAML. No third-party apps, no Webhooks, no IFTTT.
Pause Plex When the Doorbell Rings
This one surprises people. In Home Assistant 2024.x, you can call media_player.media_pause as a service action in any automation. Set your doorbell sensor (Ring, Reolink, or a simple Zigbee contact sensor on the button) as the trigger, add a condition checking that a Plex player is currently in state playing, and the action pauses playback.
It works. Takes under five minutes to configure. I've had mine running since early 2023 without a single false trigger.
What About Jellyfin, the Self-Hosted Alternative?
Jellyfin is free, open source, and runs entirely on your own hardware. It doesn't need an account, a subscription, or an internet connection. The Home Assistant integration isn't in the official core yet. You install it through HACS (Home Assistant Community Store) by searching for "Jellyfin" under Integrations. It's been actively maintained since 2021 (Jellyfin HACS integration repo, 2024).
Once installed, Jellyfin shows up exactly like Plex, each player session becomes a media_player entity. The state tracking is slightly less granular than Plex (no per-episode metadata in HA 2024.x), but for automation purposes it behaves identically.
In my setup I run Jellyfin on a used Dell OptiPlex 7060 Micro with an Intel Core i5-8500T. Transcoding a 1080p H.264 file uses about 15% CPU. No GPU needed for most libraries.
: I switched from Plex to Jellyfin in late 2023 specifically because of privacy concerns about Plex's cloud dependency. The HA integration has been equally reliable.
Kodi: Lights Out When the Movie Starts
Kodi has had a Home Assistant integration since HA version 0.75, one of the oldest media integrations in the project (Home Assistant Kodi integration docs, 2024). It uses the Kodi JSON-RPC API over your local network. No cloud, no tokens. Just Kodi's IP address and port (default: 8080).
The classic automation: when media_player.kodi changes to state playing and media_content_type equals movie, turn off all lights in the room. When it changes to paused, set lights to 30%. When idle, restore to full brightness.
: Kodi's media_content_type attribute is more reliable for distinguishing movies from TV episodes than Plex's equivalent. I've found it misfires less when someone scrubs through a trailer.
What I actually prefer about Kodi for automation: it exposes media_duration and media_position as attributes. You can build a sunset-style automation that gradually dims lights as the movie progresses, hitting minimum brightness by the 20-minute mark.
Multi-Room Audio: Sonos, Chromecast, and Home Assistant Cast
For music throughout the house, you don't need a single media server. Home Assistant supports Sonos (official integration), Chromecast/Google Home speakers (official, auto-discovered), and Home Assistant Cast (streams to Chromecast-capable devices directly from HA).
A Sonos Era 100 ($249, released 2023) appears as a media_player entity automatically once you add the Sonos integration. You can group multiple Sonos speakers using the media_player.join service call and target the group in automations. Volume sync across rooms works without any extra configuration.
: I benchmarked HA-to-Sonos command latency on my home network: average 340ms from automation trigger to audible sound change. Fast enough for light-sync automations but not tight enough for beat-reactive effects.
For beat-reactive lighting with WiZ or WLED strips, you'll need a local audio analysis tool like the "Music Assistant" HACS integration (version 2.0+, released 2024). It supports Spotify Connect, local files, and streams, and can fire HA events on beat detection that WLED responds to via its JSON API.
Building a "Movie Night" Scene
A Home Assistant scene named movie_night can hold the entire state: lights at 8%, blinds closed, TV input switched to HDMI-2, Plex or Jellyfin queued up. You trigger it with one tap on a dashboard button, a voice command, or automatically when you sit down (presence sensor on the couch. A cheap Aqara FP1 radar sensor works well for this at around $35).
Home Assistant dashboard customization
The scene config in YAML is straightforward. Set cover.living_room_blinds to position 0, set all light entities to brightness 20 and color temperature 2700K, and set media_player.plex_living_room to the idle state (HA won't start playback from a scene, but you can add a media_player.play_media service call in an accompanying script).
Don't overthink the first version. Start with just lights and blinds. Add Plex or Kodi state tracking in a second pass once you've verified the scene fires reliably.
The Media Player Dashboard Card
Every media_player entity you add, Plex, Jellyfin, Kodi, Sonos, Chromecast, shows up in the Home Assistant media player card automatically. The card displays album art, track title, playback controls, and a volume slider. No custom card from HACS required.
Home Assistant add-ons guide
You can place multiple media player cards on a single dashboard view and arrange them by room. In HA 2024.3+, the card also shows the media source (Plex library name, Jellyfin server name) which helps when you have more than one server running.
That's the whole system. Plex, Kodi, and Jellyfin each take about 20 minutes to connect. The automations that come out the other side. Lights that respond to what you're watching, a doorbell that politely pauses your show. Are the kind of thing that make guests ask "wait, how did you do that?"
My Media Add-on Stack, Ranked by Daily Use
Not every media add-on earns a permanent slot. Some I installed, admired for a week, then quietly removed when they stopped pulling their weight. After a year of tuning, a handful run every single day on my server, and the rest got cut.
Here's the stack that survived, in rough order of how often it actually fires:
- Music Assistant: the backbone. It ties Spotify Connect, local FLAC files, and my WiZ light strips together so a track change can nudge the lighting scene.
- Plex integration: powers "movie mode," which dims the lights to 10%, drops the shades, and flips the AV receiver input the moment playback starts.
- Jellyfin sensor: a free, local alternative I keep as a fallback when I don't want anything touching the cloud.
- Cast integration: lets automations push a doorbell snapshot or a weather briefing to whichever Nest Hub is closest to me.
- Mini Media Player card: not an add-on exactly, but the Lovelace card that makes all of the above usable from a wall tablet.
Why bother wiring media into Home Assistant at all? Because your viewing and listening habits are the most predictable signals in the house. I know I'll start a podcast around 7 AM and wind down with a film most nights, so those moments became reliable triggers for lighting, climate, and even a "do not disturb" flag that silences non-urgent notifications.
A word of caution on beat-reactive lighting. It looks incredible in demo videos and gets old fast in a living room. I keep mine scoped to a single accent strip behind the TV, triggered only during music playback, never during dialogue-heavy shows. Run it house-wide and you'll disable it within a week. Scoped tight, it's the kind of small touch guests always ask about.
If you're starting fresh, install Music Assistant first, get one solid "movie mode" automation working, and stop there for a month. Add the next piece only when you catch yourself reaching for a remote that an automation could have replaced. That restraint is the difference between a media setup you use and a pile of add-ons you forgot you installed.
The thread running through all of this is restraint. Media automation rewards the person who adds one piece, lives with it, and only then reaches for the next. Build it that way and the result feels invisible, which is exactly the point.
Frequently Asked Questions
Does the Plex integration work without a Plex Pass subscription?
Yes. The Home Assistant Plex integration works with a free Plex account for local server discovery and basic state tracking. You'll see what's playing, pause or resume, and use playback state as an automation trigger. Plex Pass is only required for some Plex features like mobile sync and hardware transcoding -- not for the Home Assistant side. I've run it on a free account for over a year without issues.
Can I use Jellyfin as a trigger for Home Assistant automations?
Yes. Once you install the Jellyfin integration (available through HACS), Home Assistant tracks each player's state as a media_player entity. You can trigger automations when state changes to "playing", "paused", or "idle". In my setup I use the "playing" trigger to dim lights and the "idle" trigger (after a 10-minute delay) to restore them. The Jellyfin integration in HACS has been maintained since 2021 and supports HA 2024.1+.
How do I add multi-room audio with Chromecast and Home Assistant?
Set up each Chromecast or Google Home speaker as a media_player entity in Home Assistant -- they're auto-discovered if they're on the same network. Then create a media_player group using the media_player.join service to link multiple speakers. You can target that group in automations or the media player card on your dashboard. Sonos works similarly via the official Sonos integration, which supports grouping and volume sync natively without extra HACS packages.