# Zmiana szerokości kolumn w stosie poziomym

**URL:** <https://forum.arturhome.pl/t/zmiana-szerokosci-kolumn-w-stosie-poziomym/10359>\
**Category:** Home Assistant\
**Tags:** hacs-ui, lovelace\
**Created:** [10 Październik 2023 19:09 UTC](https://forum.arturhome.pl/t/zmiana-szerokosci-kolumn-w-stosie-poziomym/10359 "2023-10-10T19:09:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Autor:** ![Marcin](https://forum.arturhome.pl/user_avatar/forum.arturhome.pl/marcin/32/553_2.png) [@Marcin](https://forum.arturhome.pl/u/Marcin)\
**Data wpisu:** [10 Październik 2023 19:09 UTC](https://forum.arturhome.pl/t/zmiana-szerokosci-kolumn-w-stosie-poziomym/10359/1 "2023-10-10T19:09:46Z")

</div>

Cześć,  
Mam pytanie czy wiecie może jak ustawić szerokość kolumn dla poziomego stosu ?  
Chciałbym uzyskać podział 30% 20% 50%.  
Dzięki za podpowiedź z góry.  
Pozdrawiam  
Marcin

---

<div class="post-metadata">

**Autor:** ![artpc](https://forum.arturhome.pl/user_avatar/forum.arturhome.pl/artpc/32/848_2.png) [@artpc](https://forum.arturhome.pl/u/artpc)\
**Data wpisu:** [11 Październik 2023 07:20 UTC](https://forum.arturhome.pl/t/zmiana-szerokosci-kolumn-w-stosie-poziomym/10359/2 "2023-10-11T07:20:46Z")

</div>

Mówisz o `type: horizontal-stack` ?

---

<div class="post-metadata">

**Autor:** ![Marcin](https://forum.arturhome.pl/user_avatar/forum.arturhome.pl/marcin/32/553_2.png) [@Marcin](https://forum.arturhome.pl/u/Marcin)\
**Data wpisu:** [11 Październik 2023 08:56 UTC](https://forum.arturhome.pl/t/zmiana-szerokosci-kolumn-w-stosie-poziomym/10359/3 "2023-10-11T08:56:03Z")

</div>

> [@artpc](#):
>
> ` horizontal-stack`

Obecnie mam tak jak poniżej i chciałbym tą środkową kolumnę zwęzić

 ![karta](https://forum.arturhome.pl/uploads/default/original/3X/f/3/f396b5c42dfb9841acaa1bb0f5b3d06ad7f17e82.png)

```auto
type: custom:stack-in-card
mode: horizontal
cards:
  - type: custom:mushroom-person-card
    entity: person.marcin
    use_entity_picture: false
    hide_name: false
    layout: default
    tap_action:
      action: more-info
      browser_mod:
        command: popup
        deviceID: this
        title: Jeff
        card:
          type: custom:mod-card
          style: |
            ha-card {
               padding-right: 15px;
               padding-left: 15px;
               padding-bottom: 15px;
               --control-height: 2px;
               --icon-size: 2px
            }
          card:
            type: vertical-stack
            cards:
              - type: custom:mushroom-entity-card
                entity: sensor.phenix_distance
                primary_info: none
                icon: mdi:map-marker
                icon_color: yellow
              - type: horizontal-stack
                cards:
                  - type: map
                    entities:
                      - entity: device_tracker.phenix
                    aspect_ratio: '2'
                    use_entity_picture: true
  - type: custom:mushroom-chips-card
    style: |
      ha-card {
        --chip-height: 66px;
        }
    chips:
      - type: template
        icon: |2-
            {% if states('sensor.kroki_ola') < states('sensor.phenix_steps') %} 
              mdi:trophy
            {% else %}
              mdi:seal
            {% endif %}
        icon_color: yellow
  - type: custom:mushroom-chips-card
    style: |
      ha-card {
        --chip-box-shadow: none;
        --chip-background: none;
        --chip-spacing: none;
        --chip-height: 33px
        }
    chips:
      - type: template
        icon_color: |2-
                    {% set state=states('sensor.phenix_battery_state') %}
                    {% if state=='Charging' %}
                    green
                    {% elif state=='Not Charging' %}
                    #6f6f6f
                   {% endif %}
        entity: sensor.phenix_battery_state
        content: '{{ states(entity) }}'
        icon: mdi:power-plug
        tap_action:
          action: more-info
      - type: template
        entity: sensor.phenix_battery_level
        content: '{{ states(entity) }} %'
        icon: |2
                    {% set bl = states('sensor.phenix_battery_level') | int %}
                    {% if bl < 10 %} mdi:battery-outline
                    {% elif bl < 20 %} mdi:battery-10
                    {% elif bl < 30 %} mdi:battery-20
                    {% elif bl < 40 %} mdi:battery-30
                    {% elif bl < 50 %} mdi:battery-40
                    {% elif bl < 60 %} mdi:battery-50
                    {% elif bl < 70 %} mdi:battery-60
                    {% elif bl < 80 %} mdi:battery-70
                    {% elif bl < 90 %} mdi:battery-80
                    {% elif bl < 100 %} mdi:battery-90
                    {% elif bl == 100 %} mdi:battery
                    {% else %} mdi:battery-unknown
                    {% endif %}
        icon_color: |2-
                    {% set bl = states('sensor.phenix_battery_level') | int %}
                    {% if bl < 10 %} red
                    {% elif bl < 20 %} red
                    {% elif bl < 30 %} red
                    {% elif bl < 40 %} orange
                    {% elif bl < 50 %} orange
                    {% elif bl < 60 %} green
                    {% elif bl < 70 %} green
                    {% elif bl < 80 %} green
                    {% elif bl < 90 %} green
                    {% elif bl < 100 %} green
                    {% elif bl == 100 %} green
                    {% else %} grey
                    {% endif %}
        tap_action:
          action: more-info
      - type: template
        icon_color: yellow
        entity: sensor.phenix_steps
        content: '{{states(entity)}}'
        icon: mdi:walk
      - type: entity
        icon_color: yellow
        entity: sensor.phenix_distance
    alignment: left

```

---

<div class="post-metadata">

**Autor:** ![artpc](https://forum.arturhome.pl/user_avatar/forum.arturhome.pl/artpc/32/848_2.png) [@artpc](https://forum.arturhome.pl/u/artpc)\
**Data wpisu:** [12 Październik 2023 13:10 UTC](https://forum.arturhome.pl/t/zmiana-szerokosci-kolumn-w-stosie-poziomym/10359/4 "2023-10-12T13:10:36Z")

</div>

Spróbuj `custom:layout-card` posiada wiele więcej opcji konfiguracji

[https://github.com/thomasloven/lovelace-layout-card](https://github.com/thomasloven/lovelace-layout-card)

```auto
type: custom:layout-card
mode: horizontal
cards:
  - type: custom:mushroom-chips-card
    style: |
      ha-card {
      ha-card-border -width: Opx
      height: 1px;
        --chip-box-shadow: none;
        --chip-background: none;
        --chip-spacing: none;
        --chip-height: 33px
        }
    chips:
      - type: template
        icon_color: |2-
                    {% set state=states('sensor.phenix_battery_state') %}
                    {% if state=='Charging' %}
                    green
                    {% elif state=='Not Charging' %}
                    #6f6f6f
                   {% endif %}
        entity: sensor.phenix_battery_state
        content: '{{ states(entity) }}'
        icon: mdi:power-plug
        tap_action:
          action: more-info
      - type: template
        entity: sensor.phenix_battery_level
        content: '{{ states(entity) }} %'
        icon: |2
                    {% set bl = states('sensor.phenix_battery_level') | int %}
                    {% if bl < 10 %} mdi:battery-outline
                    {% elif bl < 20 %} mdi:battery-10
                    {% elif bl < 30 %} mdi:battery-20
                    {% elif bl < 40 %} mdi:battery-30
                    {% elif bl < 50 %} mdi:battery-40
                    {% elif bl < 60 %} mdi:battery-50
                    {% elif bl < 70 %} mdi:battery-60
                    {% elif bl < 80 %} mdi:battery-70
                    {% elif bl < 90 %} mdi:battery-80
                    {% elif bl < 100 %} mdi:battery-90
                    {% elif bl == 100 %} mdi:battery
                    {% else %} mdi:battery-unknown
                    {% endif %}
        icon_color: |2-
                    {% set bl = states('sensor.phenix_battery_level') | int %}
                    {% if bl < 10 %} red
                    {% elif bl < 20 %} red
                    {% elif bl < 30 %} red
                    {% elif bl < 40 %} orange
                    {% elif bl < 50 %} orange
                    {% elif bl < 60 %} green
                    {% elif bl < 70 %} green
                    {% elif bl < 80 %} green
                    {% elif bl < 90 %} green
                    {% elif bl < 100 %} green
                    {% elif bl == 100 %} green
                    {% else %} grey
                    {% endif %}
        tap_action:
          action: more-info
      - type: template
        icon_color: yellow
        entity: sensor.phenix_steps
        content: '{{states(entity)}}'
        icon: mdi:walk
      - type: entity
        icon_color: yellow
        entity: sensor.phenix_distance
    alignment: left
  - type: horizontal-stack
    cards:
      - type: custom:mushroom-person-card
        entity: person.artur
        use_entity_picture: false
        hide_name: false
        layout: default
        tap_action:
          action: more-info
          browser_mod:
            command: popup
            deviceID: this
            title: Jeff
            card:
              type: custom:mod-card
              style: |
                ha-card {
                   padding-right: 15px;
                   padding-left: 15px;
                   padding-bottom: 15px;
                   --control-height: 2px;
                   --icon-size: 2px
                }
              card:
                type: vertical-stack
                cards:
                  - type: custom:mushroom-entity-card
                    entity: sensor.phenix_distance
                    primary_info: none
                    icon: mdi:map-marker
                    icon_color: yellow
                  - type: horizontal-stack
                    cards:
                      - type: map
                        entities:
                          - entity: device_tracker.phenix
                        aspect_ratio: '2'
                        use_entity_picture: true
      - type: custom:mushroom-chips-card
        style: |
          ha-card {
            --chip-height: 66px;
            }
        chips:
          - type: template
            icon: |2-
                {% if states('sensor.kroki_ola') < states('sensor.phenix_steps') %} 
                  mdi:trophy
                {% else %}
                  mdi:seal
                {% endif %}
            icon_color: yellow
      - type: custom:mushroom-chips-card
        style: |
          ha-card {
          ha-card-border -width: Opx
          height: 1px;
            --chip-box-shadow: none;
            --chip-background: none;
            --chip-spacing: none;
            --chip-height: 33px
            }
        chips:
          - type: template
            icon_color: |2-
                        {% set state=states('sensor.phenix_battery_state') %}
                        {% if state=='Charging' %}
                        green
                        {% elif state=='Not Charging' %}
                        #6f6f6f
                       {% endif %}
            entity: sensor.phenix_battery_state
            content: '{{ states(entity) }}'
            icon: mdi:power-plug
            tap_action:
              action: more-info
          - type: template
            entity: sensor.phenix_battery_level
            content: '{{ states(entity) }} %'
            icon: |2
                        {% set bl = states('sensor.phenix_battery_level') | int %}
                        {% if bl < 10 %} mdi:battery-outline
                        {% elif bl < 20 %} mdi:battery-10
                        {% elif bl < 30 %} mdi:battery-20
                        {% elif bl < 40 %} mdi:battery-30
                        {% elif bl < 50 %} mdi:battery-40
                        {% elif bl < 60 %} mdi:battery-50
                        {% elif bl < 70 %} mdi:battery-60
                        {% elif bl < 80 %} mdi:battery-70
                        {% elif bl < 90 %} mdi:battery-80
                        {% elif bl < 100 %} mdi:battery-90
                        {% elif bl == 100 %} mdi:battery
                        {% else %} mdi:battery-unknown
                        {% endif %}
            icon_color: |2-
                        {% set bl = states('sensor.phenix_battery_level') | int %}
                        {% if bl < 10 %} red
                        {% elif bl < 20 %} red
                        {% elif bl < 30 %} red
                        {% elif bl < 40 %} orange
                        {% elif bl < 50 %} orange
                        {% elif bl < 60 %} green
                        {% elif bl < 70 %} green
                        {% elif bl < 80 %} green
                        {% elif bl < 90 %} green
                        {% elif bl < 100 %} green
                        {% elif bl == 100 %} green
                        {% else %} grey
                        {% endif %}
            tap_action:
              action: more-info
          - type: template
            icon_color: yellow
            entity: sensor.phenix_steps
            content: '{{states(entity)}}'
            icon: mdi:walk
          - type: entity
            icon_color: yellow
            entity: sensor.phenix_distance
        alignment: left

```

![Screenshot - 12.10.2023 , 15_16_42](https://forum.arturhome.pl/uploads/default/original/3X/5/b/5bb930b40b467d67d32ee7987dfbb9c3f7038d59.png)
