thomasloven / lovelace-state-switch

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

HA 2022.4 causes 'orphan' border in panel mode, resize takes it away #105

Open Mariusthvdb opened 1 year ago

Mariusthvdb commented 1 year ago

images says it all:

notice the border below the entities card:

Scherm­afbeelding 2023-04-13 om 10 48 20

slightly resizing takes it out:

Scherm­afbeelding 2023-04-13 om 10 48 29

I was halfway filing this in Frontend repo, because a similar thing is currently going on with the left/right chevrons in the menu bar, but tested this config with core conditional cards, and that did no show the border.

card config in Yaml mode:

title: Cameras binnen
path: cameras_binnen
type: panel
icon: cli:home-video
card_mod:
  class: class-header-margin

cards:

  - type: custom:state-switch
    entity: switch.inside_wifi_cameras_privacy_mode
    states:
      'on' :
        <<: &controls
          type: entities
          card_mod:
            class: class-header-margin
          title: Inside camera controls
          show_header_toggle: false
          state_color: true
          entities:
            - switch.inside_wifi_cameras_privacy_mode
            - switch.poe_inside_cameras
      'off':
        type: custom:state-switch
        entity: mediaquery
        states:
          '(min-width: 1000px)':
            type: vertical-stack
            cards:
              - <<: *controls
              - another vertical stack
        all:
        type: vertical-stack
        cards:
          - <<: *controls
         - another vertical stack