thomasloven / lovelace-state-switch

🔹Dynamically replace lovelace cards depending on occasion
MIT License
382 stars 27 forks source link

state-switch + layout-card: blank spaces are displayed #63

Open ildar170975 opened 2 years ago

ildar170975 commented 2 years ago

There is a view:

title: state-switch-3
path: test-state-switch-3
type: custom:horizontal-layout
cards:

  - type: custom:state-switch
    entity: input_boolean.test_boolean
    default: "off"
    transition: none
    states:
      "on":
        type: entities
        title: "1"
        entities: &ref_entities
          - sun.sun

  - type: custom:state-switch
    entity: input_boolean.test_boolean_2
    default: "off"
    transition: none
    states:
      "on":
        type: entities
        title: "2"
        entities: *ref_entities

  - type: custom:state-switch
    entity: input_boolean.test_boolean_3
    default: "off"
    transition: none
    states:
      "on":
        type: entities
        title: "3"
        entities: *ref_entities

  - type: entities
    entities:
      - entity: input_boolean.test_boolean
        name: "1"
      - entity: input_boolean.test_boolean_2
        name: "2"
      - entity: input_boolean.test_boolean_3
        name: "3"

Using toggles you can decide whether some Entity card is displayed or not: image

If some toggle is OFF then the corresponding card is not displayed - but also a blank space is displayed. I expect that a next card should occupy this place. image

ildar170975 commented 2 years ago

Another example: https://community.home-assistant.io/t/state-switch-conditional-card-on-steroids/154706/102?u=ildar_gabdullin

sgofferj commented 2 years ago

I think, that's a lovelace issue. I reported the same with the conditional card: https://github.com/home-assistant/frontend/issues/6632

Spirituss commented 2 years ago

The same is here. Nothing is shown on the lovelace in case of custom:state-switch inside custom:layout-card.

Spirituss commented 2 years ago

Tested with re-installation of previous version - it works again with 8. Versions 1.9.0 and 1.9.1 - don't work.

ASNNetworks commented 2 years ago

Correct, al my popups with state-switch inside layout-card show empty.

umrath commented 2 years ago

Seems that I have a similar issue.

It works for me "locally" on iOS and in the browser. If I cast the view to my Google device, state-switch cards are not displayed. All other cards work just fine.

ildar170975 commented 2 years ago

HA 2022.3 state-switch 1.9.3

The issue still present - blank spaces: изображение

Have to raise the issue (cannot reopen).

ildar170975 commented 2 years ago

Could it be related? https://github.com/home-assistant/frontend/issues/6632