Yep, shortcuts were initially only used to trigger media playback, hence the label, but as you said, It’s not really fitting anymore.
I’ll add an option for a custom string in the shortcut object, and change the default to something else.
I’ve now changed it to be aligned to the right, similar to the source select.
The problem is that the card has to be very responsive, in order to play nice in different column setups and screen sizes, so while it could potentially work when the card is full or close to full width, it won’t when horizontal space is limited.
We also have to consider all possible card configurations and how they affect the layout.
Yes, this is a great idea, as long as the attribute is coming from the card entity I see no problem implementing this, could also be used to show “active” shortcut button.
Might potentially remove it, added it to follow the core HA dropdown design, but might look better without.
Not sure if you followed what I meant but I’m wrapping the “volume slider card” inside of a conditional card, that way it doesn’t render at all when the entity state is off
.
- type: conditional
conditions:
- entity: media_player.avr_tv
state_not: 'off'
card:
entity: media_player.avr_tv
type: custom:mini-media-player
max_volume: 72
hide:
controls: true
name: true
icon: true
info: true
power: true
source: true
mute: true
But yeah, It’s primarily the card paddings that still occupy space, but even with those removed, the card is still going to be rendered and assigned a card margin by HA. I would recommend using a conditional card to solve this, as in my example above.
Could you please send me a link to the component?
Oh, that’s cool, it’s a small world!
Thank you for the feedback and suggestions, appreciate it!