Home Assistant Integration - Zone Media Players with Automatic Source Management

I’ve used Amplipi less than I anticipated over the years, in part due to user experience flow in Home Assistant (which I use extensively to manage my smart home).

I want to simply select the room (zone) media player, select a listening source/stream i.e. Sonos (via rca), Radio Station, Airplay etc. and then set the volume and go.

So I’ve forked the hacs_amplipi project and implemented that plus some other enhancements:

  • Zone-centric media players: zones and groups list streams by name. Picking a stream routes it to one of the 4 AmpliPi sources automatically; you no longer manage buses yourself.
  • Automatic bus freeing: a source is released as soon as no zone is listening to it. This happens immediately after actions taken in HA, and after a configurable grace period for changes made outside HA. Bus freeing pauses while an announcement plays.
  • RCA-reserved sources: reserve sources for RCA inputs. They are only lent to other streams once every other source is in use. When the RCA input needs its source back, the borrowing stream moves to a free source along with its zones. If no source is free, the RCA input wins and the zones are disconnected with a notification.
  • Options flow: reserved sources, bus freeing on/off, grace period, and whether bus/stream entities are created.
  • Speaker grouping: HA join/unjoin/group_members are supported. Turning a zone on resumes its last stream, which is remembered across restarts.
  • Diagnostics: download a config entry diagnostics file, with the host and stream credentials redacted.
  • Device structure: a controller device with zone and group devices under it.
  • Firmware check: runs once at setup and raises a Repairs issue that links to your controller, instead of a notification on every poll.
  • Brand icon and logo: shipped in the integration (brand/), so HA 2026.3+ shows the AmpliPi icon on the Integrations and device pages.
  • Mute zones while their stream is paused: a new option, off by default. Once a stream has been paused or stopped for the mute delay (30s by default, adjustable from 5 to 600), the zones listening to it are muted. AmpliPi only puts its amplifiers into standby when every zone on the unit is muted, so a paused zone left unmuted used to keep them all running.
    • Zones are unmuted when the stream plays again or when you pick another stream for them. Playing from Home Assistant unmutes straight away.
    • Zones you muted yourself are never unmuted, and a zone you unmute during a pause is left alone until that pause ends.
    • RCA/aux inputs, announcements and Music Assistant’s streams are never muted this way, and nothing happens while an announcement plays.
  • Works alongside Music Assistant: Music Assistant 2.10 added its own AmpliPi provider, which controls the AmpliPi directly and shares its 4 sources with this integration. Its “Music Assistant N” streams are now hidden from zone and group source lists and don’t get stream media players. A zone playing from Music Assistant still shows that stream as its current source.

Sharing here in case anyone else wants this flow, I forked and updated pyamplipi to support reporting disabled streams (filtered out of the source selection for HA media players) and some other enhancements/fixes (my fork of hacs_amplipi automatically uses the forked pyamplipi).

Whilst doing this I discovered the Music Assistant provider for Amplipi (for anyone else that has yet to discover it). My fork works alongside it and filters out the Music Assistant streams from the source selector (leaving MA to manage it’s own streams).

2 Likes

Thank you so much for sharing! This looks like exactly what I have been hoping for with the AmpliPi - zone centric control. I will definitely be giving this a go!!

1 Like

Agree with you that this has been a frustrating part of the experience within the normal amplipi app and the HA experience. I have somewhat hacked it enough right now to use Homekit with a new “Speaker Room” and then a handful of “Lights” for the different rooms and a “Switch” for the sources. I turn on the “Lights” for a specific room and adjust the “brightness” for volume - it defaults to turning on whatever “Switch” is on…it works okay as long as I’m only listening to one source.

I like this a lot!

1 Like