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

Margin space if show_empty: false after upd. 2024.7 #456

Closed
Klaestrup opened this issue Jul 10, 2024 · 7 comments
Closed

Margin space if show_empty: false after upd. 2024.7 #456

Klaestrup opened this issue Jul 10, 2024 · 7 comments

Comments

@Klaestrup
Copy link

After updating HA to 2024.7 I now have empty space (should be no space at all like before) if there are no entities present (with show_empty: false).
Maybe some CSS styling needed, but I'm not sure.

@ildar170975
Copy link

2024.7.1
Cannot confirm.

  - title: 13x
    path: 13x
    cards:
      - &ref_0
        type: gauge
        entity: input_number.test_level_1
      - type: custom:auto-entities
        card:
          type: entities
        filter:
          include:
            - entity_id: sun.sn
        show_empty: false
      - *ref_0
      - *ref_0
      - *ref_0
      - *ref_0
      - *ref_0

image

image

@Klaestrup
Copy link
Author

Klaestrup commented Jul 10, 2024

Okay, it seems that it only happens when the auto-entities card is within a vertical stack card. On the picture below the lower card is a vertical stack card with 3 auto-entities cards included.
image

@ildar170975
Copy link

ildar170975 commented Jul 10, 2024

within a vertical stack card

A similar case: place 3 stock conditional cards inside a vertical stack - and make these conditions "false".
Then you will still see a stack card with some empty area inside.
Stack does not know that it's inner cards are hidden & shows gaps between them.
Means - not an auto-entities's card issue.

Update: for the record:

cards:
  - &ref_conditional_card
    type: entities
    entities:
      - sun.sun
      - sun.sun
    title: conditional
    visibility:
      - condition: state
        entity: input_boolean.test_boolean
        state: 'on'

  - &ref_normal_card
    type: picture
    image: /local/images/test/orange.jpg
    title: normal

  - type: vertical-stack
    cards:
      - *ref_conditional_card

  - *ref_normal_card

  - type: entities
    entities:
      - input_boolean.test_boolean

gives a margin in 2024.7.x:
изображение

@Klaestrup
Copy link
Author

You're right that it does not seem to be an auto-entities issue - but again, it was not acting like that before the update.
So definitely a HA thing! ;-)

Thanks for your response!

@ildar170975
Copy link

it was not acting like that before the update.

Do not think so.

views:
  - title: Home
    cards:
      - &ref_ae
        type: custom:auto-entities
        card:
          type: entities
        filter:
          include:
            - entity_id: sun.sn
        show_empty: false

      - &ref_button
        show_name: true
        show_icon: true
        type: button
        tap_action:
          action: toggle
        entity: switch.virtual_switch_1

      - type: vertical-stack
        cards:
          - *ref_ae

      - *ref_button

      - type: vertical-stack
        cards:
          - *ref_ae
          - *ref_ae

      - *ref_button

image

image

image

image

@Klaestrup
Copy link
Author

Klaestrup commented Jul 11, 2024

I was updating directly from 2024.6 to 2024.7.2, and on 2024.6 these spaces was not present, for sure. Because it's very easy to see on my dashboard.
However, I solved it with binary template sensor and conditional cards, as you also mentioned. That works perfectly!

@igorsantos07
Copy link

This effect might be related to my findings from a month ago, in a bug from April: it generates an empty HTML component, even when there's nothing to show on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants