Combining vertical and horizontal stack

Hi, I would like to combine vertical stack with horizontal stack, but there’s problem and I don’t know where. I want that graph “average” to be under this two. Bez tytułu
If you check my code maybe you could find a problem.

type: horizontal-stack
cards:
  - graph: line
    type: sensor
    entity: sensor.esphome_web_74c344_humidity1
    detail: 1
    name: Humidity 1
    unit: '%'
  - graph: line
    type: sensor
    entity: sensor.esphome_web_74c344_humidity2
    detail: 1
    name: humidity2
  - type: vertical-stack
    cards:
      - graph: line
        type: sensor
        entity: sensor.esphome_web_74c344_average
        detail: 1
        name: Average humidity
1 Like

You have your order of operations backwards:

type: vertical-stack
cards:
  - type: horizontal-stack
    cards:
      - graph: line
        type: sensor
        entity: sensor.esphome_web_74c344_humidity1
        detail: 1
        name: Humidity 1
        unit: '%'
      - graph: line
        type: sensor
        entity: sensor.esphome_web_74c344_humidity2
        detail: 1
        name: humidity2
  - graph: line
    type: sensor
    entity: sensor.esphome_web_74c344_average
    detail: 1
    name: Average humidity
1 Like

Got it, thanks.