Stack in Card

Hi all,

I’m trying to create a stack-in-card with information from my phone.
In some way i can’t get it to work because it’s telling me that it’s missing some card configuration.

Is there something i’m missing?

In the end i should look something like:
image

type: custom:stack-in-card
mode: vertical
cards:
  - type: custom:mushroom-person-card
    entity: person.maurice
    use_entity_picture: true
    hide_name: true
    layout: horizontal
  - type: conditional
    conditions:
      - entity: sensor.iphone_van_maurice_battery_state
        state: Charging
        card:
          type: custom:mushroom-entity-card
          entity: sensor.iphone_van_maurice_battery_level
          layout: horizontal
          name: Maurice
          icon_color: amber
          icon: mdi:battery-charging-medium
  - type: conditional
    conditions:
      - entity: sensor.iphone_van_maurice_battery_state
        state: Not Charging
        card:
          type: custom:mushroom-entity-card
          entity: sensor.iphone_van_maurice_battery_level
          name: Maurice
          layout: horizontal
          icon_color: green
          icon: mdi:battery-arrow-down
  - type: conditional
    conditions:
      - entity: sensor.iphone_van_maurice_battery_state
        state: Full
        card:
          type: custom:mushroom-entity-card
          entity: sensor.iphone_van_maurice_battery_level
          name: Maurice
          layout: horizontal
          icon_color: white
          icon: mdi:battery-high

1 Like

Solved it:

type: custom:stack-in-card
mode: vertical
cards:
  - type: custom:mushroom-person-card
    entity: person.maurice
    use_entity_picture: true
    hide_name: true
    layout: horizontal
  - type: conditional
    conditions:
      - entity: sensor.iphone_van_maurice_battery_state
        state: Charging
    card:
      type: custom:mushroom-entity-card
      entity: sensor.iphone_van_maurice_battery_level
      layout: horizontal
      name: Maurice
      icon_color: amber
      icon: mdi:battery-charging-medium
  - type: conditional
    conditions:
      - entity: sensor.iphone_van_maurice_battery_state
        state: Not Charging
    card:
      type: custom:mushroom-entity-card
      entity: sensor.iphone_van_maurice_battery_level
      name: Maurice
      layout: horizontal
      icon_color: green
      icon: mdi:battery-arrow-down
  - type: conditional
    conditions:
      - entity: sensor.iphone_van_maurice_battery_state
        state: Full
    card:
      type: custom:mushroom-entity-card
      entity: sensor.iphone_van_maurice_battery_level
      name: Maurice
      layout: horizontal
      icon_color: white
      icon: mdi:battery-high