Hey guys, as of late I appreciate the updates that have been made for the Home Assistant integration! I more recently have decided to create “Scenes” on Home Assistant to emulate certain situations at home I would prefer:
e.g.
``
- Spotify in the Family Room / Kitchen
- Dining Time
- Default Mode
```
This is essentially the same as Presets that you guys have on amplipi.local – which originally I was forwarding along via Scripts and rest_command syntax but was getting hairy.
I noticed a lot of times, when I have multiple amplipi zones in a “Scene” e.g.( media_player.zone1 - zone4) that the Scene will not set all the parameters by the time it completes. I find that volumes are not set correctly and certain speakers are muted when they shouldn’t be.
Could this be an issue with the integration / AmpliPi and the media_players not being able to accomodate these quick succession of changes? Or more likely a problem with HomeAssistant core?
Thanks!
Hey rwarner!
It looks like this is an issue on our end more than home assistant, or perhaps a blending of how they expect media players to act vs our more unique architecture.
It seems this stems from the fact that everything has volume controls but for the most part they’re derived from the average value of all connected zones/groups. When you make a scene with sources and streams, they want to set their volume to whatever they were at prior, which means if you had three connected zones set to 0 and three set to 100, the source/stream will average out to 50 and then set them all to 50 when it sets its own volume during the scene execution.
I’ll have to see if there’s a more robust way to handle our volumes to account for this, in the meantime here’s a few potential workarounds:
- there might be a workaround relating to what order you select the entities in when editing your scene
- If you use automations to trigger your scenes:
- You could have a second scene per scene that sets the per-zone volume to what you’d expect.
- You can swap to our start streaming blueprint for similar functionality
Thanks for the report!
1 Like
Thanks for looking into this, glad to get clarification because I didn’t know which way to turn. Was almost going to make a Github issue for the hacs_amplipi repo on it.
I did stumble upon your blogpost here: Home Assistant and AmpliPro: Automations – AmpliPro blog which seems to similiar things to what I was doing but can’t see if there’s anything done differently than what I was trying to accomplish.
I will check out that blueprint in there and see if it helps accomplish my goals.
I will post an example scene later to showcase what the UI and entities I selected were like