4 helpers, only 1 is allowed to be ON?

I’m trying to make a dashboard to control media by simply clicking a card.
The reason for doing this is for the other, not so tech-savvy half who just wants to listen to music.

Because using an older good/working AMP, different inputs (cd player, tv, phono) I’m using smart plugs, IR/RF bridge to make the right combo.

The solution I came up with is to use helpers which are the starting point and placed on the dashboard.
Those trigger different automations which select either a radiostream or another source on the AMP.
This kinda works but if you switch from 1 radio station to another for instance, the previous one still shows as selected.

How can I make it such that only 1 can be active and the underlying steps are also always correct?
Maybe my approach is ‘wrong’ but I couldn’t come up with something else… :blush:

Couple ideas…

Have you looked at a universal media player Universal media player - Home Assistant

Basically let’s you collect a set of scripts and settings together as a virtual media player. It abstracts the complexity of the setup so your user just has a media player. (sound familiar)

If that doesn’t do it. when you need a choice of set options sometimes an input select or select control can help

In your shoes I would (and have) do a universal.

2 Likes

Hi Nathan, thanks for that suggestion! :bowing_man:
I wasn’t aware of the existence of that integration.

I forgot to mention 1 important detail (in fact 2):

  • there is an eyesight issue so big buttons are a must
  • if this works as expected, it’s easy to add voice control capabilities so that’s another reason for the way I started implementing this
1 Like

If voice is required this is the way you should do it because operating a media player with voice is already a solved problem operating your scripts are not and you can represent a media player with any number of cards builtin or otherwise.

Build the player function first. Then select the custom. Media player card you can customize to fit your visual needs.

Another thing I forgot to mention :blush:: there are combo’s to be made where no media player entity is exposed.
it’s a Bose CD player for which the AMP has to be set to the right input. (IR bridge)
Also, to be able to power it on/off I added a smart plug which needs to be controlled as well.

That’s why I went for automations based on helpers and for the voice part, I thought of using custom sentences.

I’m trying to understand the docs for the UMP; are you still saying to go that route?

Yep for every script you write I’d be willing to bet you’re replicating a function of a media player. Your script goes there.

Turn on. Off volume switch source… All of those are functions of a universal but it gets glued together in the way the rest of HA understands media then when you later do voice you’re not trying to figure out how to access function x.

You use the builtin stuff to automate a media player. The universal translates it

1 Like

If you have buttons that need to be on, they should be switches. I would create an input_select entity to represent which one is on. Then create template switches that derive their ‘on’ state from the fact that the select is set to their corresponding option. And turning on a switch should change the select to the right option.

… or you just use the select, not the buttons… :slight_smile:

2 Likes