thomasloven / lovelace-state-switch

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

iOS devices are not displaying the state-switch selected card #56

Closed Mariusthvdb closed 2 years ago

Mariusthvdb commented 3 years ago

somehow the iOS devices are not displaying the state-switch selected card, while using these cards directly, they show as expected:

  - type: custom:state-switch
    entity: deviceID
    #default: all # tested this, but doesnt work
    states:
      'eaSafari0a':
        <<: &desktop-view
          type: custom:stack-in-card
          mode: horizontal
          cards:
            - type: custom:shutter-card
              entities:
                - entity: cover.screen_keuken
                - entity: etc etc
      '3bChrome7':
        <<: *desktop-view
      all: # also tried 'default', for any of the non matching deviceID's
        type: custom:shutter-card
        entities:
          - entity: cover.screen_keuken
            name: Keuken
          - entity: etc etc

even when using the exact deviceID of the iOS device, this wont show the card on that device

please see https://community.home-assistant.io/t/state-switch-conditional-card-on-steroids/154706/92 on some background

all in all, this post is a

ildar170975 commented 3 years ago

The problem occurs on PC too (Win10x64, Chrome). Another example:

type: vertical-stack
cards:
  - type: entities
    entities:
      - input_boolean.test_boolean
  - type: custom:state-switch
    entity: input_boolean.test_boolean
    default: 'off'
    transition_time: 500
    states:
      below_horizon:
        type: custom:shutter-card
        title: w/o vertical stack
        entities:
          - entity: cover.left_living_shutter
            name: Left
            buttons_position: left
            title_position: top
          - entity: cover.bedroom_shutter
            name: Right
            buttons_position: left
            title_position: top
      'on':
        type: vertical-stack
        cards:
          - type: custom:shutter-card
            title: with vertical stack
            entities:
              - entity: cover.left_living_shutter
                name: Left
                buttons_position: left
                title_position: top
              - entity: cover.bedroom_shutter
                name: Right
                buttons_position: left
                title_position: top

The card is displayed if placed inside "vertical-stack": image

Otherwise the card is not displayed: image

thomasloven commented 2 years ago

Please try release 1.9.0