How do I align a custom-button Horizontally in entity card

I have a lovelace entity card with custom-buttons that I want to align horizontally. I have been able to achieve this when I use a horizontal-stack card(below) however I want to do this within an entity card with other entities. I am sure it is just a formatting issie, but I cannot seem to get this to work. Any help would me much appreciated.

This is what my entity card looks like
Entity custom button
This is my code for the entity card

type: entities
entities:
  - cards:
      - content: '## Front Yard'
        style: |
          ha-card {
            background: rgba(0, 0, 0, 0);
            box-shadow: none;
          }
          .markdown {
            padding-left: 0px;
          }
        type: markdown
      - entity: script.sprinkler_zone_front
        layout: icon_name
        name: Run Now
        size: 30px
        state:
          - icon: 'mdi:play-circle'
            value: 'off'
          - icon: 'mdi:autorenew'
            spin: true
            styles:
              card:
                - box-shadow: 0 0 4px 2px var(--paper-item-icon-active-color)
            value: 'on'
        styles:
          card:
            - border-radius: 10px
            - background-color: '#333'
        tap_action:
          action: call-service
          service: script.toggle
          service_data:
            entity_id: script.sprinkler_zone_front
        type: 'custom:button-card'
    layout: horizontal
    min_columns: 2
    type: 'custom:layout-card'
  - conditions:
      - entity: script.sprinkler_zone_front
        state: 'on'
    name: Zone currently running
    row:
      entity: sensor.sprinkler_current_zone
      icon: 'mdi:numeric'
    type: conditional
  - conditions:
      - entity: script.sprinkler_zone_front
        state: 'on'
    row:
      entity: sensor.sprinkler_zone_front_time_remaining
      icon: 'mdi:progress-clock'
    type: conditional
  - type: divider
  - entity: input_number.station1_run_time
    icon: 'mdi:sprinkler'
    name: Zone 1
  - entity: input_number.station2_run_time
    icon: 'mdi:sprinkler'
    name: Zone 2
  - entity: input_number.station3_run_time
    icon: 'mdi:sprinkler'
    name: Zone 3
  - type: divider
  - type: 'custom:button-card'
    color_type: card
    state:
      - icon: 'mdi:cancel'
        value: 'off'
        styles:
          card:
            - color: '#F8390A'
      - icon: 'mdi:check-circle'
        styles:
          card:
            - box-shadow: 0 0 4px 2px var(--paper-item-icon-active-color)
            - color: '#2AB81E'
        value: 'on'
    styles:
      name:
        - size: 5px
        - color: yellow
        - font-size: 15px
      card:
        - width: 40px
        - height: 40px
        - background-color: blue
        - border-radious: 10px
        - box-shadow: 0 0 4px 2px var(--paper-item-icon-active-color)
    entity: input_boolean.station1_mon
    name: Mon
    icon: 'mdi:check-circle'
  - type: 'custom:button-card'
    color_type: card
    state:
      - icon: 'mdi:cancel'
        value: 'off'
        styles:
          card:
            - color: '#F8390A'
      - icon: 'mdi:check-circle'
        styles:
          card:
            - box-shadow: 0 0 4px 2px var(--paper-item-icon-active-color)
            - color: '#2AB81E'
        value: 'on'
    styles:
      name:
        - size: 5px
        - color: yellow
        - font-size: 15px
      card:
        - width: 40px
        - height: 40px
        - background-color: blue
        - border-radious: 10px
        - box-shadow: 0 0 4px 2px var(--paper-item-icon-active-color)
    entity: input_boolean.station1_tue
    name: Tue
    icon: 'mdi:check-circle'
show_header_toggle: false

This is what my horizontal-stack card looks like. This is the look I am trying to achieve
Horizontal Stack
This is the code for my horizontal-stack card

type: horizontal-stack
color: blue
cards:
  - type: 'custom:button-card'
    color_type: card
    state:
      - icon: 'mdi:cancel'
        value: 'off'
        styles:
          card:
            - color: '#F8390A'
      - icon: 'mdi:check-circle'
        styles:
          card:
            - box-shadow: 0 0 4px 2px var(--paper-item-icon-active-color)
            - color: '#2AB81E'
        value: 'on'
    styles:
      name:
        - size: 5px
        - color: yellow
        - font-size: 15px
      card:
        - width: 40px
        - height: 40px
        - background-color: blue
        - border-radious: 10px
        - box-shadow: 0 0 4px 2px var(--paper-item-icon-active-color)
    color: Black
    entity: input_boolean.station1_mon
    name: Mon
    icon: 'mdi:check-circle'
  - type: 'custom:button-card'
    color_type: card
    state:
      - icon: 'mdi:cancel'
        value: 'off'
        styles:
          card:
            - color: '#F8390A'
      - icon: 'mdi:check-circle'
        styles:
          card:
            - box-shadow: 0 0 4px 2px var(--paper-item-icon-active-color)
            - color: '#2AB81E'
        value: 'on'
    styles:
      name:
        - size: 5px
        - color: yellow
        - font-size: 15px
      card:
        - width: 40px
        - height: 40px
        - background-color: blue
        - border-radious: 10px
        - box-shadow: 0 0 4px 2px var(--paper-item-icon-active-color)
    color: Black
    entity: input_boolean.station1_tue
    name: Tue
    icon: 'mdi:check-circle'
  - type: 'custom:button-card'
    color_type: card
    state:
      - icon: 'mdi:cancel'
        value: 'off'
        styles:
          card:
            - color: '#F8390A'
      - icon: 'mdi:check-circle'
        styles:
          card:
            - box-shadow: 0 0 4px 2px var(--paper-item-icon-active-color)
            - color: '#2AB81E'
        value: 'on'
    styles:
      name:
        - size: 5px
        - color: yellow
        - font-size: 15px
      card:
        - width: 40px
        - height: 40px
        - background-color: blue
        - border-radious: 10px
        - box-shadow: 0 0 4px 2px var(--paper-item-icon-active-color)
    color: black
    entity: input_boolean.station1_wed
    name: Wed
    icon: 'mdi:check-circle'
  - type: 'custom:button-card'
    color_type: card
    state:
      - icon: 'mdi:cancel'
        value: 'off'
        styles:
          card:
            - color: '#F8390A'
      - icon: 'mdi:check-circle'
        styles:
          card:
            - box-shadow: 0 0 4px 2px var(--paper-item-icon-active-color)
            - color: '#2AB81E'
        value: 'on'
    styles:
      name:
        - size: 5px
        - color: yellow
        - font-size: 15px
      card:
        - width: 40px
        - height: 40px
        - background-color: blue
        - border-radious: 10px
        - box-shadow: 0 0 4px 2px var(--paper-item-icon-active-color)
    color: black
    entity: input_boolean.station1_thu
    name: Thu
    icon: 'mdi:check-circle'
  - type: 'custom:button-card'
    color_type: card
    state:
      - icon: 'mdi:cancel'
        value: 'off'
        styles:
          card:
            - color: '#F8390A'
      - icon: 'mdi:check-circle'
        styles:
          card:
            - box-shadow: 0 0 4px 2px var(--paper-item-icon-active-color)
            - color: '#2AB81E'
        value: 'on'
    styles:
      name:
        - size: 5px
        - color: yellow
        - font-size: 15px
      card:
        - width: 40px
        - height: 40px
        - background-color: blue
        - border-radious: 10px
        - box-shadow: 0 0 4px 2px var(--paper-item-icon-active-color)
    color: black
    entity: input_boolean.station1_fri
    name: Fri
    icon: 'mdi:check-circle'
  - type: 'custom:button-card'
    color_type: card
    state:
      - icon: 'mdi:cancel'
        value: 'off'
        styles:
          card:
            - color: '#F8390A'
      - icon: 'mdi:check-circle'
        styles:
          card:
            - box-shadow: 0 0 4px 2px var(--paper-item-icon-active-color)
            - color: '#2AB81E'
        value: 'on'
    styles:
      name:
        - size: 5px
        - color: yellow
        - font-size: 15px
      card:
        - width: 40px
        - height: 40px
        - background-color: blue
        - border-radious: 10px
        - box-shadow: 0 0 4px 2px var(--paper-item-icon-active-color)
    color: black
    entity: input_boolean.station1_sat
    name: Sat
    icon: 'mdi:check-circle'
  - type: 'custom:button-card'
    color_type: card
    state:
      - icon: 'mdi:cancel'
        value: 'off'
        styles:
          card:
            - color: '#F8390A'
      - icon: 'mdi:check-circle'
        styles:
          card:
            - box-shadow: 0 0 4px 2px var(--paper-item-icon-active-color)
            - color: '#2AB81E'
        value: 'on'
    styles:
      name:
        - size: 5px
        - color: yellow
        - font-size: 15px
      card:
        - width: 40px
        - height: 40px
        - background-color: blue
        - border-radious: 10px
        - box-shadow: 0 0 4px 2px var(--paper-item-icon-active-color)
    color: black
    entity: input_boolean.station1_sun
    name: Sun
    icon: 'mdi:check-circle'

Just put your horizontal stack as a cards child in your entities card.
Unless I misunderstand your question…

Or you could use a grid card, e. g.:


type: grid
columns: 1     ### one big column as a container
square: false  ### `false` for nice-looking rendering
cards:
  - type: markdown
    content: >
    …
  - type: entities
    entities:
      - …
      - …
      - …
  - type: horizontal-stack
    cards:
      - type: custom:button-card
      - type: custom:button-card
      - type: custom:button-card

Thank you for the suggestion, this method worked perfectly. My struggles are more with how to format things within the code editor. I find the editor a very clunky interface. I never know when I need a dash or how many spaces I need etc or when I need to indent. I tried to use notpad++ setting the file type to YAML, however it seems that the indent method I use to indent brings over characters when I cut and paste into the lovelace front end code editor. Maybe I am just going about things the wrong way.

You should have the possibility to set the indentation (two or four blank spaces). Maybe this validator will help you a little bit.