I have a multi-zone audio setup using monoprice amp. What I would like to do is group multiple zones into 1 volume slider. My current universal media player controls the power state of both devices, but the volume slider only controls the first child
May I suggest not using that paste service?
In 2 days’ time it will no longer be available and your post will become somewhat useless to other readers who may be in a similar situation.
Back to your question, I’ve not used the Universal Media Player before so not 100% sure why not all media_player entities would respond to the volume command.
That said, you could create a slider input_number for your volume and use an automation to assign the slider value to your various media players. This would also allow for different types of media players (those with different volume ranges than [say] 0 to 1, you’ve not confirmed that all your media player entities have a volume range of 0…1)
if you want the slider to control both, you need to add the interfaces to handle that: volume_set and volume_level. Now if you leave the volume_level attribute blank, it’s state will be based on the first media player. Otherwise you can override it if that’s not what you want.
Also, as a side note, your spacing is all out of whack in places. It won’t cause problems but you should be consistent.
Can you post the full yaml for this? and where do you put it?
-Edit- Nevermind I, figured it out. Thanks so much for this code sample. I was trying to do it with platform:group like I did for my light bulbs but that wasnt working.