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

Different opacity and brightness for icons of certain entities #1085

Open
Menelao147 opened this issue Dec 24, 2024 · 0 comments
Open

Different opacity and brightness for icons of certain entities #1085

Menelao147 opened this issue Dec 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Menelao147
Copy link

Describe the bug
When using the Bubble Card with certain entities, such as input_boolean or sensor (I haven’t tested others), the icon appears to have different opacity and brightness compared to other entities. I’m not sure if this is intended behavior or a bug, but it leads to inconsistent visuals.

To Reproduce
Steps to reproduce the behavior:

  1. Add the Bubble Card custom card to your dashboard.
  2. Use the following two example configurations:

Configuration 1:

type: custom:bubble-card
card_type: button
button_type: state
entity: input_select.stato_lavatrice
styles: |-
  .bubble-button-background {
    background-color: ${'rgba(40,40,40,1)'} !important;
  }
  .bubble-icon-container {
    background-color: ${'rgba(0,0,0,0)'} !important;
  }
  .bubble-icon {
    color: ${
      state === 'Spenta' ? 'rgb(111, 111, 111)' :
      state === 'Ciclo avviato' ? 'rgb(33, 150, 243)' :
      ''} !important;
    ${icon.setAttribute("icon",
      state === 'Spenta' ? 'mdi:washing-machine-off' :
      state === 'Ciclo avviato' ? 'mdi:washing-machine' :
      '')};
card_layout: large-2-rows
show_state: true

Configuration 2:

type: custom:bubble-card
card_type: button
button_type: state
entity: input_boolean.deumidificatore_abilitazione
styles: |-
  .bubble-button-background {
    background-color: ${'rgba(40,40,40,1)'} !important;
  }
  .bubble-icon-container {
    background-color: ${'rgba(0,0,0,0)'} !important;
  }
  .bubble-icon {
    color: ${
      state === 'off' ? 'rgb(111, 111, 111)' :
      state === 'on' ? 'rgb(33, 150, 243)' :
      ''} !important;
    ${icon.setAttribute("icon",
      state === 'off' ? 'mdi:washing-machine-off' :
      state === 'on' ? 'mdi:washing-machine' :
      '')};
card_layout: large-2-rows
show_state: true

Expected behavior
It is unclear whether this behavior is intentional or a bug. I would expect the icons for all entities to have a consistent visual style unless specifically configured otherwise.

Screenshots
image
image
image

Informations:

  • OS: Windows 11
  • Browser/App: Chrome
  • Bubble Card version: 2.3.4-beta.1
  • Home Assistant version: 2024.12.5
@Menelao147 Menelao147 added the bug Something isn't working label Dec 24, 2024
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