Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separator line distance from sub buttons vary, depending on the number of sub buttons. #1226

Open
sypie opened this issue Feb 11, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@sypie
Copy link

sypie commented Feb 11, 2025

Describe the bug
When only one sub button is present in a separator type the distance of the separator is smaller then when multiple sub buttons are present.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Bubble card, type Separator
  2. Add multiple sub buttons
  3. See the difference in distance between the sub button and the separator line

Expected behavior
I expect the disdance between the sub button(s) and the separator line will be the same, no matter how much sub buttons are set up.

Screenshots
To compare 1 and 3 sub buttons: https://imgur.com/a/Ez2kc0o

YAML
Yaml of the one with 3 sub buttons:

type: custom:bubble-card
card_type: separator
name: Media
icon: mdi:multimedia
sub_button:
  - icon: mdi:radio
    state_background: true
    show_background: true
    tap_action:
      action: navigate
      navigation_path: "#radio"
    double_tap_action:
      action: none
    hold_action:
      action: none
  - icon: mdi:bookshelf
    tap_action:
      action: navigate
      navigation_path: /d5369777_music_assistant/ingress
    double_tap_action:
      action: none
    hold_action:
      action: none
  - icon: mdi:pause-circle-outline
    entity: media_player.wiim_amp
    show_attribute: false
    hold_action:
      action: more-info
    tap_action:
      action: call-service
      service: media_player.media_play_pause
      target:
        entity_id: media_player.wiim_amp
styles: |-
  ha-card {
    --bubble-line-background-color: var(--accent-color); !important;
    --bubble-sub-button-background-color: var(--accent-color); !important;}
  }

The one with just one sub button:

type: custom:bubble-card
card_type: separator
name: AppleTV
icon: mdi:apple
sub_button:
  - entity: remote.woonkamer
    icon: mdi:power
    tap_action:
      action: call-service
      service: remote.send_command
      service_data:
        command: suspend
        entity_id: remote.woonkamer
      target: {}
    visibility:
      - condition: state
        entity: media_player.woonkamer
        state_not: standby
  - entity: remote.woonkamer
    icon: mdi:home
    tap_action:
      action: call-service
      service: remote.send_command
      service_data:
        command: home
        entity_id: remote.woonkamer
      target: {}
    visibility:
      - condition: state
        entity: media_player.woonkamer
        state: standby
styles: |-
  ha-card {
    --bubble-line-background-color: var(--accent-color); !important;
  }

Informations (please complete the following information):

  • macOS 15.3.1.

  • Browser/App: Firefox 135.0

  • Bubble Card version: 2.4.0

  • Home Assistant version:

    • Core 2025.2.2
    • Supervisor 2025.02.0
    • Operating System 14.2
    • Frontend 20250210.0
@sypie sypie added the bug Something isn't working label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant