# Picard Operations: the "switchable display" archetype from doc/getting-started/lcars-design.md,
# in the Picard look. The frame, columns and strips stay put while the centre changes: the
# selector strip under the display picks one of three displays (the ops mode helper), and each is
# a card with a visibility condition on it. 01 charts power, shields and level as hourly averages
# with live readouts beside the chart; 02 shows the Enterprise as a hologram whose callouts carry
# live readings; 03 is a tactical plot of nearby contacts.
# The display sweep comes down a code-block column (four blocks toggle helpers); the right column
# holds a ship status table (every number a labelled live reading) over a gauge bank that sets
# power, shields and level. Under the selector, a thin open frame holds the door and light
# controls beside a readings table and three readout bars, and utility pills sit in a bracket
# open on the right edge.
# Every colour is a theme role (theme: tokens), so it follows the HA-LCARS theme.
# Uses lcards_test_* helpers and sensor.desk_sensor_temperature.
title: Picard Operations
views:
  - title: Operations
    path: operations
    type: custom:lcards-layout-view
    layout:
      height: calc(100dvh - var(--header-height, 56px))
      padding: 8px
      grid-gap: 6px
      grid-template-columns: 134px 40px minmax(0, 1fr) 196px 110px
      grid-template-rows: 14px 46px minmax(0, 1fr) 40px 14px 30px 96px 12px
    cards:
      - type: custom:lcards-elbow
        view_layout:
          grid-column: 1 / 3
          grid-row: 1 / 3
        elbow:
          type: header-left
          segment:
            bar_width: 134
            bar_height: 14
            outer_curve: 46
            color: theme:colors.ui.secondary
      - type: custom:lcards-layout-card
        layout:
          grid-gap: 6px
          grid-template-columns: 250px 96px minmax(0, 1fr) 64px 196px
          grid-template-rows: minmax(0, 1fr)
        cards:
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                show: false
            style:
              card:
                color:
                  background:
                    default: theme:colors.card.topColor
          - type: custom:lcards-button
            preset: text-only
            min_height: 0
            text:
              label:
                content: ••  •  •••  ••
                show: true
                position: center
                font_size: 14
                color: theme:colors.ui.secondary
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                show: false
            style:
              card:
                color:
                  background:
                    default: theme:colors.ui.secondary
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                show: false
            style:
              card:
                color:
                  background:
                    default: theme:colors.ui.tertiary
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                show: false
            style:
              card:
                color:
                  background:
                    default: theme:colors.card.topColor
        view_layout:
          grid-column: 3 / 5
          grid-row: '1'
      - type: custom:lcards-layout-card
        layout:
          grid-gap: 6px
          grid-template-columns: 64px 184px minmax(0, 1fr)
          grid-template-rows: minmax(0, 1fr) 24px
        cards:
          - type: custom:lcards-button
            preset: panel-dark
            min_height: 0
            text:
              label:
                content: 94-255
                position: center-right
                font_size: 13
            style:
              card:
                color:
                  background:
                    default: theme:colors.card.topColor
            view_layout:
              grid-column: '1'
              grid-row: '2'
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                content: MAIN BRIDGE · OPS 2
                position: center-right
                font_size: 13
            view_layout:
              grid-column: '2'
              grid-row: '2'
          - type: custom:lcards-button
            preset: text-only
            min_height: 0
            text:
              label:
                content: USS ENTERPRISE · OPERATIONS
                show: true
                position: bottom-right
                font_size: 40
                color: theme:colors.ui.tertiary
            view_layout:
              grid-column: '3'
              grid-row: 1 / 3
        view_layout:
          grid-column: 3 / 5
          grid-row: '2'
      - type: custom:lcards-layout-card
        layout:
          grid-gap: 6px
          grid-template-columns: 64px 64px
          grid-template-rows: repeat(8, 24px) minmax(0, 1fr) repeat(3, 24px)
        cards:
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                content: 23-634
                position: center-right
                font_size: 13
          - type: custom:lcards-button
            preset: panel-dark
            min_height: 0
            text:
              label:
                content: 65-788
                position: center-right
                font_size: 13
            style:
              card:
                color:
                  background:
                    default: theme:colors.card.topColor
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            entity: input_boolean.lcards_test_lights
            interactive: true
            tap_action:
              action: toggle
            text:
              label:
                content: LIGHTS
                position: center-right
                font_size: 13
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                content: 77-243
                position: center-right
                font_size: 13
            style:
              card:
                color:
                  background:
                    default: theme:colors.ui.tertiary
          - type: custom:lcards-button
            preset: panel-dark
            min_height: 0
            text:
              label:
                content: 95-086
                position: center-right
                font_size: 13
            style:
              card:
                color:
                  background:
                    default: theme:colors.card.topColor
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                content: 66-569
                position: center-right
                font_size: 13
          - type: custom:lcards-button
            preset: panel-dark
            min_height: 0
            entity: input_boolean.lcards_test_doors
            interactive: true
            tap_action:
              action: toggle
            text:
              label:
                content: DOORS
                position: center-right
                font_size: 13
                color:
                  default: theme:colors.ui.secondary
                  active: var(--lcars-text-dark, var(--lcards-gray-darkest))
                  inactive: theme:colors.ui.secondary
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                content: 37-918
                position: center-right
                font_size: 13
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                content: 63-803
                position: center-right
                font_size: 13
          - type: custom:lcards-button
            preset: panel-dark
            min_height: 0
            text:
              label:
                content: 93-329
                position: center-right
                font_size: 13
            style:
              card:
                color:
                  background:
                    default: theme:colors.card.topColor
          - type: custom:lcards-button
            preset: panel-dark
            min_height: 0
            entity: input_boolean.lcards_test_toggle
            interactive: true
            tap_action:
              action: toggle
            text:
              label:
                content: AUX
                position: center-right
                font_size: 13
                color:
                  default: theme:colors.ui.secondary
                  active: var(--lcars-text-dark, var(--lcards-gray-darkest))
                  inactive: theme:colors.ui.secondary
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                content: 22-728
                position: center-right
                font_size: 13
          - type: custom:lcards-button
            preset: panel-dark
            min_height: 0
            text:
              label:
                content: 52-848
                position: center-right
                font_size: 13
            style:
              card:
                color:
                  background:
                    default: theme:colors.card.topColor
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                content: 01-057
                position: center-right
                font_size: 13
            style:
              card:
                color:
                  background:
                    default: theme:colors.ui.secondary
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                content: 66-210
                position: center-right
                font_size: 13
          - type: custom:lcards-button
            preset: panel-dark
            min_height: 0
            entity: input_boolean.lcards_test_warp
            interactive: true
            tap_action:
              action: toggle
            text:
              label:
                content: WARP
                position: center-right
                font_size: 13
                color:
                  default: theme:colors.ui.secondary
                  active: var(--lcars-text-dark, var(--lcards-gray-darkest))
                  inactive: theme:colors.ui.secondary
          - type: custom:lcards-data-grid
            data_mode: decorative
            format: digit
            refresh_interval: 2500
            refresh_cells: 0.08
            grid:
              grid-template-columns: repeat(2, 58px)
              grid-template-rows: repeat(9, 18px)
              gap: 2
            style:
              font_size: 13
              color: theme:colors.card.topColor
              align: right
            view_layout:
              grid-column: 1 / 3
              grid-row: '9'
              margin: 6px 0
          - type: custom:lcards-button
            preset: panel-dark
            min_height: 0
            text:
              label:
                content: 24-023
                position: center-right
                font_size: 13
            style:
              card:
                color:
                  background:
                    default: theme:colors.card.topColor
            view_layout:
              grid-column: '1'
              grid-row: '10'
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                content: 16-933
                position: center-right
                font_size: 13
            view_layout:
              grid-column: '2'
              grid-row: '10'
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                content: 24-088
                position: center-right
                font_size: 13
            view_layout:
              grid-column: '1'
              grid-row: '11'
          - type: custom:lcards-button
            preset: panel-flagged
            min_height: 0
            text:
              label:
                content: 81-043
                position: center-right
                font_size: 13
            view_layout:
              grid-column: '2'
              grid-row: '11'
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                content: DECK 8
                position: center-right
                font_size: 13
            style:
              card:
                color:
                  background:
                    default: theme:colors.ui.secondary
            view_layout:
              grid-column: '1'
              grid-row: '12'
          - type: custom:lcards-button
            preset: panel-dark
            min_height: 0
            text:
              label:
                content: 90-624
                position: center-right
                font_size: 13
            style:
              card:
                color:
                  background:
                    default: theme:colors.card.topColor
            view_layout:
              grid-column: '2'
              grid-row: '12'
        view_layout:
          grid-column: '1'
          grid-row: '3'
      - type: custom:lcards-layout-card
        layout:
          grid-gap: 6px
          grid-template-columns: minmax(0, 1fr) 96px
          grid-template-rows: 24px minmax(0, 1fr)
        cards:
          - type: custom:lcards-layout-card
            layout:
              grid-gap: 6px
              grid-template-columns: 64px 220px minmax(0, 1fr) 64px 96px
              grid-template-rows: 24px
            cards:
              - type: custom:lcards-button
                preset: panel-dark
                min_height: 0
                text:
                  label:
                    content: D-01
                    position: center-right
                    font_size: 13
                style:
                  card:
                    color:
                      background:
                        default: theme:colors.card.topColor
              - type: custom:lcards-button
                preset: panel-dark
                min_height: 0
                text:
                  label:
                    content: EPS POWER · 24 H
                    position: center-right
                    font_size: 13
                style:
                  card:
                    color:
                      background:
                        default: theme:colors.card.topColor
              - type: custom:lcards-button
                preset: text-only
                min_height: 0
                text:
                  label:
                    content: •  ••  •  •••
                    show: true
                    position: center-right
                    font_size: 14
                    color: theme:colors.ui.secondary
              - type: custom:lcards-button
                preset: panel-light
                min_height: 0
                text:
                  label:
                    content: 1 H AVG
                    position: center-right
                    font_size: 13
                style:
                  card:
                    color:
                      background:
                        default: theme:colors.ui.secondary
              - type: custom:lcards-button
                preset: panel-light
                min_height: 0
                text:
                  label:
                    content: 471-40
                    position: center-right
                    font_size: 13
            view_layout:
              grid-column: 1 / 3
              grid-row: '1'
          - type: custom:lcards-chart
            chart_type: line
            graph_span: 24h
            sources:
              - entity: input_number.lcards_test_power
                name: POWER
                curve: stepline
                stroke_width: 2
                group_by:
                  func: avg
                  duration: 1h
              - entity: input_number.lcards_test_shields
                name: SHIELDS
                curve: stepline
                stroke_width: 2
                group_by:
                  func: avg
                  duration: 1h
              - entity: input_number.lcards_test_value
                name: LEVEL
                curve: stepline
                stroke_width: 1
                group_by:
                  func: avg
                  duration: 1h
            style:
              colors:
                series:
                  - theme:colors.ui.tertiary
                  - theme:colors.ui.secondary
                  - theme:colors.card.topColor
                grid: theme:colors.card.topColor
                axis:
                  x: theme:colors.ui.secondary
                  'y': theme:colors.ui.secondary
                  border: theme:colors.card.topColor
                  ticks: theme:colors.card.topColor
              legend:
                show: false
            view_layout:
              grid-column: '1'
              grid-row: '2'
              margin: 8px 0 0 0
          - type: custom:lcards-layout-card
            layout:
              grid-gap: 6px
              grid-template-columns: 96px
              grid-template-rows: repeat(9, 24px) minmax(0, 1fr)
            cards:
              - type: custom:lcards-button
                preset: text-only
                min_height: 0
                text:
                  label:
                    content: NOW
                    show: true
                    position: bottom-right
                    font_size: 14
                    color: theme:colors.ui.tertiary
              - type: custom:lcards-button
                preset: panel-light
                min_height: 0
                text:
                  label:
                    content: PWR
                    position: center-right
                    font_size: 13
                style:
                  card:
                    color:
                      background:
                        default: theme:colors.ui.tertiary
              - type: custom:lcards-button
                preset: panel-flagged
                min_height: 0
                entity: input_number.lcards_test_power
                text:
                  label:
                    content: '{entity.state}'
                    position: center-right
                    font_size: 13
                    color:
                      default: theme:colors.ui.secondary
                      active: var(--lcars-text-dark, var(--lcards-gray-darkest))
                      inactive: theme:colors.ui.secondary
              - type: custom:lcards-button
                preset: panel-light
                min_height: 0
                text:
                  label:
                    content: SHD
                    position: center-right
                    font_size: 13
                style:
                  card:
                    color:
                      background:
                        default: theme:colors.ui.secondary
              - type: custom:lcards-button
                preset: panel-flagged
                min_height: 0
                entity: input_number.lcards_test_shields
                text:
                  label:
                    content: '{entity.state}'
                    position: center-right
                    font_size: 13
                    color:
                      default: theme:colors.ui.secondary
                      active: var(--lcars-text-dark, var(--lcards-gray-darkest))
                      inactive: theme:colors.ui.secondary
              - type: custom:lcards-button
                preset: panel-dark
                min_height: 0
                text:
                  label:
                    content: LVL
                    position: center-right
                    font_size: 13
                style:
                  card:
                    color:
                      background:
                        default: theme:colors.card.topColor
              - type: custom:lcards-button
                preset: panel-flagged
                min_height: 0
                entity: input_number.lcards_test_value
                text:
                  label:
                    content: '{entity.state}'
                    position: center-right
                    font_size: 13
                    color:
                      default: theme:colors.ui.secondary
                      active: var(--lcars-text-dark, var(--lcards-gray-darkest))
                      inactive: theme:colors.ui.secondary
              - type: custom:lcards-button
                preset: panel-dark
                min_height: 0
                text:
                  label:
                    content: 41-820
                    position: center-right
                    font_size: 13
                style:
                  card:
                    color:
                      background:
                        default: theme:colors.card.topColor
              - type: custom:lcards-button
                preset: panel-light
                min_height: 0
                text:
                  label:
                    content: 02-153
                    position: center-right
                    font_size: 13
            view_layout:
              grid-column: '2'
              grid-row: '2'
              margin: 8px 0 0 0
        view_layout:
          grid-column: '3'
          grid-row: '3'
        visibility:
          - condition: state
            entity: input_select.lcards_test_mode
            state: alpha
      - type: custom:lcards-layout-card
        layout:
          grid-gap: 6px
          grid-template-columns: minmax(0, 1fr)
          grid-template-rows: 24px minmax(0, 1fr)
        cards:
          - type: custom:lcards-layout-card
            layout:
              grid-gap: 6px
              grid-template-columns: 64px 220px minmax(0, 1fr) 64px 96px
              grid-template-rows: 24px
            cards:
              - type: custom:lcards-button
                preset: panel-dark
                min_height: 0
                text:
                  label:
                    content: D-02
                    position: center-right
                    font_size: 13
                style:
                  card:
                    color:
                      background:
                        default: theme:colors.card.topColor
              - type: custom:lcards-button
                preset: panel-dark
                min_height: 0
                text:
                  label:
                    content: VESSEL · NCC-1701-D
                    position: center-right
                    font_size: 13
                style:
                  card:
                    color:
                      background:
                        default: theme:colors.card.topColor
              - type: custom:lcards-button
                preset: text-only
                min_height: 0
                text:
                  label:
                    content: •  ••  •  •••
                    show: true
                    position: center-right
                    font_size: 14
                    color: theme:colors.ui.secondary
              - type: custom:lcards-button
                preset: panel-light
                min_height: 0
                text:
                  label:
                    content: '1:1400'
                    position: center-right
                    font_size: 13
                style:
                  card:
                    color:
                      background:
                        default: theme:colors.ui.secondary
              - type: custom:lcards-button
                preset: panel-light
                min_height: 0
                text:
                  label:
                    content: 266-19
                    position: center-right
                    font_size: 13
          - type: custom:lcards-astrometrics-card
            height: 100%
            camera:
              view: side
              controls: false
              buttons: false
              views:
                side:
                  target:
                    - 0
                    - -3
                    - 0
                  yaw: -60
                  tilt: 20
                  distance: 72
            labels:
              overlap: true
              styles:
                tiny:
                  font_size: 14
                  color: theme:colors.ui.secondary
            points:
              - id: p_bridge
                object: ship
                part: bridge
                marker: dot
                color: theme:colors.ui.secondary
              - id: l_bridge
                at: p_bridge
                offset:
                  - 0
                  - 13
                  - 14
                marker: none
                style: tiny
                text:
                  label:
                    content: BRIDGE · DECK 1 · {{ 'LIT' if is_state('input_boolean.lcards_test_lights', 'on') else 'DARK' }}
                    position: top-center
              - id: p_nacelle
                object: ship
                part: bussard_port
                marker: dot
                color: theme:colors.ui.secondary
              - id: l_nacelle
                at: p_nacelle
                offset:
                  - 0
                  - 14
                  - -14
                marker: none
                style: tiny
                text:
                  label:
                    content: PORT NACELLE · {{ 'ENGAGED' if is_state('input_boolean.lcards_test_warp', 'on') else 'IDLE' }}
                    position: top-center
              - id: p_bay
                object: ship
                part: shuttle_bay
                marker: dot
                color: theme:colors.ui.secondary
              - id: l_bay
                at: p_bay
                offset:
                  - 0
                  - 15
                  - -2
                marker: none
                style: tiny
                text:
                  label:
                    content: SHUTTLE BAY 2 · {{ 'OPEN' if is_state('input_boolean.lcards_test_doors', 'on') else 'SEALED' }}
                    position: top-center
              - id: p_deflector
                object: ship
                part: deflector
                marker: dot
                color: theme:colors.ui.secondary
              - id: l_deflector
                at: p_deflector
                offset:
                  - 0
                  - -12
                  - 18
                marker: none
                style: tiny
                text:
                  label:
                    content: MAIN DEFLECTOR · {{ states('input_number.lcards_test_shields') | int }} %
                    position: bottom-center
              - id: p_impulse
                object: ship
                part: impulse
                marker: dot
                color: theme:colors.ui.secondary
              - id: l_impulse
                at: p_impulse
                offset:
                  - 0
                  - -20
                  - -16
                marker: none
                style: tiny
                text:
                  label:
                    content: IMPULSE · STANDBY
                    position: bottom-center
              - id: p_torpedo
                object: ship
                part: torpedo_launcher
                marker: dot
                color: theme:colors.ui.secondary
              - id: l_torpedo
                at: p_torpedo
                offset:
                  - 0
                  - -12
                  - 2
                marker: none
                style: tiny
                text:
                  label:
                    content: TORPEDO BAY · 2 OF 2
                    position: bottom-center
            objects:
              - type: model
                id: ship
                src: builtin:galaxy_class
                size: 64.25
                color: theme:colors.ui.tertiary
                occlude: false
                scan:
                  period: 7
              - type: path
                points:
                  - p_bridge
                  - l_bridge
                color: theme:colors.card.topColor
                width: 1
              - type: path
                points:
                  - p_nacelle
                  - l_nacelle
                color: theme:colors.card.topColor
                width: 1
              - type: path
                points:
                  - p_bay
                  - l_bay
                color: theme:colors.card.topColor
                width: 1
              - type: path
                points:
                  - p_deflector
                  - l_deflector
                color: theme:colors.card.topColor
                width: 1
              - type: path
                points:
                  - p_impulse
                  - l_impulse
                color: theme:colors.card.topColor
                width: 1
              - type: path
                points:
                  - p_torpedo
                  - l_torpedo
                color: theme:colors.card.topColor
                width: 1
        view_layout:
          grid-column: '3'
          grid-row: '3'
        visibility:
          - condition: state
            entity: input_select.lcards_test_mode
            state: beta
      - type: custom:lcards-layout-card
        layout:
          grid-gap: 6px
          grid-template-columns: minmax(0, 1fr)
          grid-template-rows: 24px minmax(0, 1fr)
        cards:
          - type: custom:lcards-layout-card
            layout:
              grid-gap: 6px
              grid-template-columns: 64px 220px minmax(0, 1fr) 64px 96px
              grid-template-rows: 24px
            cards:
              - type: custom:lcards-button
                preset: panel-dark
                min_height: 0
                text:
                  label:
                    content: D-03
                    position: center-right
                    font_size: 13
                style:
                  card:
                    color:
                      background:
                        default: theme:colors.card.topColor
              - type: custom:lcards-button
                preset: panel-dark
                min_height: 0
                text:
                  label:
                    content: TACTICAL · SECTOR 0-41
                    position: center-right
                    font_size: 13
                style:
                  card:
                    color:
                      background:
                        default: theme:colors.card.topColor
              - type: custom:lcards-button
                preset: text-only
                min_height: 0
                text:
                  label:
                    content: •  ••  •  •••
                    show: true
                    position: center-right
                    font_size: 14
                    color: theme:colors.ui.secondary
              - type: custom:lcards-button
                preset: panel-light
                min_height: 0
                text:
                  label:
                    content: RANGE 4
                    position: center-right
                    font_size: 13
                style:
                  card:
                    color:
                      background:
                        default: theme:colors.ui.secondary
              - type: custom:lcards-button
                preset: panel-light
                min_height: 0
                text:
                  label:
                    content: 114-67
                    position: center-right
                    font_size: 13
          - type: custom:lcards-astrometrics-card
            height: 100%
            look: diagram
            camera:
              view: plot
              controls: false
              buttons: false
              views:
                plot:
                  target:
                    - 0
                    - 0
                    - 6
                  tilt: 52
                  distance: 272
            labels:
              overlap: true
              styles:
                tiny:
                  font_size: 14
                  color: theme:colors.ui.secondary
            objects:
              - type: grid
                shape: disc
                radius: 100
                pattern: polar
                line_spacing: 25
                spoke_count: 12
                color: theme:colors.card.topColor
                major:
                  row_interval: 2
                  color: theme:colors.ui.secondary
                ring_labels:
                  step: 30
                  style: tiny
                scan:
                  period: 8
                  color: theme:colors.ui.tertiary
            points:
              - id: own
                xyz:
                  - 0
                  - 0
                  - 0
                marker: ship
                label: ENTERPRISE
                style: tiny
                color: theme:colors.ui.tertiary
              - id: c1
                polar:
                  - 62
                  - 40
                marker: dot
                label: CONTACT 1 · 040 MARK 3
                style: tiny
              - id: c2
                polar:
                  - 84
                  - 118
                marker: triangle
                label: CONTACT 2 · 118 MARK 0
                style: tiny
              - id: c3
                polar:
                  - 40
                  - 205
                marker: dot
                label: BUOY 7 · 205
                style: tiny
              - id: c4
                polar:
                  - 92
                  - 300
                marker: starbase
                label: STARBASE 83 · 300
                style: tiny
              - id: c5
                polar:
                  - 70
                  - 255
                marker: diamond
                label: 099-2633
                style: tiny
        view_layout:
          grid-column: '3'
          grid-row: '3'
        visibility:
          - condition: state
            entity: input_select.lcards_test_mode
            state: gamma
      - type: custom:lcards-layout-card
        layout:
          grid-gap: 6px
          grid-template-columns: 60px 60px 60px
          grid-template-rows: 24px 18px 144px minmax(0, 1fr) 24px 24px
        cards:
          - type: custom:lcards-button
            preset: panel-dark
            min_height: 0
            text:
              label:
                content: SHIP STATUS
                position: center-right
                font_size: 13
            style:
              card:
                color:
                  background:
                    default: theme:colors.card.topColor
            view_layout:
              grid-column: 1 / 4
              grid-row: '1'
          - type: custom:lcards-button
            preset: text-only
            min_height: 0
            text:
              label:
                content: OPERATIONS
                show: true
                position: bottom-left
                font_size: 14
                color: theme:colors.ui.tertiary
            view_layout:
              grid-column: 1 / 4
              grid-row: '2'
          - type: custom:lcards-data-grid
            data_mode: data
            rows:
              - values:
                  - value: '01'
                    style:
                      color: theme:colors.card.topColor
                  - POWER
                  - input_number.lcards_test_power
                style:
                  color: theme:colors.ui.secondary
              - values:
                  - value: '02'
                    style:
                      color: theme:colors.card.topColor
                  - SHIELDS
                  - input_number.lcards_test_shields
                style:
                  color: theme:colors.ui.secondary
              - values:
                  - value: '03'
                    style:
                      color: theme:colors.card.topColor
                  - LEVEL
                  - input_number.lcards_test_value
                style:
                  color: theme:colors.ui.secondary
              - values:
                  - value: '04'
                    style:
                      color: theme:colors.card.topColor
                  - DOORS
                  - input_boolean.lcards_test_doors
                style:
                  color: theme:colors.ui.primary
              - values:
                  - value: '05'
                    style:
                      color: theme:colors.card.topColor
                  - LIGHTS
                  - input_boolean.lcards_test_lights
                style:
                  color: theme:colors.ui.primary
              - values:
                  - value: '06'
                    style:
                      color: theme:colors.card.topColor
                  - WARP
                  - input_boolean.lcards_test_warp
                style:
                  color: theme:colors.ui.primary
              - values:
                  - value: '07'
                    style:
                      color: theme:colors.card.topColor
                  - MODE
                  - input_select.lcards_test_mode
                style:
                  color: theme:colors.ui.primary
            columns:
              - style:
                  align: left
              - style:
                  align: left
              - {}
              - style:
                  align: left
            grid:
              grid-template-columns: 20px 90px 56px
              grid-template-rows: repeat(7, 20px)
              gap: 0px 10px
            style:
              font_size: 14
              padding: 0px
              line_height: 1.1
              align: right
              text_transform: uppercase
            view_layout:
              grid-column: 1 / 4
              grid-row: '3'
          - type: custom:lcards-slider
            preset: picard-gauge-column
            entity: input_number.lcards_test_power
            text:
              name:
                show: true
                content: PWR
            view_layout:
              grid-column: '1'
              grid-row: '4'
          - type: custom:lcards-slider
            preset: picard-gauge-column
            entity: input_number.lcards_test_shields
            text:
              name:
                show: true
                content: SHD
            view_layout:
              grid-column: '2'
              grid-row: '4'
          - type: custom:lcards-slider
            preset: picard-gauge-column
            entity: input_number.lcards_test_value
            text:
              name:
                show: true
                content: LVL
            view_layout:
              grid-column: '3'
              grid-row: '4'
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                content: 14-178
                position: center-right
                font_size: 13
            view_layout:
              grid-column: '1'
              grid-row: '5'
          - type: custom:lcards-button
            preset: panel-dark
            min_height: 0
            text:
              label:
                content: 88-380
                position: center-right
                font_size: 13
            style:
              card:
                color:
                  background:
                    default: theme:colors.card.topColor
            view_layout:
              grid-column: '2'
              grid-row: '5'
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                content: 45-243
                position: center-right
                font_size: 13
            style:
              card:
                color:
                  background:
                    default: theme:colors.ui.tertiary
            view_layout:
              grid-column: '3'
              grid-row: '5'
          - type: custom:lcards-button
            preset: panel-dark
            min_height: 0
            text:
              label:
                content: 66-125
                position: center-right
                font_size: 13
            style:
              card:
                color:
                  background:
                    default: theme:colors.card.topColor
            view_layout:
              grid-column: '1'
              grid-row: '6'
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                content: 53-629
                position: center-right
                font_size: 13
            view_layout:
              grid-column: '2'
              grid-row: '6'
          - type: custom:lcards-button
            preset: panel-flagged
            min_height: 0
            text:
              label:
                content: 21-283
                position: center-right
                font_size: 13
            view_layout:
              grid-column: '3'
              grid-row: '6'
        view_layout:
          grid-column: '4'
          grid-row: '3'
      - type: custom:lcards-elbow
        view_layout:
          grid-column: 1 / 3
          grid-row: 4 / 6
        elbow:
          type: footer-left
          segment:
            bar_width: 134
            bar_height: 14
            outer_curve: 46
            color: theme:colors.ui.secondary
      - type: custom:lcards-layout-card
        layout:
          grid-gap: 6px
          grid-template-columns: minmax(0, 1fr) 96px 64px 196px
          grid-template-rows: minmax(0, 1fr)
        cards:
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                show: false
            style:
              card:
                color:
                  background:
                    default: theme:colors.ui.secondary
          - type: custom:lcards-button
            preset: text-only
            min_height: 0
            text:
              label:
                content: •••  •  ••
                show: true
                position: center
                font_size: 14
                color: theme:colors.ui.secondary
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                show: false
            style:
              card:
                color:
                  background:
                    default: theme:colors.ui.tertiary
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                show: false
            style:
              card:
                color:
                  background:
                    default: theme:colors.card.topColor
        view_layout:
          grid-column: 3 / 5
          grid-row: '5'
      - type: custom:lcards-layout-card
        layout:
          grid-gap: 6px
          grid-template-columns: 134px repeat(3, 150px) minmax(0, 1fr) 96px 96px 96px 96px
          grid-template-rows: minmax(0, 1fr)
        cards:
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                content: DISPLAY
                position: center-right
                font_size: 13
            style:
              card:
                color:
                  background:
                    default: theme:colors.ui.secondary
          - type: custom:lcards-select-menu
            entity: input_select.lcards_test_mode
            preset: toggle-tab
            grid:
              columns: 3
              gap: 6px
              grid-auto-rows: 30px
            options:
              alpha:
                label: 01 EPS POWER
              beta:
                label: 02 VESSEL
              gamma:
                label: 03 TACTICAL
            style:
              text:
                default:
                  font_size: 13
            view_layout:
              grid-column: 2 / 5
          - type: custom:lcards-button
            preset: text-only
            min_height: 0
            text:
              label:
                content: •  ••  •
                show: true
                position: center
                font_size: 14
                color: theme:colors.ui.secondary
          - type: custom:lcards-button
            preset: toggle-tab
            min_height: 0
            entity: input_boolean.lcards_test_lights
            text:
              name:
                content: LIGHTS
                font_size: 13
            tap_action:
              action: toggle
          - type: custom:lcards-button
            preset: toggle-tab
            min_height: 0
            entity: input_boolean.lcards_test_doors
            text:
              name:
                content: DOORS
                font_size: 13
            tap_action:
              action: toggle
          - type: custom:lcards-button
            preset: toggle-tab
            min_height: 0
            entity: input_boolean.lcards_test_toggle
            text:
              name:
                content: AUX
                font_size: 13
            tap_action:
              action: toggle
          - type: custom:lcards-button
            preset: toggle-tab
            min_height: 0
            entity: input_boolean.lcards_test_warp
            text:
              name:
                content: WARP
                font_size: 13
            tap_action:
              action: toggle
        view_layout:
          grid-column: 1 / 5
          grid-row: '6'
      - type: custom:lcards-layout-card
        layout:
          grid-gap: 6px
          grid-template-columns: 236px 300px minmax(0, 1fr) 196px
          grid-template-rows: minmax(0, 1fr)
        cards:
          - type: custom:lcards-elbow
            view_layout:
              grid-column: '1'
              grid-row: '1'
            elbow:
              type: frame
              segment:
                color: theme:colors.card.topColor
              frame:
                bar_width: 14
                bar_height: 14
                outer_curve: 24
                right:
                  enabled: false
          - type: custom:lcards-layout-card
            layout:
              padding: 20px 0px 20px 22px
              grid-gap: 6px
              grid-template-columns: repeat(3, 64px)
              grid-template-rows: 24px 24px
            cards:
              - type: custom:lcards-button
                preset: panel-light
                min_height: 0
                entity: input_boolean.lcards_test_lights
                interactive: true
                tap_action:
                  action: toggle
                text:
                  label:
                    content: LIGHTS
                    position: center-right
                    font_size: 13
              - type: custom:lcards-button
                preset: panel-dark
                min_height: 0
                entity: input_boolean.lcards_test_doors
                interactive: true
                tap_action:
                  action: toggle
                text:
                  label:
                    content: DOORS
                    position: center-right
                    font_size: 13
                    color:
                      default: theme:colors.ui.secondary
                      active: var(--lcars-text-dark, var(--lcards-gray-darkest))
                      inactive: theme:colors.ui.secondary
              - type: custom:lcards-button
                preset: panel-light
                min_height: 0
                text:
                  label:
                    content: 82-886
                    position: center-right
                    font_size: 13
                style:
                  card:
                    color:
                      background:
                        default: theme:colors.ui.tertiary
              - type: custom:lcards-button
                preset: panel-dark
                min_height: 0
                text:
                  label:
                    content: 24-288
                    position: center-right
                    font_size: 13
                style:
                  card:
                    color:
                      background:
                        default: theme:colors.card.topColor
              - type: custom:lcards-button
                preset: panel-dark
                min_height: 0
                entity: input_boolean.lcards_test_warp_travel
                interactive: true
                tap_action:
                  action: toggle
                text:
                  label:
                    content: TRAVEL
                    position: center-right
                    font_size: 13
                    color:
                      default: theme:colors.ui.secondary
                      active: var(--lcars-text-dark, var(--lcards-gray-darkest))
                      inactive: theme:colors.ui.secondary
              - type: custom:lcards-button
                preset: panel-light
                min_height: 0
                text:
                  label:
                    content: 74-916
                    position: center-right
                    font_size: 13
            view_layout:
              grid-column: '1'
              grid-row: '1'
          - type: custom:lcards-data-grid
            data_mode: data
            rows:
              - values:
                  - value: '08'
                    style:
                      color: theme:colors.card.topColor
                  - CABIN
                  - input_number.lcards_test_temperature
                  - '{{ ''LOW'' if states(''input_number.lcards_test_temperature'') | float(0) < 18 else (''HIGH'' if states(''input_number.lcards_test_temperature'') | float(0) > 26 else ''NOMINAL'') }}'
                style:
                  color: theme:colors.ui.secondary
              - values:
                  - value: '09'
                    style:
                      color: theme:colors.card.topColor
                  - HUMIDITY
                  - input_number.lcards_test_humidity
                  - '{{ ''LOW'' if states(''input_number.lcards_test_humidity'') | float(0) < 30 else (''HIGH'' if states(''input_number.lcards_test_humidity'') | float(0) > 60 else ''NOMINAL'') }}'
                style:
                  color: theme:colors.ui.secondary
              - values:
                  - value: '10'
                    style:
                      color: theme:colors.card.topColor
                  - AMBIENT
                  - sensor.desk_sensor_temperature
                  - '{{ ''LOW'' if states(''sensor.desk_sensor_temperature'') | float(0) < 18 else (''HIGH'' if states(''sensor.desk_sensor_temperature'') | float(0) > 26 else ''NOMINAL'') }}'
                style:
                  color: theme:colors.ui.secondary
              - values:
                  - value: '11'
                    style:
                      color: theme:colors.card.topColor
                  - WARP F
                  - input_number.lcards_test_warp_factor
                  - '{{ ''ENGAGED'' if is_state(''input_boolean.lcards_test_warp'', ''on'') else ''IDLE'' }}'
                style:
                  color: theme:colors.ui.primary
            columns:
              - style:
                  align: left
              - style:
                  align: left
              - {}
              - style:
                  align: left
            grid:
              grid-template-columns: 22px 74px 64px 72px
              grid-template-rows: repeat(4, 20px)
              gap: 0px 10px
            style:
              font_size: 14
              padding: 0px
              line_height: 1.1
              align: right
              text_transform: uppercase
            view_layout:
              grid-column: '2'
              grid-row: '1'
              margin: 8px 0 0 0
          - type: custom:lcards-layout-card
            layout:
              grid-gap: 6px
              grid-template-columns: 96px minmax(0, 1fr)
              grid-template-rows: repeat(3, 24px)
              align-content: center
            cards:
              - type: custom:lcards-button
                preset: panel-dark
                min_height: 0
                text:
                  label:
                    content: EPS FLOW
                    position: center-right
                    font_size: 13
              - type: custom:lcards-slider
                entity: input_number.lcards_test_power
                preset: gauge-basic
                height: 24
                style:
                  gauge:
                    progress_bar:
                      height: 8
                      align: end
                      background:
                        color: theme:colors.card.topColor
                        height: 8
                    scale:
                      labels:
                        enabled: false
                      tick_marks:
                        major:
                          color: theme:colors.ui.secondary
                        minor:
                          color: theme:colors.card.topColor
              - type: custom:lcards-button
                preset: panel-dark
                min_height: 0
                text:
                  label:
                    content: SHIELD GRID
                    position: center-right
                    font_size: 13
              - type: custom:lcards-slider
                entity: input_number.lcards_test_shields
                preset: gauge-basic
                height: 24
                style:
                  gauge:
                    progress_bar:
                      height: 8
                      align: end
                      background:
                        color: theme:colors.card.topColor
                        height: 8
                    scale:
                      labels:
                        enabled: false
                      tick_marks:
                        major:
                          color: theme:colors.ui.secondary
                        minor:
                          color: theme:colors.card.topColor
              - type: custom:lcards-button
                preset: panel-dark
                min_height: 0
                text:
                  label:
                    content: HUMIDITY
                    position: center-right
                    font_size: 13
              - type: custom:lcards-slider
                entity: input_number.lcards_test_humidity
                preset: gauge-basic
                height: 24
                style:
                  gauge:
                    progress_bar:
                      height: 8
                      align: end
                      background:
                        color: theme:colors.card.topColor
                        height: 8
                    scale:
                      labels:
                        enabled: false
                      tick_marks:
                        major:
                          color: theme:colors.ui.secondary
                        minor:
                          color: theme:colors.card.topColor
            view_layout:
              grid-column: '3'
              grid-row: '1'
          - type: custom:lcards-layout-card
            layout:
              grid-gap: 6px
              grid-template-columns: 94px 96px
              grid-template-rows: repeat(3, 24px)
              align-content: center
            cards:
              - type: custom:lcards-button
                preset: panel-dark
                min_height: 0
                text:
                  label:
                    content: STAGE
                    position: center-right
                    font_size: 13
                style:
                  card:
                    color:
                      background:
                        default: theme:colors.card.topColor
              - type: custom:lcards-button
                preset: panel-flagged
                min_height: 0
                entity: input_number.lcards_test_stage
                text:
                  label:
                    content: '{entity.state} OF 20'
                    position: center-right
                    font_size: 13
                    color:
                      default: theme:colors.ui.secondary
                      active: var(--lcars-text-dark, var(--lcards-gray-darkest))
                      inactive: theme:colors.ui.secondary
              - type: custom:lcards-button
                preset: panel-light
                min_height: 0
                text:
                  label:
                    content: 10-162
                    position: center-right
                    font_size: 13
                style:
                  card:
                    color:
                      background:
                        default: theme:colors.ui.secondary
              - type: custom:lcards-button
                preset: panel-dark
                min_height: 0
                text:
                  label:
                    content: 31-323
                    position: center-right
                    font_size: 13
                style:
                  card:
                    color:
                      background:
                        default: theme:colors.card.topColor
              - type: custom:lcards-button
                preset: panel-dark
                min_height: 0
                text:
                  label:
                    content: 57-392
                    position: center-right
                    font_size: 13
                style:
                  card:
                    color:
                      background:
                        default: theme:colors.card.topColor
              - type: custom:lcards-button
                preset: panel-light
                min_height: 0
                text:
                  label:
                    content: NCC-1701-D
                    position: center-right
                    font_size: 13
            view_layout:
              grid-column: '4'
              grid-row: '1'
        view_layout:
          grid-column: 1 / 5
          grid-row: '7'
      - type: custom:lcards-layout-card
        layout:
          grid-gap: 6px
          grid-template-columns: 300px 64px minmax(0, 1fr) 196px
          grid-template-rows: minmax(0, 1fr)
        cards:
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                show: false
            style:
              card:
                color:
                  background:
                    default: theme:colors.card.topColor
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                show: false
            style:
              card:
                color:
                  background:
                    default: theme:colors.ui.tertiary
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                show: false
            style:
              card:
                color:
                  background:
                    default: theme:colors.ui.secondary
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                show: false
            style:
              card:
                color:
                  background:
                    default: theme:colors.card.topColor
        view_layout:
          grid-column: 1 / 5
          grid-row: '8'
      - type: custom:lcards-elbow
        view_layout:
          grid-column: '5'
          grid-row: 1 / -1
        elbow:
          type: frame
          segment:
            color: theme:colors.ui.secondary
          frame:
            bar_width: 14
            bar_height: 30
            outer_curve: 30
            right:
              enabled: false
      - type: custom:lcards-layout-card
        layout:
          padding: 40px 0px 40px 24px
          grid-gap: 6px
          grid-template-columns: minmax(0, 1fr)
          grid-template-rows: 24px 24px 24px 24px minmax(0, 1fr) 24px 24px 24px 24px
        cards:
          - type: custom:lcards-button
            preset: lozenge
            min_height: 0
            text:
              label:
                content: ZOOM
                show: true
                position: center
                font_size: 13
                color: theme:colors.ui.secondary
            style:
              card:
                color:
                  background:
                    default: theme:colors.card.topColor
          - type: custom:lcards-button
            preset: lozenge
            min_height: 0
            text:
              label:
                content: DIMMER
                show: true
                position: center
                font_size: 13
                color: theme:colors.ui.secondary
            style:
              card:
                color:
                  background:
                    default: theme:colors.card.topColor
          - type: custom:lcards-button
            preset: lozenge
            min_height: 0
            text:
              label:
                content: SETTINGS
                show: true
                position: center
                font_size: 13
                color: theme:colors.ui.secondary
            style:
              card:
                color:
                  background:
                    default: theme:colors.card.topColor
          - type: custom:lcards-button
            preset: lozenge
            min_height: 0
            text:
              label:
                content: COMMS
                show: true
                position: center
                font_size: 13
                color: theme:colors.ui.secondary
            style:
              card:
                color:
                  background:
                    default: theme:colors.card.topColor
          - type: custom:lcards-layout-card
            layout:
              grid-gap: 6px
              grid-template-columns: repeat(2, minmax(0, 1fr))
              grid-template-rows: minmax(0, 1fr)
              padding: 12px 0px 6px 0px
            cards:
              - type: custom:lcards-slider
                preset: picard-gauge-column
                entity: input_number.lcards_test_humidity
                text:
                  name:
                    show: true
                    content: HUM
                style:
                  gauge:
                    scale:
                      labels:
                        enabled: false
              - type: custom:lcards-slider
                preset: picard-gauge-column
                entity: input_number.lcards_test_temperature
                text:
                  name:
                    show: true
                    content: TMP
                style:
                  gauge:
                    scale:
                      labels:
                        enabled: false
                control:
                  min: 10
                  max: 35
          - type: custom:lcards-button
            preset: panel-dark
            min_height: 0
            text:
              label:
                content: 55-267
                position: center-right
                font_size: 13
            style:
              card:
                color:
                  background:
                    default: theme:colors.card.topColor
          - type: custom:lcards-button
            preset: panel-light
            min_height: 0
            text:
              label:
                content: OPS 2
                position: center-right
                font_size: 13
          - type: custom:lcards-button
            preset: panel-flagged
            min_height: 0
            text:
              label:
                content: 'MOD: 21'
                position: center-right
                font_size: 13
          - type: custom:lcards-button
            preset: lozenge
            min_height: 0
            text:
              label:
                content: RED ALERT
                show: true
                position: center
                font_size: 13
                color: var(--lcars-text-dark, var(--lcards-gray-darkest))
            style:
              card:
                color:
                  background:
                    default: var(--lcars-alert-color, var(--lcards-orange-dark))
            tap_action:
              action: perform-action
              perform_action: lcards.red_alert
        view_layout:
          grid-column: '5'
          grid-row: 1 / -1
