# Home Assistant Plugin input thread

**URL:** <https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360>\
**Category:** Home Automation Integration\
**Created:** [March 4, 2025, 3:37pm UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360 "2025-03-04T15:37:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![amplipi](https://yyz2.discourse-cdn.com/free1/user_avatar/amplipi.discourse.group/amplipi/32/8_2.png) [@amplipi](https://amplipi.discourse.group/u/amplipi)\
**Post date:** [March 4, 2025, 3:37pm UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360/1 "2025-03-04T15:37:35Z")

</div>

We’ve just [released 0.4.6](https://amplipi.discourse.group/t/new-amplipi-software-release-0-4-6/361) and are going to shift focus to our supporting cast, which includes the HACS AmpliPi plugin. I’d like to poll for community input, see what you all think we should have that we don’t.

So far we’ve been looking into how we can make automations easier to make and more useful, as well as making it so that we can integrate alongside Home Assistant’s recent official [Music Assistant plugin](https://www.home-assistant.io/integrations/music_assistant/).

So, what do you all think we should add? What should we change? What makes the current experience less than stellar? What do we already do well and should leave untouched while doing these updates? Let us know!

---

<div class="post-metadata">

**Author:** ![TheCraiggers](https://yyz2.discourse-cdn.com/free1/user_avatar/amplipi.discourse.group/thecraiggers/32/35_2.png) [@TheCraiggers](https://amplipi.discourse.group/u/TheCraiggers)\
**Post date:** [March 4, 2025, 11:50pm UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360/2 "2025-03-04T23:50:44Z")

</div>

One thing I use the OpenHab plugin for is linking power states to certain things, so that when nothing is playing, the zones all get muted.

It’s been awhile for me since I’ve tinkered with HA, but I can say one of the major reasons I keep bouncing off it is needing to deal with HACS. If there is a way to make the pluging an actual official plugin that one doesn’t need to use HACS for, that would be a big win in my book. (Not sure that’s even doable.)

---

<div class="post-metadata">

**Author:** ![bshootz](https://avatars.discourse-cdn.com/v4/letter/b/e480ec/32.png) [@bshootz](https://amplipi.discourse.group/u/bshootz)\
**Post date:** [March 5, 2025, 2:24pm UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360/3 "2025-03-05T14:24:30Z")

</div>

One issue that needs addressed is when a zone doesn’t belong to any source it shows as powered off and it’s not possible to control it or assign it to a source. The only option is to go into the AmpliPi’s interface and add the zone into a source, then it becomes controllable in Home Assistant.

Examples showing the difference:

 ![image](https://global.discourse-cdn.com/free1/uploads/amplipi/original/1X/bea86b526f018b5b9a59b1ced34547bb92716087.png)

 ![image](https://global.discourse-cdn.com/free1/uploads/amplipi/original/1X/90dc2e4583eb119d4cbfc444d6cebfdcde75d4bf.png)

---

<div class="post-metadata">

**Author:** ![amplipi](https://yyz2.discourse-cdn.com/free1/user_avatar/amplipi.discourse.group/amplipi/32/8_2.png) [@amplipi](https://amplipi.discourse.group/u/amplipi)\
**Post date:** [March 5, 2025, 5:20pm UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360/4 "2025-03-05T17:20:28Z")

</div>

I can share that the first thing I’ve done in our upcoming update was make the power buttons on the default HA media players disconnect zones from whatever they’re on and mute them rather than just giving you the “This doesn’t support media\_player.toggle” or “This doesn’t support media\_player.turn\_off” messages so while you’ve got a working solution, it will make more sense in the future.

Also, I haven’t personally looked to much into how to get an official plugin but we can shoot for that. It’s also possible that we have too short a dev cycle to wait for their approval process for every AmpliPi version that would effect the HA plugin so we might be stuck with HACS for some time until we reach a 1.0 version as opposed to the 0.4.6 that we’re currently in.

---

<div class="post-metadata">

**Author:** ![amplipi](https://yyz2.discourse-cdn.com/free1/user_avatar/amplipi.discourse.group/amplipi/32/8_2.png) [@amplipi](https://amplipi.discourse.group/u/amplipi)\
**Post date:** [March 5, 2025, 5:31pm UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360/5 "2025-03-05T17:31:41Z")

</div>



---

<div class="post-metadata">

**Author:** ![amplipi](https://yyz2.discourse-cdn.com/free1/user_avatar/amplipi.discourse.group/amplipi/32/8_2.png) [@amplipi](https://amplipi.discourse.group/u/amplipi)\
**Post date:** [March 5, 2025, 5:58pm UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360/6 "2025-03-05T17:58:33Z")

</div>

I’ve made a [PR](https://github.com/micro-nova/hacs_amplipi/pull/23) to fix this, expect it to be fixed in the next few hours

---

<div class="post-metadata">

**Author:** ![bshootz](https://avatars.discourse-cdn.com/v4/letter/b/e480ec/32.png) [@bshootz](https://amplipi.discourse.group/u/bshootz)\
**Post date:** [March 5, 2025, 6:18pm UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360/7 "2025-03-05T18:18:19Z")

</div>

A “nice to have” feature would be to leverage the system in Home Assistant to notify about new firmware releases.

I’m not entirely sure how it works, or if a HACS item can use it, but when one of my Zwave switches or Shellys has a firmware update it appears in the Updates section under Settings in Home Assistant and is very useful for seeing new releases.

---

<div class="post-metadata">

**Author:** ![sumnerboy](https://yyz2.discourse-cdn.com/free1/user_avatar/amplipi.discourse.group/sumnerboy/32/20_2.png) [@sumnerboy](https://amplipi.discourse.group/u/sumnerboy)\
**Post date:** [March 6, 2025, 9:50am UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360/8 "2025-03-06T09:50:23Z")

</div>

I have just started playing with Music Assistant, now that they have added Spotify Connect support, and I am quite impressed.

A native player provider for AmpliPi zones in Music Assistant might be something worth looking into? Currently you can link them in via the Home Assistant media player entities but that seems like an extra step - i.e. MA should be able to talk directly to AmpliPi?

I can’t quite get my head around how it should work in MA however. Ideally I would like to be able to just select a track to play and select which AmpliPi zones to play that track on. However how does this get played on the AmpliPi…does it use a source per zone I select, or does it know to group the selected zones onto a single source, and play the track on that?

I guess that might be something that can be worked out if there is a native MA player provider, but I have no idea how that would work.

I think it shows a lot of potential tho!

---

<div class="post-metadata">

**Author:** ![jamesb](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@jamesb](https://amplipi.discourse.group/u/jamesb)\
**Post date:** [March 10, 2025, 6:36pm UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360/9 "2025-03-10T18:36:34Z")

</div>

The thing I would like to see is a simplified to the Media Devices. I currently have 15 media devices associated with Amplipi. Whenever I am creating an automation it is always difficult to figure out what device to intereact with to do what. The only functionality that I have been able to get to work consistently is playing from a media file on the announcement channel. Everything else has been unpredictable in what it does. (There are sources, zones, groups, it is never clear how do you make sure where to set the source, where to turn on/off power, where to mute/unmute)

My preference would be to have 4 media players and the announcements channel as the only devices and have the output zones/groups as configurations for the players, and the preset sources as part of the controls. I think that model would be clearer for the Home assistant interactions and it would make automations easier.

---

<div class="post-metadata">

**Author:** ![amplipi](https://yyz2.discourse-cdn.com/free1/user_avatar/amplipi.discourse.group/amplipi/32/8_2.png) [@amplipi](https://amplipi.discourse.group/u/amplipi)\
**Post date:** [March 10, 2025, 7:18pm UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360/10 "2025-03-10T19:18:09Z")

</div>

Hey James, welcome to our discourse!

I agree, as someone who is experienced with AmpliPi but not experienced with Home Assistant it was difficult to get into making those automations myself; I initially thought they might just outright not be possible with the current HA plugin, though now that I’ve poked around I understand how to run these automations better.

The way to think about things is “I want to use this source to play this stream to this/these zone/zones or group/groups”, so for your automations you want to start by using a source and deciding the stream and use the `media_player.select_source` automation type, and select the source as an entity and type the name of the stream you want to play into the textbox like so:

 ![image](https://global.discourse-cdn.com/free1/uploads/amplipi/original/1X/fc9ad067ea35e4e167a7575ceae645a8f80070bd.png)  
Then you also want another portion of the automation to select all the zone or group entities you want and type in the name of the source you want to connect them to like this:  
 ![image](https://global.discourse-cdn.com/free1/uploads/amplipi/original/1X/a1127df1e9ce36b410f304cc455cfd27485685cb.png)

For your ask to make there be only 4 media players to represent the sources and have the stream and zones/groups be attributes to those players: You can achieve something similar within the GUI (but not automations) with our [custom media cards plugin](https://github.com/micro-nova/AmpliPi-HomeAssistant-Card) that sits on top of both [hacs\_amplipi](https://github.com/micro-nova/hacs_amplipi) and [mini-media-player](https://github.com/kalkih/mini-media-player):

 ![image](https://global.discourse-cdn.com/free1/uploads/amplipi/original/1X/c666db83c711c4a2a007eebce89710b56284b877.png)

---

<div class="post-metadata">

**Author:** ![jamesb](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@jamesb](https://amplipi.discourse.group/u/jamesb)\
**Post date:** [March 10, 2025, 11:27pm UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360/11 "2025-03-10T23:27:54Z")

</div>

I’ll try setting it up as you suggested. However, I am not sure what kind of media entities “Amplipi: Output 1” (Mine source 1 is shown as Player 1 I assume that is the same) and “Amplipi: All”, I assumethis is a group?

I was trying to set it up to play the CBC Radio 1 stream (which is one of my preset streams) and I wanted to use the gradual volume to have it start up in the morning.

With the way I set it up it sometimes worked, but on other occasions started with a different source, or needed to press play or needed to unmute and in one case it started with a very high initial volume. It seems it was very dependent upon how it was left (although some of it might have been tweaks I tried to make to get it to work). Hopefully if I follow your approach it will work more consistenty.

Also thinks for the custom media card, I somehow missed that. I’m still finding it a little challenging to use the way I would want, but I probably just need to experiment with it more.

---

<div class="post-metadata">

**Author:** ![amplipi](https://yyz2.discourse-cdn.com/free1/user_avatar/amplipi.discourse.group/amplipi/32/8_2.png) [@amplipi](https://amplipi.discourse.group/u/amplipi)\
**Post date:** [March 11, 2025, 4:11pm UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360/12 "2025-03-11T16:11:22Z")

</div>

I appreciate this feedback, I’m looking into making a custom automation type to do what you talked about in your previous request all at once and will add the volume as an optional field.

As it stands, the mute and volume state is persisted from when you last used the zone. You can get around this by using the `media_player.set_volume` automation type like so:

 ![image](https://global.discourse-cdn.com/free1/uploads/amplipi/original/1X/ddacf2f4ffb7ecfe1b5900bc85654120f348a289.png)

You can do this to a source or zones/groups, just note that doing it to a source will require that source to have zones/groups connected to it to have any effect. The same goes for the `media_player.mute` automation type, which is straightforward enough to not need a screenshot as you just say “I want this to be (muted/unmuted) when the automation goes off” using a switch. Unfortunately, you do currently need to use this automation to unmute zones and simply using the volume change won’t unmute like they do elsewhere.

If you’d prefer a slow wake up / ramp up, you can do something like this which will increase the volume by 1% every half second until volume reaches 65%:

 ![image](https://global.discourse-cdn.com/free1/uploads/amplipi/original/1X/938763c9190344ae9a2ff3ddd80852f3e512e611.png)  
 ![image](https://global.discourse-cdn.com/free1/uploads/amplipi/original/1X/ceed1748e7a02160baf9e425b9070932061cd567.png)

---

<div class="post-metadata">

**Author:** ![Crushing1523](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@Crushing1523](https://amplipi.discourse.group/u/Crushing1523)\
**Post date:** [March 16, 2025, 1:55am UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360/13 "2025-03-16T01:55:23Z")

</div>

I’m excited that you will soon be focusing on the HA integration!

I think it would be great if there was a fully baked way for Home Assistant to call the announce API, using the UI. This would make integrating the announce API into automations far easier I made a script to do this:

```auto
  amplipi_announce_zone:
    url: "http://192.168.2.20/api/announce"
    method: post
    payload: '{ "media":"/home/pi/Music/{{ type }}.mp3" , "vol_f" : {{ volume }} , "zones" : [{{ zones }}] }'
    headers:
      content-type: 'application/json'

```

Then I have automations like this:

```auto
action: rest_command.amplipi_announce_zone
data:
  type: bird
  volume: 0.2
  zones: 2
alias: Play sound to Office

```

But it would be nice if there was a way to select the actual zones (by name) and some form of media to play. I store my media on the amplipi for this, but woudl gladly change to storing locally within HA if that was the direction.

I also wish the media loaded as `entity_picture` was a higher quality. It seems to load up a tiny thumbnail. When I try to grab that and put it on my wall tablet, it looks very low quality. I’m generally playing via DLNA when I attempt this, but I think the same is true using Spotify, if I recall correctly.

---

<div class="post-metadata">

**Author:** ![amplipi](https://yyz2.discourse-cdn.com/free1/user_avatar/amplipi.discourse.group/amplipi/32/8_2.png) [@amplipi](https://amplipi.discourse.group/u/amplipi)\
**Post date:** [March 17, 2025, 2:10pm UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360/14 "2025-03-17T14:10:22Z")

</div>

We’ve had a few announce notifications in the office, one for when the front door opens as an arrival notification and another for a sensor in our mailbox to announce when we receive mail. Here’s the yaml for the mail sensor’s output:

```auto
target:
  entity_id: media_player.amplipi_amplipi_announcement
data:
  media_content_id: media-source://media_source/local/youve got mail!.wav
  media_content_type: audio/x-wav
metadata:
  title: youve got mail!.wav
  thumbnail: null
  media_class: music
  children_media_class: null
  navigateIds:
    - {}
    - media_content_type: app
      media_content_id: media-source://media_source
action: media_player.play_media

```

You can do this in the UI using a `media_player.play_media` type automation, using media that is hosted on the home assistant in the “my media” folder and choosing what zones to play using the source-zone connection automation I shared earlier in the thread since the announcement output is recognized as a source for home assistant purposes:

 ![image](https://global.discourse-cdn.com/free1/uploads/amplipi/original/1X/43f3852945f609bcf2b6137f9ee86b82d50222bb.png)

For image quality, I’ll take note of that and look into it

---

<div class="post-metadata">

**Author:** ![rverstappen](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@rverstappen](https://amplipi.discourse.group/u/rverstappen)\
**Post date:** [March 21, 2025, 4:07pm UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360/15 "2025-03-21T16:07:49Z")

</div>

Hi. I’ve been using the latest HA integration and it’s more workable than the previous version but I’m still missing the full on/off toggle (only off works now) and then the state is never actually Off but only Idle. Very old versions of this integration implemented all of these standard media\_player controls and states. So this new version still breaks my user interface and media\_player conventions. I am happy to explain further including why I think this is important if this is not clear enough. Cheers!

---

<div class="post-metadata">

**Author:** ![amplipi](https://yyz2.discourse-cdn.com/free1/user_avatar/amplipi.discourse.group/amplipi/32/8_2.png) [@amplipi](https://amplipi.discourse.group/u/amplipi)\
**Post date:** [March 21, 2025, 5:37pm UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360/16 "2025-03-21T17:37:18Z")

</div>

Hey Ron!

Could you explain the use case for the off state? In our experience it caused us two issues:

1. It was an inaccurate reflection of the true state of the related entities as nothing is ever meaningfully powered off within AmpliPi as long as the unit itself has power
2. It caused the UI controls for the entities to be inaccessible as the only way to recognize something was “off” was when it had nothing selected, but home assistant seems to hide the source selection dropdown when things are off so there was also no real way to turn them back on

What value does the off state hold, for you and/or in general? If we were to reimplement it, what would you expect its behavior to be?

---

<div class="post-metadata">

**Author:** ![rverstappen](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@rverstappen](https://amplipi.discourse.group/u/rverstappen)\
**Post date:** [March 21, 2025, 10:31pm UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360/17 "2025-03-21T22:31:07Z")

</div>

Happy to explain.

I’ll start with the state issues. In order to keep my UI as compact as possible, I only want to display those media\_players that are playing something. In every case except Amplipi, that state is Off.

Idle is used by some players when they are on but not playing anything. However, I don’t see that as appropriate for speakers as they are basically dumb devices. Also, other media players such as TVs and AVRs aren’t necessarily off but in standby mode, yet they report an Off state, not Idle.

If a media player can’t provide an off/on state (and related actions) then it probably also has limited value when trying to be used in derivative entities like the Universal Remote Card or a even simple media player group.

Indeed, I have (or had, since it’s broken now!) a group of media players that is either On or Off based on whether all of the players are off, but this is broken because of the Idle state of the Amplipi speakers.

Keep in mind that the old version of this integration did all this as one would expect (or at least as I would expect!). The on/off states were there and turn\_on would actually work.

The problem now with actions is that I need to explicitly select a source to turn a speaker on. So I somehow have to remember source state for Amplipi which I didn’t previously. To do this, I would have to use at least one helper entity for each speaker along with an automation. But things like TVs and AVRs remember their state and don’t need source selection to be turned on so IMO this should be emulated by this integration.

Cheers,  
Ron

---

<div class="post-metadata">

**Author:** ![rverstappen](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@rverstappen](https://amplipi.discourse.group/u/rverstappen)\
**Post date:** [March 21, 2025, 11:18pm UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360/18 "2025-03-21T23:18:50Z")

</div>

I’m going give another answer in a different way…

I think the premise of the current way of thinking about Amplipi is speakers simply flawed: just because something always has power doesn’t mean it can’t be considered to be on or off. There are zillions of counterexamples, whether they are media players or other. I’ll stick with media players:

- Google Chromecast devices (speakers included) are also always powered on but can be turned “on” and “off”. Idle is only used when they are spooling
- I mentioned TVs and AVRs which we always keep on standby mode but are considered on or off in HA.

Pretty much every device in HA can be considered on/off:

- Philips Hue lights are always powered on but can be switched on and off in HA.
- A pool pump always has power but can be switched on and off on HA.
- Even a HA script van be on/off.

I guess the Amplipi line of thinking about source selection turning a speaker “on” maybe goes back to the oldschool whole house audio analog wall controls which would have a set of sources and an off button. But that is so archaic it seems to me.

Besides, you did decide to add the turn\_off action even though it’s not really off, so it really isn’t such a stretch to have an turn\_on action and their corresponding on/off states. Whatever logic was used to be convinced that turn\_off was worthwhile because it’s convenient is what I would ask be considered for all these other reasons. Not least which is that almost every HA device can be turned off and on.

I mean all of this constructively while perhaps challenging the status quo way of thinking.

Cheers,  
Ron

---

<div class="post-metadata">

**Author:** ![amplipi](https://yyz2.discourse-cdn.com/free1/user_avatar/amplipi.discourse.group/amplipi/32/8_2.png) [@amplipi](https://amplipi.discourse.group/u/amplipi)\
**Post date:** [March 27, 2025, 9:25pm UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360/19 "2025-03-27T21:25:21Z")

</div>

Sorry for the lead time on the response to this, and thanks for all the good explanation!

So far this week I’ve been busy stomping out bugs on my dev instance so I could properly fix this and I’ve finally gotten to that point, there’s now a [PR](https://github.com/micro-nova/hacs_amplipi/pull/31) out that solves this problem for you, and could also [use a little bit of input](https://github.com/micro-nova/hacs_amplipi/pull/31#issuecomment-2759495193) in that thread if you have any opinions on the specifics of the solution.

If you want to test that solution, you can do so by getting the [file browser plugin](https://github.com/home-assistant/addons/tree/master/configurator) and updating `/homeassistant/custom_components/amplipi/media_player.py` with a simple copy+paste of the github changes and then restart home assistant to enjoy the beta of the code before it passes PR status and gets into a release. I expect the next update for the `hacs_amplipi` plugin to be in the next week or so after all three outstanding PRs are merged.

---

<div class="post-metadata">

**Author:** ![rverstappen](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@rverstappen](https://amplipi.discourse.group/u/rverstappen)\
**Post date:** [March 29, 2025, 8:06pm UTC](https://amplipi.discourse.group/t/home-assistant-plugin-input-thread/360/20 "2025-03-29T20:06:39Z")

</div>

I tried but it didn’t work out for me. I didn’t use the browser plugin and I just dropped in the new version of the media\_player.py (from the PR you referenced). I get the error message in the image below. Maybe there are other changes I should have incorporated? Here’s the checksum on the file:

[core-ssh amplipi]$ sum media\_player.py

23049 38

> **(attachments)**
>
> ![WhatsApp Image 2025-03-29 at 15.53.13.jpeg](https://global.discourse-cdn.com/free1/uploads/amplipi/original/1X/3dd7c0a1d0591598d4ed0dcfeaa79a50d9e1218b.jpeg)
