Lovelace Cards Conditional Based on Entity's Attribute

Is it still true that you cannot have a conditional card that references a entity’s attribute? Below is what I was attempting to do in the UI on a card.

I cannot find much of anything within the past year on this subject…

- name: Switches
  type: horizontal-stack
  titLe: Common Actions
  cards:
    - name: show0
      type: conditional
      conditions:
        - condition: not
          entity: cover.bedroom_blind_right
          value_template: "{{ is_state_attr('cover.bedroom_blind_right', 'current_position', 0) }}"                    

I’m not aware of such a possibility. But you can use Filter Card.

You may want to take a look at the template state-switch by Thomasloven available in HACS Frontend to conditionally show card(s) using attribute states.

Thanks. When I add anything, to get to the attribute it fails?

type: entity-filter
entities:
  - cover.bedroom_blind_right.current_position
state_filter:
    - 0
card:
  type: entities

Thanks. This would make the whole card conditional right?

Yes, use your value_template to define a state and each state displays a different card.
Using the template directly in the entity parameter, for example:

type: custom:state-switch
entity: "{% if is_state_attr('cover.bedroom_blind_right', 'current_position', 0) %} open {% else %} close {% endif %}"
states:
  open:
    type: horizontal-stack
    title: Common Actions
    cards:
        ....
  close:
    type: ....

Hope that helps.

Your entity is cover.bedroom_blind_right .

Have a look at the documentation, you can filter by attribute this way:



type: entity-filter
entities:
  - cover.bedroom_blind_right
state_filter:
  - operator: '=='
    value: 0
    attribute: current_position

If you do not explicitly need a position value of 0, you can use the Conditional Card with state closed.