How to make

Hi,
I am trying to create a card that conditionally shows if ‘my_device’ is home. I’ve created the below however I get the error ‘duplicated mapping key (22:1)’.

What is the correct way to have a conditional card?

type: conditional
conditions:
  - entity: device_tracker.my_device
    state: home
card:
  column_width: 30%
  columns: 3
  show_state: false
  title: Warnings!
  type: glance
entities:
  - entity: input_boolean.openevse_disconnected
    show_name: true
    show_icon: true
    type: button
    name: OpenEVSE
state_filter:
  - 'on'
  - 'True'
  - home
  - playing
type: entity-filter
show_empty: false

The error is telling you what you did wrong, you have a duplicate key.

If I remove the ‘type: entity-filter’ I get this error.

Well, you have alot of other issues with spacing on your conditional card. Take a look at the examples in the documentation and pare back until you don’t see errors.

I have this working, however I need to have ‘OR’ logic in the conditions if I have more than one entity. Is there a better way?

type: conditional
conditions:
  - entity: device_tracker.ioniq_5
    state: home
  - entity: input_boolean.openevse_disconnected
    state: 'on'
card:
  show_name: true
  show_icon: true
  show_state: false
  type: glance
  entities:
    - entity: input_boolean.openevse_disconnected
  title: Warnings!
  state_color: true

Conditions for the conditional card can’t be ‘or’. It’s a large design flaw. The only way around it is to make a template binary sensor with that logic and use that for your conditional card.