<Solved> Conditional Card Display Not changing with Status of Entity

First, I’m a newbie to Home Assistant. If I’m doing something “obviously wrong”, please be kind. I am a software engineer in my work position, but Home assistant is a “different way of thinking”.

Current Home Assistant version 2021.10 on Debian

I’m trying to display different UI cards based on the status and what is selected on my audio receiver (I really want to display different cards that contain “remote functions” based on the source selected on my audio receiver. If I have “Sat” selected, I display a simulated remote for my DirecTv. If I have “Shield” selected, I display a simulated remote for my Shield, etc).

I have found the “Conditional Card” but it doesn’t seem to “update” when the condition changes. I created a “simple” card as follows that should only display when my audio receiver is “on”

Blockquote

type: vertical-stack
cards:
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: poweron
            device: 5c0304471342de30bdfe9a66bc096f46
          target:
            entity_id: remote.lvr2
        name: Power On
        show_state: true
        entity: remote.lvr2
        show_icon: true
      - type: button
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: poweroff
            device: 5c0304471342de30bdfe9a66bc096f46
          target:
            entity_id: remote.lvr2
        entity: remote.lvr2
        name: Power Off
        show_state: true
  - type: conditional
    conditions:
      - entity: media_player.marantz_sr5015
        state: 'on'
    card:
      type: entity
      entity: input_select.marantz_inputs

:

What I expect to see:
When the Audio Receiver is “off”:
Row 1: 2 buttons: one for “Power On” and “Power Off” (even though the “logic” isn’t correct {i.e. Why show the power off when the unit is already off})
When the Audio Receiver is “on”:
Row 1: 2 power buttons
Row 2: Entity Selection box (where I will do additional logic to display each remote when that source is enabled).

In the “Show Code Editor”, the graphical output shows properly/as expected. But in the actual/real UI, the entity selection box always displays independant of whether the receiver is on or off.

I suspect that I’m missing something (probably a “trigger” of some sort{if that is even the correct word}), but being new to I feel that I’m chasing my tail.

Any assistance would greatly be appreciated!

Thank you in advance.

I just put exactly this code in my ui-lovelace.yaml and it works as you expect:

              type: vertical-stack
              cards:
                - type: conditional
                  conditions:
                    - entity: switch.fr_table_lamp
                      state: 'on'
                  card:
                    type: entity
                    entity: switch.fr_table_lamp

You don’t need any sort of trigger for the conditional card to recognize the state change. Check in Dev Tools->States to make sure that the state of media_player.marantz_sr5015 is what you think it is.

Hello Rob,

Thank you very much for your quick reply.

I just noticed that there was an update available (I was using “2021.10.0” and just upgraded to “2021.10.2”). In this new version. the UI appears to be acting correctly (i.e. I am seeing now what I expected).

Hope you have a great day!