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

Multiple Attribute seperator is persistant #1244

Open
oerix opened this issue Feb 16, 2025 · 5 comments
Open

Multiple Attribute seperator is persistant #1244

oerix opened this issue Feb 16, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@oerix
Copy link

oerix commented Feb 16, 2025

Describe the bug
When you select multiple attribute (advanced example) under the new modules section, the separator remains when there is no state (see pic).

To Reproduce
Steps to reproduce the behavior:

  1. Choose Button Card
  2. Under Modules > Advanced card > Enable this card
  3. Select 2 or more entities/attributes.
  4. See error

Expected behavior
The separator should disappear when there is no state attribute.

Screenshots

Image

Informations (please complete the following information):

  • OS: iOS 18.3/macOS 15
  • Browser/App: Firefox/Safari
  • Bubble Card version: v2.5.0-beta.5
  • Home Assistant version: 2025.2.4
@oerix oerix added the bug Something isn't working label Feb 16, 2025
Clooos added a commit that referenced this issue Feb 20, 2025
- [x] Refactored the module editor code for better maintenance.
- [x] Better performance/instant initialization of custom styles/templates/modules
- [x] The attribute selector now detect the entity at the same level automatically.
- [x] Module breaking change: The "Example: Customize the icon container color" module now use a list of predefined colors instead of an RGB color picker. Previous RGB colors are not supported anymore.
- [x] Removing a value inside a module editor, removes it correctly in the configuration. #1244
- [x] The `card` variable was incorrect for custom templates/modules inside a pop-up card, this is now fixed! #1255
- [x] The default module is not disabled anymore when another module is selected. You can still disable it manually.
- [x] Fixed the gap between the horizontal buttons stack and the card juste above it on a section view type.
- [x] Replaced the `style_templates` config key for `modules`, this will be migrated automatically in the editor. I forgot to change that before the first beta…
- [x] Improved the Home Assistant default styling module for consistency with more themes.
- [x] The condition selector is now working correctly in the Modules editor.
- [x] Added the possibility to use the `checkConditionsMet` function for custom templates to be able to use the condition selector.
- [x] Added missing support for attribute conditions in `checkConditionsMet`.
- [x] Fixed an issue where the ui_color selector was writing an empty config by default.
- [x] Reverted to the actions behavior from v2.4.0. #1250
- [x] Added classes `.is-on` and `.is-off` to most cards.
- [x] Fixed some more custom styles compatibility issues, thanks to @brunosabot!

@Clooos
Copy link
Owner

Clooos commented Feb 20, 2025

Hi! I'm still unsure of how you're able to have this issue, but this is maybe fixed in the latest beta 🙂

@oerix
Copy link
Author

oerix commented Feb 20, 2025

Hi! I'm still unsure of how you're able to have this issue, but this is maybe fixed in the latest beta 🙂

Unfortunately, issue still persists in latest beta (v2.5.0-beta.6) :(
It occurs on all card types. Here's the yaml, if it's any help:

card_type: media-player
icon: ""
card_layout: large
entity: media_player.living_room_sky_q
show_state: true
hide:
  play_pause_button: false
  volume_button: true
  next_button: true
  previous_button: true
  power_button: true
show_attribute: true
attribute: media_series_title
sub_button:
  - entity: sensor.living_room_sky_q_schedule
    name: Scheduled
    state_background: true
    show_background: false
show_icon: true
force_icon: false
show_last_changed: false
name: Living TV
cover_background: true
styles: |2-
    .bubble-sub-button-2 {
      display: ${hass.states['sensor.living_room_sky_q_schedule'].state === 'scheduled' ? '' : 'none'} !important;
    }
    .bubble-sub-button-2 > ha-icon {
      color: ${hass.states['sensor.living_room_sky_q_schedule'].state === 'recording' ? 'red' : 'none'} !important;
    }
icon_container_color:
  "0": 240
  "1": 191
  "2": 188
get_state_attribute:
  - entity: media_player.living_room_sky_q
    attribute: media_series_title
  - entity: media_player.living_room_sky_q
    attribute: media_channel
modules:
  - get_state_attribute

@Clooos
Copy link
Owner

Clooos commented Feb 20, 2025

So it happens only when the attribute doesn't provide any infos? But when there are values, it works as expected?

I'm still unsure to understand.

@oerix
Copy link
Author

oerix commented Feb 20, 2025

So it happens only when the attribute doesn't provide any infos? But when there are values, it works as expected?

I'm still unsure to understand.

Yes that's right. Are you not able to reproduce it?

@Clooos
Copy link
Owner

Clooos commented Feb 20, 2025

I think that I don't have any entity that provide empty attributes, but I might be wrong.

But this makes sense now, I will fix that for the next release 👌

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

2 participants