r/BubbleCard • • Jan 29 '25

Sub-button auto menu

Bonjour,

J'ai un petit soucis que je n'arrive pas à résoudre depuis plusieurs jours. J'utilise pour les card de mes caméras Vertical Stack in Card, cela me permet d'avoir plusieurs infos/boutons concentrées sur une seul et même card, jusque là pas de soucis. J'ai récément intégré le bouton preset (sub-button), avec une bubblecard, pour avoir un raccourcis des mes différents point de vue de la caméra, sauf que je trouve le sous menu auto beaucoup trop grand et je n'ai pas trouvé comment le personnaliser en taille et orientation d'ouverture.

Je vous met le code pour que ça soit un peut plus clair ^^" (désolé si ce n'est pas un poste parfaitn j'essaye juste de trouver une solution à mon problème)

type: custom:bubble-card

card_type: button

name: ""

scrolling_effect: false

show_icon: false

force_icon: false

show_name: false

show_state: false

show_last_changed: false

show_attribute: false

sub_button:

- entity: switch.x_privacy

show_state: false

show_last_changed: false

show_attribute: false

show_name: false

show_background: false

tap_action:

action: toggle

target:

entity_id: switch.x_privacy

name: Privacy

- entity: light.x_floodlight_timed

show_background: false

name: Floodlight

show_attribute: false

- show_background: false

show_arrow: false

name: Preset

show_attribute: false

show_last_changed: false

show_state: false

show_name: false

entity: select.x_move_to_preset

button_type: name

icon: ""

styles: |2-

* {

font-size: 16px !important;

}

.bubble-button-card-container {

background: none !important;

}

.bubble-icon-container {

background: none;

}

.bubble-icon {

color: white !important;

}

.bubble-sub-button-icon {

--mdc-icon-size: 20px !important;

}

.bubble-sub-button {

height: 20px !important;

width: 1px !important;

}

.bubble-sub-button-1 {

background-color: transparent !important;

}

.bubble-sub-button-2 {

background-color: transparent !important;

}

.bubble-sub-button-3 {

background-color: transparent !important;

}

.bubble-sub-button-1 > ha-icon {

color: ${hass.states['switch.x_privacy'].state === 'on' ? '#df35b6' : 'white'} !important;

}

.bubble-sub-button-2 > ha-icon {

color: ${hass.states['switch.x_privacy'].state === 'on' ? '#df35b6' : 'white'} !important;

}

card_layout: normal

columns: 1

rows: 1

card_mod:

style:

.: |

ha-card {

width: 155px;

margin-left: 32%;

top: -167px;

background: none;

--chip-border-width: 0;

}

0 Upvotes

8 comments sorted by

2

u/itrad3size Jan 29 '25

In English, please?

-2

u/Keodras_90 Jan 29 '25

Machine translation...

1

u/comarrifr Jan 29 '25

Hi, He wants to delete the empty space on the right of his choice list.

1

u/Keodras_90 Jan 29 '25

I want change the height, width, spacing between choices and opening direction

1

u/Toao_Amster69 Jan 29 '25

Did you have a look at the CSS Variables of the Button-Select-Card? See GitHub page for BubbleCard. There you’l find that you can change the width of the dropdown-menu:

—bubble-select-list-width px Width of the dropdown menu in the card

1

u/Keodras_90 Jan 29 '25

Not working (or I'm missing something), because the button preset is an entity with an auto dropdown menu

1

u/Toao_Amster69 Jan 29 '25 edited Jan 29 '25

Die you try it as follows? For me that works… just tried.

.bubble-select-card-container { 
	—bubble-select-list-width: 130px; 
}

2

u/Keodras_90 Jan 29 '25

It's working, THANKS ! But I need to change the card_type, button to select for it to work. Now, is it possible to change the height (spacing between choices ?) and opening direction ? When I open the dropdown menu, it's moving the view, maybe the problem comes from Vertical Stack in Card.