# LCARdS 2026.12.1-dev.1 documentation Source: https://lcards.unimatrix01.ca/dev/. JSON Schemas: https://lcards.unimatrix01.ca/dev/schema/index.json --- # Getting AI Help **Claude with the LCARdS skill can plan a dashboard with you, write the YAML and check it before you paste anything.** - Out of the box, a chatbot has never seen LCARdS. It guesses option names, and LCARdS silently ignores the guesses. - The skill gives Claude the real options, presets, colours, docs, gallery dashboards and config checker for your LCARdS version, and the astrometrics starters with their settings, so it can link a starter to your entities (a wormhole that opens with a light). - The skill is made for Claude. Other assistants can still help if you give them the option list (see [With other assistants](#with-other-assistants)). ## With Claude (easiest) **Install the LCARdS skill once, then ask in plain words.** - The skill also knows [HA-LCARS](https://github.com/th3jesta/ha-lcars) (its themes and `--lcars-*` colours) and the [UIX](https://github.com/Lint-Free-Technology/uix) styling it runs on, so Claude can tell you whether a job belongs to an LCARdS option, the theme or UIX. - Claude uses your real entity ids: tell it them, or connect it to Home Assistant with [ha-mcp](#give-claude-your-home-s-context-ha-mcp). | Where you use Claude | How to add the skill | |---|---| | **Claude Code** | Run `/plugin marketplace add https://lcards.unimatrix01.ca/marketplace.json`, then `/plugin install lcards@lcards` | | **claude.ai or the Claude apps** | Open **Plugins**, choose **Add**, then **Marketplace** and **Repository**, and enter `snootched/lcards`. Install **lcards** from it. Turn on code execution | ::: details More about setup - **What the plugin runs:** besides text, it holds a few small offline programs, all of them listed in its [README](https://github.com/snootched/lcards/blob/main/plugins/lcards/README.md). Claude runs the config checker on its drafts (in claude.ai inside its code execution sandbox, not on your computer). In Claude Code a hook also runs the checker after Claude writes a YAML file with LCARdS config, and the starter tool and preview link maker run when Claude needs them. None of them connect to the internet, install anything or read files beyond the one they are given; the preview link keeps your YAML after the `#`, which browsers never send to a server. - **Pictures in claude.ai:** to see pictures of gallery screens while you plan, allow network access to `lcards.unimatrix01.ca` in the code execution settings (add it to the allowed domains, or allow all domains). Without it, Claude gives you the links instead. - **Updating on claude.ai:** the marketplace follows LCARdS releases. Open it under **Plugins** and check for updates after a release. - **claude.ai without the marketplace:** download [`lcards-plugin.zip`](/tools/lcards-plugin.zip) and upload it under **Plugins** (**Add**, then **Upload plugin**). You upload the new zip yourself after each release. The skill alone, [`lcards-skill.zip`](/tools/lcards-skill.zip), also uploads as a custom skill, without the slash commands. - **Claude Code from the repository:** `/plugin marketplace add snootched/lcards` adds the same marketplace claude.ai uses. The command in the table above follows the docs site instead, which also has the dev channel. Add one of them, not both: both are named **lcards**. - **Updating the Claude Code plugin:** each LCARdS release comes with a new version. Run `/plugin marketplace update lcards`, or open `/plugin`, go to **Marketplaces**, select **lcards** and turn on **Enable auto-update**. Then run `/reload-plugins` or start a new session. The plugin needs Claude Code 2.1.224 or newer. - **Installed the skill by hand before?** Delete `~/.claude/skills/lcards/` first, so only the plugin copy loads. - **Manual install in Claude Code:** unzip [`lcards-skill.zip`](/tools/lcards-skill.zip) into `~/.claude/skills/`, so you have `~/.claude/skills/lcards/SKILL.md`. It won't update itself. - **Running a dev build of LCARdS?** Use the dev channel, which follows the [dev docs](https://lcards.unimatrix01.ca/dev/): `/plugin marketplace add https://lcards.unimatrix01.ca/dev/marketplace.json`, then `/plugin install lcards@lcards-dev`. Install one channel, not both. - **Other tools:** the skill follows the open [Agent Skills](https://agentskills.io) standard, so other tools may load the zip. We build and test it with Claude only. ::: ## What to ask **Ask for what you want; Claude works out the rest with you.** | You ask | Claude | |---|---| | *"I want a Star Trek engineering screen for my house. What could I do?"* | Asks what the screen is for, where it runs, the look, how colours should work and which entities to use. Then offers two or three concepts, each with a layout sketch and pictures of similar gallery screens | | *"Build an engineering dashboard with my `sensor.power_*` entities."* | Proposes a design for those entities, builds it once you agree, and checks it | | *"Make me an LCARdS button for `light.kitchen` that turns red when it's on."* | Writes the card straight away | | *"Just the YAML."* | Skips the questions and picks sensible defaults | | *"Can I see it first?"* | Gives you a file that opens the draft on [Preview Your YAML](preview), as real cards | | *"Check this LCARdS config and fix it."* | Runs the same checker as [Check Your Config](config-checker) and explains each problem | | *"Restyle this to the LCARS design rules."* | Keeps your entities, controls and labels, rebuilds the dashboard with [Designing LCARS Screens](lcars-design), then lists what changed | ::: details More about designing with Claude - **Features you didn't know about:** each concept names the features that suit your devices, such as a yellow alert and a chirp when the door opens, a starfield that speeds up with the fan, or a schematic of your house with a light switch in every room. - **After the build:** Claude checks its YAML with the config checker before handing it over, and adds a few ideas for later. - **Restyling:** Claude asks about anything the YAML doesn't settle (the look, how colours work, the schematic's leader style), then grades the result against the guide's [Check a screen](lcars-design#check-a-screen) list. - **Screenshots:** when Claude can reach your Home Assistant and a browser (for example Claude Code with ha-mcp and a browser tool), it can offer to put the draft on a separate dashboard and show you a screenshot. ::: ## In Claude Code **The plugin adds an automatic check and three commands.** | Feature | What it does | |---|---| | Automatic check | Runs the config checker whenever Claude writes a YAML file with LCARdS cards in it; Claude fixes what it reports before handing the file over | | `/lcards:check` | Checks a file or pasted YAML and explains each problem | | `/lcards:dashboard` | Designs a whole dashboard with you: a few questions to pick from, then two or three concepts side by side with a layout sketch each, then the YAML | | `/lcards:issue` | Helps you write a bug report or feature request: checks your config first, cuts your YAML down to a small example, then gives you a draft to paste into the GitHub form (you submit it) | ## Give Claude your home's context (ha-mcp) **The community [ha-mcp](https://github.com/homeassistant-ai/ha-mcp) server connects Claude to your Home Assistant, so it can look up your setup instead of asking.** - Claude sees your areas and floors (to group a dashboard by room), your entities and their states (so it uses your real ids), and what each device is (to pick the right card). - Then ask, for example, *"Build an LCARdS engineering dashboard for the devices in my garage."* ::: warning ha-mcp is not part of LCARdS It is a separate community project that can also change your Home Assistant. To let Claude only read your setup, turn on its **Read Only Mode**, or append `/readonly` to the server address. Set it up with [its own instructions](https://github.com/homeassistant-ai/ha-mcp). ::: ## With other assistants **Other assistants don't get the skill's conversation, previews or checker: attach the option list for your card, and expect more rounds than with Claude.** 1. **Download the option list for your card**, for example [`lcards-button.json`](/schema/cards/lcards-button.json). Every card is listed in [`schema/index.json`](/schema/index.json). 2. **Attach it** to your chat and paste this first: ``` I'm writing YAML for LCARdS, a custom Home Assistant card system. The attached JSON Schema lists every option. Only use options from the schema. If something I ask for isn't there, tell me instead of inventing a key. ``` 3. **Describe the card you want**, then [check what it wrote](#check-what-it-wrote). ## Check what it wrote **Check any YAML an assistant wrote before it goes on a dashboard.** - Paste it into [Check Your Config](config-checker). It runs in your browser and points at each problem. [Preview Your YAML](preview) shows it as real cards. - Prefer the command line? Download [`lcards-validate.mjs`](/tools/lcards-validate.mjs) and run `node lcards-validate.mjs my-dashboard.yaml` (Node.js 20 or newer). - If the assistant still makes things up, paste the checker's results back into the chat, ask it to fix exactly those lines, and remind it to re-read the attached schema instead of guessing. ## Additional Context **More you can attach for a tool without the skill: the schemas, docs pages and a longer prompt.** Claude with the skill already has all of it. ::: details What else you can attach **Schemas** - **One card at a time (smallest):** the card's file from [`schema/index.json`](/schema/index.json), plus the shared files its entry lists under `uses` (rules, animations, background animations, state colours, filters). Card files are under 100 KB; attach only the shared files your request touches. - **Everything in one file:** [`lcards-schema.json`](/lcards-schema.json) holds every card, the [Layout View](../cards/layout-view/) and the LCARS shell strategy. It is about 800 KB, so it suits tools with large context windows. - Each GitHub release carries both (`lcards-schema.json`, `lcards-schema.zip`), plus the skill and the checker, matching that release exactly. **Docs pages** - [Common Properties](../cards/common) explains what the schema can't: entity references, the `theme:` prefix, `{{ }}` templates and actions. - The card's own page (for example [Button](../cards/button/) or [Chart](../cards/chart/)) has worked examples. - Tools that read [`llms.txt`](/llms.txt) find everything from there. [`llms-full.txt`](/llms-full.txt) is all the user docs in one file. **MSD** The MSD schema (`custom:lcards-msd-card`) is large and deeply nested. Attach [`lcards-msd-card.json`](/schema/cards/lcards-msd-card.json) with the shared files it uses, plus the [MSD Getting Started](../cards/msd/quick-start) or [Line Routing](../cards/msd/routing) page, and expect a few more rounds than for a single button. **Longer prompt template** ``` I'm writing YAML configuration for LCARdS, a custom Home Assistant Lovelace card system. I've attached its JSON Schema (from https://lcards.unimatrix01.ca/schema/index.json) and reference docs. Rules: - Only use properties that appear in the schema for the card type I'm using (resolve "#/$defs/..." refs within the file, and "../shared/.json" refs against the shared files I attached). - Do not invent properties. If something I ask for isn't in the schema, tell me instead of guessing at a plausible-sounding key. - Colour values must match the schema's colour pattern: hex, rgb()/rgba()/ hsl()/hsla(), var(--name), or a theme:path token (e.g. theme:colors.ui.primary). ``` ::: --- # Bring It to Life **A laid-out screen comes to life when it reacts: these three examples recolour a card at a threshold, chart a smoothed live reading, and switch the whole screen into alert mode.** Each is a small, working piece to copy into your own screen; the linked pages cover the rest of each feature. ## A status that changes colour at a threshold **A rule on the card itself recolours it as a reading climbs: the card's `id` is the rule's target, and the higher `priority` wins when both rules match.** Drag the temperature under the card past 60 and then 80. - See [Rules](../core/rules/) for other conditions (time ranges, templates, `all`/`any`) and for restyling other cards by tag. ```yaml live controls type: custom:lcards-button id: reactor_status entity: sensor.reactor_temperature preset: lozenge text: label: content: "REACTOR {{ states('sensor.reactor_temperature') | int }} °C" show: true rules: - id: reactor-hot priority: 20 when: entity: sensor.reactor_temperature above: 80 apply: overlays: reactor_status: style: card: color: background: var(--lcars-alert-red) - id: reactor-warm priority: 10 when: entity: sensor.reactor_temperature above: 60 apply: overlays: reactor_status: style: card: color: background: var(--lcars-alert-yellow) ``` ## A smoothed live reading with its history **A [data source](../core/datasources/) keeps an entity's recent values and runs processors over them: chart the raw and smoothed values together, and show the smoothed one in any text.** - On the chart, each `sources` entry with `datasource:` plots the data source; `buffer` picks a processor's result instead of the raw values. - Data source names are shared across the dashboard, so a button elsewhere can read the source the chart defines as `{ds:deck_temp.smoothed:.1f}`. `{ds:deck_temp}` without a format shows the raw value with its unit. ```yaml live type: custom:lcards-chart data_sources: deck_temp: entity: sensor.deck_temperature history: hours: 6 processing: smoothed: type: smooth method: exponential alpha: 0.3 sources: - datasource: deck_temp name: Raw - datasource: deck_temp buffer: smoothed name: Smoothed ``` This button reads the data source the chart defines, so it needs the chart on the same dashboard (it is a plain block for that reason): ```yaml type: custom:lcards-button preset: lozenge text: label: content: "DECK {ds:deck_temp.smoothed:.1f} °C" # the data source defined on the chart show: true ``` ## A screen that follows alert mode **LCARdS cards already recolour themselves when an [alert mode](../core/alert-mode) is active; add buttons that raise and clear an alert, and an overlay for the full-screen effect.** The buttons run the `lcards.*` [actions](../configuration/ha-actions): tap RED ALERT here and this page goes to red alert. - Automations can react to the alert level too: `input_select.lcards_alert_mode` always holds the current mode. ```yaml live type: custom:lcards-layout-card layout: grid-template-columns: 1fr 1fr grid-template-rows: 56px grid-gap: 6px cards: - type: custom:lcards-button preset: lozenge text: label: content: RED ALERT show: true tap_action: action: perform-action perform_action: lcards.red_alert - type: custom:lcards-button preset: lozenge text: label: content: STAND DOWN show: true tap_action: action: perform-action perform_action: lcards.clear_alert ``` Add the [alert overlay](../cards/alert-overlay/) once to the view: it covers the screen with the alert symbol while an alert is active. Here it shows on a mock screen; pick a condition to see it. ```yaml live type: custom:lcards-alert-overlay ``` --- # Build by Hand **Go from single cards to a whole LCARS screen: pick the cards for each job, then lay them out on a layout view.** For quicker routes (a generated dashboard, LCARS sections, a sample to copy) see [Building a Dashboard](building-dashboards). ## Pick the cards **Each LCARS job has a card: elbows for the frame, buttons for blocks and labels, sliders for levels, and a layout view for the screen itself.** | You want | Use | Notes | |---|---|---| | The LCARS frame: corners, bars, headers | [Elbow](../cards/elbow/) | `header-left`/`footer-left` corners, `frame` for a full border; text labels sit on the bars | | Buttons, labels, status pills | [Button](../cards/button/) | Presets for the classic shapes; `component: dpad` or `alert` for the D-pad and the alert symbol | | A value you can set or read at a glance | [Slider](../cards/slider-card/) | Pills, gauges, shaped and Picard styles; read-only on sensors | | Pick one of several options | [Select Menu](../cards/select-menu/) | One button per `input_select \| select` option | | Rows of readings | [Data Grid](../cards/data-grid/) | Entities, templates and data sources in a table; decorative mode for LCARS number blocks | | History | [Chart](../cards/chart/) | Entity history, statistics or data sources | | A ship or floor plan with live controls | [MSD](../cards/msd/) | Cards placed on an SVG, wired with routed lines | | A full-screen alert | [Alert Overlay](../cards/alert-overlay/) | Shows over the view while an alert mode is active | | The screen itself | [Layout View](../cards/layout-view/) | A CSS grid for the whole view; [Layout Card](../cards/layout-card/) for a grid inside one area | ::: info Using `custom:layout-card`? LCARdS has its own [Layout Card](../cards/layout-card/) and [Layout View](../cards/layout-view/): the same grid keys, with a visual editor and more. LCARdS cards inside `custom:layout-card` can shrink and lose their margins, and moving over is a one-line change: see [Sizing inside `custom:layout-card`](../cards/common#inside-custom-layout-card). ::: ## Lay out the screen **Build the view on a [Layout View](../cards/layout-view/): name the regions in `grid-template-areas`, then put each card in one with `view_layout.grid-area`.** The example is one view: in a dashboard's raw configuration it goes in the `views:` list. - **Match the frame to the sidebar.** Give the header and footer elbows a `bar_width` equal to the sidebar column, so the bars line up with the buttons below. - **Use `minmax(0, 1fr)`, not `1fr`,** for columns and rows that hold a chart, an MSD or a grid. A plain `1fr` can't shrink below its content, and the view overflows the screen. - **Give button rows fixed heights** (`54px`), and the area that should take the rest a flexible track (`minmax(0, 1fr)`). ```yaml live title: Bridge path: bridge type: custom:lcards-layout-view layout: # fill the screen below Home Assistant's toolbar (the default) height: calc(100dvh - var(--header-height, 56px)) padding: 12px grid-gap: 6px grid-template-columns: 170px minmax(0, 1fr) grid-template-rows: 64px 54px 54px minmax(0, 1fr) 64px grid-template-areas: | "header header" "nav1 main" "nav2 main" "filler main" "footer footer" cards: - type: custom:lcards-elbow elbow: type: header-left segment: bar_width: 170 # the same width as the sidebar column bar_height: 22 view_layout: grid-area: header - type: custom:lcards-button preset: lozenge text: label: content: LIGHTS show: true view_layout: grid-area: nav1 - type: custom:lcards-button preset: lozenge text: label: content: DOORS show: true view_layout: grid-area: nav2 # fill leftover space instead of leaving a hole in the frame - type: custom:lcards-button preset: panel-dark min_height: 0 view_layout: grid-area: filler # the main area: a chart, an MSD or a data grid - type: custom:lcards-data-grid data_mode: decorative view_layout: grid-area: main - type: custom:lcards-elbow elbow: type: footer-left segment: bar_width: 170 bar_height: 22 view_layout: grid-area: footer ``` ::: details More about laying out cards - **Some cards draw to their cell's height:** the D-pad, the alert symbol, Picard and shaped sliders. Give them a cell whose height suits them; a tall cell makes a D-pad wider than its column. `justify-self: center` in `view_layout` centres one in a wide area. - **Data grids stretch their rows** to fill the area. Set `grid-auto-rows` (and `align-content: start`) under the card's `grid:` for a compact table. - **Lozenge buttons hide their label** by design; set `text.label.show: true` when the button should say something. For a title on an elbow, set its `position` (for example `bottom-right`) and a `color`. - **Fill leftover space** with a `panel-dark` button or a decorative data grid instead of leaving holes in the frame. ::: ## Check it **Something not working? You can check your config by pasting it into [Check Your Config](config-checker).** It will show you invalid keys and configuration values against LCARdS schema. When the screen is laid out, [Bring It to Life](bring-it-to-life) shows it reacting to your home. --- # Building a Dashboard **There are five routes to an LCARS dashboard, from a screen LCARdS builds in a minute to one you lay out card by card.** Start with the quickest that fits: anything LCARdS generates can be taken over and edited later. | Route | What you get | Where | |---|---|---| | [Generate a dashboard](#generate-a-dashboard) | A whole LCARS screen for your rooms that keeps itself up to date | [Dashboard Strategies](dashboard-strategies) | | [Add LCARS sections](#add-lcars-sections) | Readings, gauges and controls for an area, on any sections dashboard | [Section Strategies](section-strategies) | | [Design it with AI](#design-it-with-ai) | A screen planned with you for your own entities, YAML checked before you paste it | [Getting AI Help](ai-assistance) | | [Borrow a layout](#borrow-a-layout) | A finished sample screen to copy from | [Dashboard Gallery](dashboard-gallery) | | [Build it by hand](#build-it-by-hand) | Every card chosen and placed yourself | [Build by Hand](build-by-hand), then [Bring It to Life](bring-it-to-life) | ## Generate a dashboard **A dashboard strategy draws a whole LCARS screen from a few settings: pick LCARS Dashboard in Home Assistant's Add dashboard dialog and it fills itself.** See [Dashboard Strategies](dashboard-strategies). - It rebuilds itself as you add, rename or move areas, devices and entities, so it never goes stale. - To change its cards, take control: Home Assistant keeps what the strategy made as an ordinary dashboard you can edit. ## Add LCARS sections **Section strategies add LCARS building blocks to Home Assistant's sections dashboards: readings, gauges and controls for an area, in the classic or Picard look.** See [Section Strategies](section-strategies). - They sit beside your own sections and Home Assistant's, so you can try LCARdS on a dashboard you already have. - Each section rebuilds itself for its area; take control of one to edit its cards. ## Design it with AI **Claude with the LCARdS skill plans a dashboard with you and writes the YAML: describe the screen you want, pick from the concepts it shows, and it checks the result before you paste it.** See [Getting AI Help](ai-assistance). - In Claude Code, `/lcards:dashboard` runs the whole conversation: a few questions, two or three concepts with a layout sketch each, then the YAML. - It uses your real entity ids: tell it them, or connect it to Home Assistant with [ha-mcp](ai-assistance#give-claude-your-home-s-context-ha-mcp). ## Borrow a layout **The [Dashboard Gallery](dashboard-gallery) has sample screens, each a whole view with its YAML and a recording.** Copy a layout or a part of one, then point it at your own entities. - The samples use test helpers and hand-picked colours: read the gallery's note on colours before you copy one. ## Build it by hand **For a screen that is exactly yours, pick a card for each job and lay them out on a layout view.** [Build by Hand](build-by-hand) walks through it: which card does what, and how to lay out the grid. - [Bring It to Life](bring-it-to-life) then shows a screen reacting: a colour that changes at a threshold, a smoothed live reading with its history, and a screen that follows alert mode. ## Help along the way **The design guide, the AI skill and the config checker help on every route.** - [Designing LCARS Screens](lcars-design) covers the look: colour roles, frames, screen shapes and ready-made patterns. - Claude with the [LCARdS skill](ai-assistance) helps on any route too: a card for one job, a fix for YAML that misbehaves, a section of a screen. - [Check Your Config](config-checker) shows invalid keys and values in any LCARdS YAML. --- # Coming from CB-LCARS **LCARdS grew out of, and supersedes, the [CB-LCARS](https://github.com/snootched/cb-lcars) project: most of its features are here, rebuilt, and the table below gives the LCARdS equivalent of each card.** - CB-LCARS was based on [Custom Button Card](https://github.com/custom-cards/button-card); LCARdS is built from scratch with Lit and needs no other custom cards. ::: tip You can run both at once CB-LCARS and LCARdS can coexist while you move over. New features and fixes go into LCARdS only. The configuration formats differ, so card configs don't carry over directly. ::: ## Feature Comparison **Each CB-LCARS card or feature and its LCARdS equivalent.** ✅ Present | ❌ Not present | ⚠️ Partial | Feature | CB-LCARS | LCARdS | Notes | |---|:---:|:---:|---| | Buttons | ✅ `cb-lcars-button-card` | ✅ `lcards-button` | Built-in `preset` collection provides the standard LCARS button styles, which are completely configurable. | | Multi-Segment Buttons | ❌ | ✅ `lcards-button` | Allows complex button designs (known as `component`) to be used as advanced multi-segment/multi-touch controls, configured via `segments`. | | DPAD | ✅ `cb-lcars-dpad-card` | ✅ `lcards-button` | First advanced button to use the `component` feature of `lcards-button`. | | ALERT | ⚠️ background animation | ✅ `lcards-button` | Promoted to a button card component: allows full interactive configuration. | | Labels | ✅ `cb-lcars-label-card` | ✅ `lcards-button` | Label functionality is available via `lcards-button`. Additional presets available for text labels with or without decoration. | | Elbows | ✅ `cb-lcars-elbow-card` | ✅ `lcards-elbow` | Equivalent in LCARdS: enhanced with more corner styles (e.g. straight cut with configurable angles). | | Double Elbows | ✅ `cb-lcars-double-elbow-card` | ✅ `lcards-elbow` | Double Elbow functionality is now consolidated into a single unified `lcards-elbow` card. | | Sliders | ✅ `cb-lcars-multimeter-card` | ✅ `lcards-slider` | Completely replacing the former multimeter card. Vastly improved: configurable direction, inversion, display min/max, control min/max, and more. | | Cascade Data Grid | ⚠️ background animation | ✅ `lcards-data-grid` | CB-LCARS provided a decorative-only version as a background animation. `lcards-data-grid` is a full-featured grid that can show real entity data, text, etc. Decorative mode is still available. | | Text | ✅ `cb-lcars-text-card` | ✅ `lcards-button` | Text-only button presets, or text fields on any card. | | Picard-style controls | ✅ `cb-lcars-picard-card` | ✅ `lcards-elbow`, `lcards-slider` | Segmented (double) elbows and frames on `lcards-elbow`; the `picard` slider component with the `picard-gauge-vertical` preset; `filled` and `outline` button presets. | | Layouts | ⚠️ `custom:layout-card` (separate install) | ✅ `lcards-layout-card`, `lcards-layout-view` | LCARdS has its own grid layouts with visual editors. Replace `custom:layout-card` with `lcards-layout-card`: change the `type` and remove `layout_type`; the `layout` and `view_layout` keys stay the same. See [Layout Card](../cards/layout-card/). | | Select menu | ❌ | ✅ `lcards-select-menu` | A grid of buttons for an `input_select` or `select` entity. | | card-mod | ⚠️ required | ✅ not needed | LCARdS needs no other custom cards or card-mod. | | Charts / Graphs | ❌ | ✅ `lcards-chart` | Embedded ApexCharts library providing 15+ chart types to plot entity/data. | | MSD (Master Systems Display) | ❌ | ✅ `lcards-msd-card` | Full MSD system in a card. Embed controls, connect routing lines, add animations to reflect statuses. | | Background Animations | ✅ GRID, ALERT, GEO Array, Pulsewave | ⚠️ ✅ | Background animations split into stackable layers: mix and match building blocks. ✅ GRID (enhanced), ✅ ALERT (button component), ✅ Starfield & Nebula (enhanced). ⚠️ GEO Array, Pulsewave (pending). | | Element Animations | ❌ | ✅ | Embedded Anime.js v4 enabling animation of any SVG element (cards, lines/stroke, text, etc.). | | Symbiont (embedded cards) | ✅ | ✅ | In the [elbow card](../cards/elbow/symbiont): embeds any card and imprints the elbow's colours and font on it. `custom_style` adds your own CSS without UIX, and a `uix` block on the embedded card is passed through. | | State-based Styling / Custom States | ✅ | ✅✅ | CB-LCARS has a limited set of states. LCARdS uses common state groupings (`default` \| `active` \| `inactive` \| `unavailable`) plus the ability to define ***any state*** for customised styling. Integrates with the core rules engine for hot-patching. | | Sounds | ❌ | ✅ | Customisable sounds for many UI and card event types (tap, double tap, hold, hover, sidebar expand/collapse, and more). | | Alert Overlay | ❌ | ✅ `lcards-alert-overlay` | Dashboard-level card that reacts to `input_select.lcards_alert_mode` and displays a full-screen configurable backdrop with an embedded content card. | ## Moving a Card Over **Rebuild each CB-LCARS card as its LCARdS card: keep the entity and actions, pick the matching preset or elbow type, then carry the label, colours and sizes across.** The tables below give the usual matches; anything not listed has no direct equivalent, so restyle it with the card's own options. - **Card and template:** `type: custom:cb-lcars--card` with `cblcars_card_type` (the template) becomes one LCARdS card type with a `preset` (buttons) or an `elbow.type` (elbows). - **Settings:** `cblcars_card_config` holds the CB-LCARS settings (`entity`, `label`, actions and the template `variables`). In LCARdS they sit at the top level of the card. - **Sizing:** `layout_options` (`grid_columns`, `grid_rows`) becomes Home Assistant's own `grid_options` (`columns`, `rows`). - **Colours:** use theme colours (`var(--lcars-...)` or `theme:` tokens) and LCARdS state maps (`active`, `inactive`, `unavailable` and any state). See [Colours](../core/colours). - **Ask an assistant:** with the [LCARdS skill](ai-assistance) loaded, paste a CB-LCARS dashboard and ask for it in LCARdS: it keeps your entities and actions, rebuilds each card and lists what has no equivalent. ```yaml no-validate # CB-LCARS type: custom:cb-lcars-button-card cblcars_card_type: cb-lcars-button-lozenge cblcars_card_config: entity: light.kitchen label: KITCHEN show_label: true layout_options: grid_columns: 2 grid_rows: 1 ``` ```yaml # LCARdS type: custom:lcards-button preset: lozenge entity: light.kitchen text: name: content: KITCHEN show: true grid_options: columns: 6 rows: 1 ``` ::: details Templates and their LCARdS matches | CB-LCARS (`cblcars_card_type`) | LCARdS | |---|---| | `cb-lcars-button-lozenge`, `-right` | `lcards-button`, `preset: lozenge`, `lozenge-right` | | `cb-lcars-button-bullet`, `-right` | `lcards-button`, `preset: bullet`, `bullet-right` | | `cb-lcars-button-capped`, `-right` | `lcards-button`, `preset: capped`, `capped-right` | | `cb-lcars-button-picard`, `-right` | `lcards-button`, `preset: outline`, `outline-right` | | `cb-lcars-button-picard-filled`, `-right` | `lcards-button`, `preset: filled`, `filled-right` | | `custom:cb-lcars-label-card` | `lcards-button`, `preset: text-only`, or a `bar-label-*` preset for a label in a bar (`cb-lcars-label-picard-square`: `bar-label-square`) | | `cb-lcars-header`, `-right`, `-open`, `-contained` | `lcards-elbow`, `elbow.type: header-left`, `header-right`, `header-open`, `header-contained` | | `cb-lcars-footer`, `-right`, `-open`, `-contained` | `lcards-elbow`, `elbow.type: footer-left`, `footer-right`, `footer-open`, `footer-contained` | | `cb-lcars-header-picard`, `cb-lcars-footer-picard` (double elbow card) | `lcards-elbow`, `elbow.style: segmented` with the matching `elbow.type` | | `cb-lcars-slider`, `cb-lcars-slider-gauge` (multimeter, slider cards) | `lcards-slider`, `preset: pills-basic`, `gauge-basic` (Picard: `picard-gauge-vertical`) | | `cb-lcars-cascade` | `lcards-data-grid` (decorative mode) | | `custom:cb-lcars-dpad-card` | `lcards-button`, `component: dpad` | | `custom:layout-card` | `lcards-layout-card` (see the table above) | ::: ::: details Settings and their LCARdS keys | CB-LCARS | LCARdS | |---|---| | `cblcars_card_config.entity` | `entity` | | `label` with `show_label: true` | `text.name.content` with `show: true` (lozenge, bullet, capped, outline, filled); `text.label.content` on the bar-label and panel presets | | `tap_action`, `hold_action`, `double_tap_action` | the same keys: see [Actions](../core/actions) | | `variables.card.color.default`, `active`, `inactive`, `unavailable` | `style.card.color.background` with the same state keys | | `variables.text.label.color` | `text..color`, a colour or a state map | | `variables.text.label.font_size`, `font_weight` | `text..font_size`, `font_weight` | | `variables.card.border.left.size`, `top.size` (elbows) | `elbow.segment.bar_width`, `bar_height` | | `variables.card.border.top.left_radius` (elbows) | `elbow.segment.outer_curve` | | `variables.card.border.color` (elbows) | `elbow.segment.color` | | `layout_options.grid_columns`, `grid_rows` | `grid_options.columns`, `rows` (the old grid had 4 columns, the new one 12: multiply the columns by 3) | | `card_mod` | not needed: use the card's own style keys, or UIX for anything else | ::: --- # Check Your Config **Paste your YAML below to find what LCARdS won't understand: options that don't exist, misspelt names and values of the wrong kind.** A config LCARdS doesn't understand is mostly ignored without a word, so a typo often looks like a bug. - **Works with** one card, a view, or a whole dashboard: it finds every LCARdS card in it, at any depth. - **Private:** this page runs in your browser, and nothing is sent anywhere. ## Where to get your YAML **Copy it from a card's code editor or from the dashboard's raw configuration.** - **One card:** open the card editor and switch to its **YAML** tab, then copy everything. - **A whole dashboard:** **Edit dashboard > ⋮ > Raw configuration editor**, then copy everything. ## Reading the results **Errors are things LCARdS rejects or ignores; warnings are names it doesn't know and other likely mistakes.** Each result shows the option's path and line, and links to the docs for that option. - **Errors:** invalid values, keys LCARdS doesn't have, an MSD with nothing to draw on. Fix these. - **Warnings:** a preset, animation, sound or theme token LCARdS doesn't have, or a misspelt `var(--lcars-*)` or `var(--lcards-*)` colour, almost always a typo; the checker suggests the closest match. A name from a content pack of your own also shows as a warning, and is fine. - **Fonts:** an `lcards_*` font LCARdS doesn't have warns, with the closest match; your own fonts (`lcards_user_`, from LCARdS Config > Fonts) pass. A [bring-your-own font](../configuration/fonts#bring-your-own-fonts) gets an **info** note: it shows Antonio until you add its file in LCARdS Config > Fonts. Info notes are not mistakes. - A warning about an older chart or data grid format means the config still works but can be updated. - **Missing animation params:** some animation presets do nothing without certain params, such as `color-shift` without `color_from` and `color_to`; the warning names the ones to add. - **Cut-off values:** in YAML a `#` after a space starts a comment, so an unquoted `color: var(--lcars-alert-red, #cc0000)` reads as `var(--lcars-alert-red,`. A value that ends in a comma, or opens a CSS function it never closes, warns: put the whole value in quotes. ## Pasting into Home Assistant's code editor **Home Assistant's own code editor reads a few unquoted words as `true` or `false`, so quote them there.** That is the editor in a card dialog's **Show code editor** and the raw configuration editor. - `y`, `yes` and `on` become `true`, and `n`, `no` and `off` become `false`, in any case. So `y: 20` arrives as `true: 20`, and `label: N` as `label: false`. - Quote them: `"y": 20`, `label: "N"`. The checker warns about each one (**Home Assistant's code editor reads...**). - Numbers written with a leading zero lose it: `value: 08` shows 8 (and `010` becomes 8 in Home Assistant's editor). Quote codes like these, `value: '08'`; the checker warns about them too. - The LCARdS editor's own **YAML** tab reads them as written. ## Other ways to check **The same checker runs in Claude, on the command line and in the card editors.** - **Ask Claude:** with the [LCARdS skill](ai-assistance#with-claude-easiest) loaded, paste your YAML and ask *"check this LCARdS config and fix it"*. Claude runs this same checker, explains each problem and gives you the corrected YAML. - **Command line:** download [`lcards-validate.mjs`](/tools/lcards-validate.mjs) and run `node lcards-validate.mjs my-dashboard.yaml` (Node.js 20 or newer). `--json` gives machine-readable output, `--strict` makes warnings fail too, and `-` reads the YAML from standard input. It also reads Home Assistant's `.storage/lovelace*` files. - **In Home Assistant:** each LCARdS card editor shows schema problems at the top as you edit, and its **YAML** tab checks against the full schema, with lookups, as you type. --- # Dashboard Gallery **Sample screens that show LCARS layouts and the look, each a whole view built from LCARdS cards on a [Layout View](../cards/layout-view/).** Each was recorded in Home Assistant while its entities change (lights switch, levels move, alerts sound). Borrow layouts and sections from them; to build your own dashboard, the [LCARdS skill](ai-assistance) composes one for your entities. - The dashboards use `lcards_test_*` helpers and one temperature sensor, `sensor.desk_sensor_temperature`. The [Live Demo](live-demo#in-your-own-home-assistant) page has the YAML that creates those helpers, if you want to try a dashboard unchanged first. ::: warning The colours are picked by hand With test helpers there are no real states to colour by, so every block and button in these samples is given a theme role by hand, including its on and off colours. That shows the look, but it is not how a working dashboard is usually coloured: there, controls bound to your entities normally take the theme's state colours, and copying the hand-picked colours means removing them from every card later. Decide first; see [Setting the Colours](lcars-design#setting-the-colours). ::: To use one: 1. Create a dashboard (**Settings > Dashboards > Add dashboard**), open it, then **Edit dashboard > Raw configuration editor**. 2. Paste the YAML and save. 3. Replace the `lcards_test_*` helpers and the sample temperature sensor with your own entities. 4. If something doesn't work, paste your version into [Check Your Config](config-checker). ## Bridge A classic [display over controls](lcars-design#screen-archetypes) in the LCARS TNG theme. A thick sweep carries labelled segments and the title; the display charts power and shields (hourly averages) in a thin nested sweep, beside a ship status [readings table](lcars-patterns#readings-table) and a live warp factor. The display's sidebar sweeps into a closing bar, and the next bar sweeps down into a control deck: [pill groups](lcars-patterns#pill-grid-classic) led by big live numbers whose pills set levels or switch helpers, a power slider and shield gauge, main lights, a mode [select menu](../cards/select-menu/) and red alert. The YAML is `bridge.yaml`: in the LCARdS skill `references/gallery/bridge.yaml`, in the repository https://github.com/snootched/lcards/blob/main/doc/gallery/dashboards/bridge.yaml ## Engineering The [master systems display](lcars-design#screen-archetypes) in the Picard look. The built-in NCC-1701-A blueprint fills the screen as a dimmed [MSD](../cards/msd/) schematic, ringed by shield arcs that turn from blue to yellow below 50% and red below 20%. Eight callouts above and below the ship are small blocks joined to the ship's own markers by routed lines; four of them switch helpers and their labels carry live readings. Around it: a [code-block column](lcars-patterns#code-block-column) with power and shield gauges, [utility pills](lcars-patterns#utility-pills), a systems table with [flagged blocks](lcars-patterns#flagged-blocks), a mode selector, and toggle tabs over readings tables. The YAML is `engineering.yaml`: in the LCARdS skill `references/gallery/engineering.yaml`, in the repository https://github.com/snootched/lcards/blob/main/doc/gallery/dashboards/engineering.yaml ## Environmental A [data screen](lcars-design#screen-archetypes) in the Picard look. The upper band holds a climate and a life support [readings table](lcars-patterns#readings-table) and the title, with toggle tabs and a shaped slider for the cabin set point under them. Two thin sweeps meet at a segmented band; under it a 24-hour temperature trace fills the display, beside a humidity [gauge column](lcars-patterns#gauge-bank) with dry, nominal and humid bands and a sidebar of code blocks with set point and ambient gauges. The YAML is `environmental.yaml`: in the LCARdS skill `references/gallery/environmental.yaml`, in the repository https://github.com/snootched/lcards/blob/main/doc/gallery/dashboards/environmental.yaml ## Security A classic [sweep console](lcars-design#screen-archetypes) in the LCARS Classic theme. One thick header sweep, with a sidebar of toggle blocks that sweeps into a segmented bottom bar, and the mode [select menu](../cards/select-menu/) in the title row. The camera group is a D-pad: left and right step a pan helper (a stand-in for a camera), and the pan value leads it as a big number. Pill rows switch the doors, exterior lights and intruder alert, point the camera and run the alert actions; four sector tiles take the accent while their sector is active, beside a sector status table and the screen's one number cascade. The YAML is `security.yaml`: in the LCARdS skill `references/gallery/security.yaml`, in the repository https://github.com/snootched/lcards/blob/main/doc/gallery/dashboards/security.yaml ## Alert mode A classic [display with side columns](lcars-design#screen-archetypes) in the LCARS Modern theme. Two sweeps face each other across the top and their arms run down both sides; the left arm's blocks raise and clear an [alert mode](../core/alert-mode) through the `lcards.*` [actions](../configuration/ha-actions) (red, yellow, blue, gray and black alert, and stand down). Between them is an everyday systems screen: a 24-hour chart with live readouts, a ship status [readings table](lcars-patterns#readings-table) and deck control pills led by live numbers. During an alert the whole view recolours, its own theme included, and the [alert overlay](../cards/alert-overlay/) covers it with the symbol for the alert: red, then yellow. The YAML is `alert.yaml`: in the LCARdS skill `references/gallery/alert.yaml`, in the repository https://github.com/snootched/lcards/blob/main/doc/gallery/dashboards/alert.yaml ## Operations A [switchable display](lcars-design#screen-archetypes): the frame, columns and strips stay while the centre changes. A [select menu](../cards/select-menu/) along the bottom picks one of three displays, each a card with a visibility condition: EPS power (a chart of hourly averages), the Enterprise as a hologram with leader-line callouts carrying live readings ([astrometrics](../cards/astrometrics/)), or a tactical polar plot. Around it: a [code-block column](lcars-patterns#code-block-column) with toggles, a ship status table over a [gauge bank](lcars-patterns#gauge-bank), readout bars and [utility pills](lcars-patterns#utility-pills). The YAML is `picard-operations.yaml`: in the LCARdS skill `references/gallery/picard-operations.yaml`, in the repository https://github.com/snootched/lcards/blob/main/doc/gallery/dashboards/picard-operations.yaml ## Sciences A [bracket screen](lcars-design#screen-archetypes) in the Picard look. Capped top and bottom bars in segments and a numbered sidebar of code blocks, three of which switch helpers. The readout fills the bracket in labelled sections: a 24-hour temperature history (the line and its hourly mean as steps) with a [readings table](lcars-patterns#readings-table), four ring gauges that set levels, a sensor log, and hourly means as columns. The YAML is `sciences.yaml`: in the LCARdS skill `references/gallery/sciences.yaml`, in the repository https://github.com/snootched/lcards/blob/main/doc/gallery/dashboards/sciences.yaml ## Generated from the Design Guide Sample screens composed from the [archetypes](lcars-design#screen-archetypes) in Designing LCARS Screens and the [LCARS Patterns](lcars-patterns), five Picard and five Classic. They show layouts to start from rather than finished dashboards: build your own with the [LCARdS skill](ai-assistance), swapping the decorative parts for your own controls and readings. Each starts from a different layout, so together they show how varied the same design language can be. Every colour is a theme role picked by hand (see the note at the top): they follow your HA-LCARS theme, and the classic ones set a classic theme on their view. ### Picard: display with side columns A Titan.DS inspired deck plan built as modules whose slots take a decorative part or a control: - [utility pills](lcars-patterns#utility-pills) in a bracket open on the left with gauge groups in its slot - one [display sweep](lcars-patterns#display-sweep) whose header bar turns down over a [code-block column](lcars-patterns#code-block-column) - a dimmed ship schematic with leader lines - a [gauge bank](lcars-patterns#gauge-bank) of `picard-gauge-column` sliders beside a column of flagged readings - [toggle tabs](lcars-patterns#toggle-tab-strip) with [readout rows](lcars-patterns#readout-rows) along the bottom. The YAML is `picard-console.yaml`: in the LCARdS skill `references/gallery/picard-console.yaml`, in the repository https://github.com/snootched/lcards/blob/main/doc/gallery/dashboards/picard-console.yaml ### Picard: display over controls A large ship side profile in one [display sweep](lcars-patterns#display-sweep), open on the right, over a deck of small parts: - a [labelled schematic](lcars-patterns#labelled-schematic) in the bracket style: three labels are live readings, one a fault - a LEADERS block that switches the leader lines between angled ones from labels above and below the ship and level ones from labels in two columns beside it - the sweep's bars running on as segments - a [code-block column](lcars-patterns#code-block-column) and a [gauge bank](lcars-patterns#gauge-bank) - [toggle tabs](lcars-patterns#toggle-tab-strip) over two [readings tables](lcars-patterns#readings-table) and a [selector strip](lcars-patterns#selector-strip) - one [number cascade](lcars-patterns#number-cascade-filler) - [flagged blocks](lcars-patterns#flagged-blocks) and [utility pills](lcars-patterns#utility-pills). The YAML is `picard-display.yaml`: in the LCARdS skill `references/gallery/picard-display.yaml`, in the repository https://github.com/snootched/lcards/blob/main/doc/gallery/dashboards/picard-display.yaml ### Picard: split screen A split header in the Picard style, two [segmented elbows](lcars-patterns#concentric-sweep) facing each other across a cut through the screen: - each elbow a thin outer band with a large curve round an inner block as wide as the block column, the band running on as labelled segments - utility pills inside the upper curve and [flagged blocks](lcars-patterns#flagged-blocks) inside the lower one - a [readings table](lcars-patterns#readings-table) and [readout rows](lcars-patterns#readout-rows) - a gauge pair beside toggle blocks - a [labelled schematic](lcars-patterns#labelled-schematic) of the ship - [fleet tiles](lcars-patterns#fleet-tiles). The YAML is `picard-split.yaml`: in the LCARdS skill `references/gallery/picard-split.yaml`, in the repository https://github.com/snootched/lcards/blob/main/doc/gallery/dashboards/picard-split.yaml ### Picard: portrait panel A screen for a phone or an upright tablet: - a [header bar](lcars-patterns#header-bar-with-a-title) with the title - a sweep down the left edge into a segmented closing bar - a [labelled schematic](lcars-patterns#labelled-schematic) of the ship - code blocks beside a condition [readings table](lcars-patterns#readings-table) - a [gauge bank](lcars-patterns#gauge-bank) beside signal readings - [utility pills](lcars-patterns#utility-pills) and toggle tabs. Recorded at 600 by 1000. The YAML is `picard-portrait.yaml`: in the LCARdS skill `references/gallery/picard-portrait.yaml`, in the repository https://github.com/snootched/lcards/blob/main/doc/gallery/dashboards/picard-portrait.yaml ### Picard: tile wall The [tile wall](lcars-design#screen-archetypes): nine sections of the Enterprise, each a framed tile built the same way: - deck code and name on the thick top bar - a [readings table](lcars-patterns#readings-table) on the left and a slot on the right - a control row at the bottom - slots that vary: setting gauges, a big live number, 12-hour charts, readout bars and a shield slider, a view selector, transporter pads, and the screen's one [number cascade](lcars-patterns#number-cascade-filler) - a frame that takes the accent while its section is active. Round the wall: - a shipwide summary under the header bar - a [code-block column](lcars-patterns#code-block-column) with a gauge pair - [utility pills](lcars-patterns#utility-pills) with an index whose blocks switch the live sections. The YAML is `picard-tiles.yaml`: in the LCARdS skill `references/gallery/picard-tiles.yaml`, in the repository https://github.com/snootched/lcards/blob/main/doc/gallery/dashboards/picard-tiles.yaml ### Classic: sweep console A helm-style console: - two thick [sweeps facing](lcars-patterns#facing-sweeps-header) across the top, their arms running down the middle as stacked coded blocks - on the left, four [pill groups](lcars-patterns#pill-grid-classic) led by big numbers: the first group's numbers are live levels its pills set, the second's pills switch helpers - a warp slider in the place of three pills - on the right, the title, a framed chart and a [readings table](lcars-patterns#readings-table) - the screen's one [number cascade](lcars-patterns#number-cascade-filler). The view sets `theme: LCARS Default`, so the roles come out in the TNG pastels whatever your profile theme is. The YAML is `classic-console.yaml`: in the LCARdS skill `references/gallery/classic-console.yaml`, in the repository https://github.com/snootched/lcards/blob/main/doc/gallery/dashboards/classic-console.yaml ### Classic: data screen The classic data screen: - an upper band with a sweep, the big title and a [pill group](lcars-patterns#pill-grid-classic) led by big numbers - a [readings table](lcars-patterns#readings-table) of the environment beside the screen's one small [number cascade](lcars-patterns#number-cascade-filler) - a divider of [segmented bars](lcars-patterns#segmented-bar-classic-arms) - a sidebar of blocks beside a long range scan ([astrometrics](../cards/astrometrics/)) with a bearing scale - a systems readings table. Every number is a labelled reading except the one cascade. The view sets `theme: LCARS Default`. The YAML is `classic-data.yaml`: in the LCARdS skill `references/gallery/classic-data.yaml`, in the repository https://github.com/snootched/lcards/blob/main/doc/gallery/dashboards/classic-data.yaml ### Classic: bracket screen A [bracket](lcars-patterns#bracket-frame-classic) round a shuttlecraft cutaway in colour: - the top bar running on as short coded segments into the title - a thick sidebar of coded blocks, two of which switch helpers - seven [labels on leader lines](lcars-patterns#labelled-schematic) pointing into the cutaway, five of them live - a ten-row [readings table](lcars-patterns#readings-table) beside it - three thin [readout rows](lcars-patterns#readout-rows) that set helpers - a pill group led by numbers. The view uses `theme: LCARS Zeldaar`. The YAML is `classic-bracket.yaml`: in the LCARdS skill `references/gallery/classic-bracket.yaml`, in the repository https://github.com/snootched/lcards/blob/main/doc/gallery/dashboards/classic-bracket.yaml ### Classic: list A duty roster screen: - a [split header](lcars-patterns#split-header-classic) whose two bars continue as segments - three short [readings tables](lcars-patterns#readings-table) up top: shifts, environment and helper states - a 14-row duty roster [list](lcars-patterns#list) coloured by shift, where the medical officer's status follows a helper - labelled counts on the right - four pill rows along the bottom whose first pills are toggles. The view uses `theme: LCARS Nemesis Blue`. The YAML is `classic-list.yaml`: in the LCARdS skill `references/gallery/classic-list.yaml`, in the repository https://github.com/snootched/lcards/blob/main/doc/gallery/dashboards/classic-list.yaml ### Classic: wings The [wings](lcars-design#screen-archetypes) layout: the Enterprise's warp propulsion, port and starboard nacelles round what they share: - two thick sweeps facing across the top and two thin ones closing the wings at the bottom - each wing the same module mirrored, its big numbers on the outer edge - per wing: the side's flow, [pill rows](lcars-patterns#pill-grid-classic) led by live numbers that set its levels and switch its injector and vent, its own readings table and a flow slider - port in wheat and starboard in blue throughout - in the centre, a chart of both flows in those colours over shared readings and a pill group that engages warp. The view uses the LCARS Nemesis Blue theme. The YAML is `classic-wings.yaml`: in the LCARdS skill `references/gallery/classic-wings.yaml`, in the repository https://github.com/snootched/lcards/blob/main/doc/gallery/dashboards/classic-wings.yaml --- # Dashboard Strategies **A dashboard strategy builds a whole dashboard for you from a few settings.** You pick it in Home Assistant's Add dashboard dialog, choose a few helpers, and LCARdS draws the screen. The dashboard stores only the settings, so it stays current as your home changes. - A strategy dashboard rebuilds itself when you add, rename or move areas, devices or entities. While it does, you can change its settings but not its cards. - To change the cards, **take control**: Home Assistant saves what the strategy made as an ordinary dashboard, and you edit it like any other. The strategy no longer runs after that. - LCARdS has one dashboard strategy so far, the [LCARS Dashboard](#lcars-dashboard). More are on the way. - For single sections that fill themselves inside your own sections dashboard, see [Section Strategies](section-strategies). | Strategy | In the Add dashboard dialog | What it builds | |---|---|---| | [`custom:lcars-shell`](#lcars-dashboard) | LCARS Dashboard | A full-screen LCARS frame with a page menu and a room light panel | ## Create a strategy dashboard **Strategy dashboards are created from Settings → Dashboards, like any other dashboard.** LCARdS must be installed and Home Assistant reloaded once, so the browser has loaded LCARdS. 1. Open **Settings → Dashboards** and select **Add dashboard**. 2. Under **Community dashboards**, pick **LCARS Dashboard**. 3. Pick the helpers for each setting (see [Helpers to create](#helpers-to-create)) and select **Next**. Every setting can stay empty: the room panel and the page menu then show a hint, and you can pick helpers later. 4. Give the dashboard a title and an icon, and select **Create**. ![The Add dashboard dialog: LCARS Dashboard under Community dashboards](/img/strategies/add-dashboard.webp) ::: details More about creating one - **Not in the list:** the Community dashboards heading appears only when the browser has loaded LCARdS. Reload the page (Ctrl+Shift+R) after installing or updating, and check that the LCARdS integration is set up under **Settings → Devices & services**. - **YAML dashboards:** a dashboard kept in a YAML file can use a strategy too: put the settings under `strategy:` at the top of the file, as in the [example below](#settings). ::: ## Change the settings **Open the dashboard, select the pencil, and the Edit dashboard dialog shows the strategy's settings.** Change a helper and the screen rebuilds when you save. ![The strategy's settings: room selector, page selector, top bar toggle and right sidebar toggle](/img/strategies/configure.webp) - The dialog's three-dot menu has **Edit in YAML**, which shows the settings as YAML, and **Take control** (see [Take control](#take-control)). - Only administrators see the pencil. ## When it rebuilds **Home Assistant rebuilds a strategy dashboard when your areas, devices, entities or floors change, and when you change its settings.** You don't need to reload the page. - Adding a light to an area, renaming an area or creating a new one shows up on the screen within a moment. - Changing a state (turning a light on, picking a room) doesn't rebuild anything. The cards follow states themselves, so the screen stays fast. - A helper you rename or delete has to be picked again in the settings. ## Take control **Take control turns the strategy's output into an ordinary dashboard you can edit.** Use it when you want to fill the frame with your own cards, move parts or change colours. - Select the pencil, then **Take control** in the Edit dashboard dialog's three-dot menu. Home Assistant asks you to confirm, then saves every card the strategy made. - After that the dashboard no longer rebuilds: new areas and lights don't appear by themselves. Create a new strategy dashboard if you want both. - The LCARS Dashboard is one [layout view](../cards/layout-view/), so after taking control you edit it with the layout view's own editor. ## LCARS Dashboard **`custom:lcars-shell` draws a full-screen LCARS frame: corner sweeps, header and footer bars, a page menu on the left and a room light panel in the middle.** It is a starting point: the header, the top bar and the right sidebar hold placeholder labels for you to replace after you [take control](#take-control). ![The LCARS Dashboard: corner sweeps, a page menu of Alpha, Beta and Gamma on the left, a room panel listing two rooms with an orange and a blue lamp slider at their brightness, a header bar and a right sidebar](/img/strategies/lcars-shell.webp) - **Room light panel:** a list of rooms and, next to it, a slider for each light in the picked room. Tap a slider to toggle the light, hold it for its more-info dialog. A room without lights says so. - **Page menu:** the options of your page selector as buttons in the left sidebar. Picking one only sets the helper; nothing on the screen changes. After you take control, give your cards a Visibility condition on that helper to show them on one page. - **Top bar and right sidebar:** the two buttons under the top left corner toggle them, through two `input_boolean` helpers. Without the helpers the buttons are still drawn but do nothing; the top bar is left out and the right sidebar always shows. - An [alert overlay](../cards/alert-overlay/) sits over the top left corner and shows during an alert. ### Helpers to create **The shell reads up to four helpers; create them in Settings → Devices & services → Helpers → Create helper.** Each one is optional. | Setting | Helper | What to put in it | |---|---|---| | Room selector | Dropdown (`input_select`) or Text (`input_text`) | A Dropdown: one option per room, spelled exactly like the area's name (or its area id). A Text: nothing, the shell lists your areas and stores the one picked | | Page selector | Dropdown (`input_select`) | One option per page, for example `Main`, `Engineering`, `Sensors` | | Top bar toggle | Toggle (`input_boolean`) | Nothing; on shows the top bar | | Right sidebar toggle | Toggle (`input_boolean`) | Nothing; on shows the right sidebar | ### Room selector modes **The room selector decides where the room list comes from.** Pick a Text helper to list every area with no upkeep; pick a Dropdown to show only some rooms, in your own order. Both show the same light lists. - **A Dropdown (`input_select` or `select`):** its options are the rooms, in your order. Spell each option exactly like an area's name in Settings → Areas, labels & zones, capitals included (or use the area id). An option that matches no area shows "No lights in this room". New areas need a new option. - **A Text helper (`input_text`):** the room list is every area in Home Assistant, sorted by name, with its icon. Picking a room stores its area id in the helper. New areas appear on their own. - A light belongs to a room through its own area, or else its device's area. Hidden lights and lights with an entity category (configuration lights such as status LEDs) are left out. ### Settings **These are the keys of the dashboard's `strategy:` block; the settings dialog writes them for you.** The example is the whole dashboard config; **Edit in YAML** shows the lines under `strategy:`. It is a whole dashboard, so it can't render inside this page. ```yaml strategy: type: custom:lcars-shell room_selector_entity: input_select.lcars_room page_selector_entity: input_select.lcars_page top_bar_entity: input_boolean.lcars_top_bar right_sidebar_entity: input_boolean.lcars_right_sidebar ``` ::: details More about the LCARS Dashboard - **One view:** the dashboard has a single view at `//lcars`, a [layout view](../cards/layout-view/) sized to the screen. It is built from LCARdS cards only, so it needs no other custom cards. - **Narrow screens:** below 1010 px wide the gap before the right sidebar narrows to 1 px. - **Colours:** every colour comes from your theme's LCARS variables, so [alert modes](../core/themes/) recolour the frame. - **"Configuration error" in the room panel:** before 2026.11 the room lists used the auto-entities card from HACS, and without it each room showed this error. Since 2026.11 LCARdS reads the lights from your areas itself: update LCARdS and hard refresh the page (Ctrl+Shift+R). ::: | Key | Type | Default | Description | |---|---|---|---| | `type` | string | required | `custom:lcars-shell` | | `room_selector_entity` | string | - | An `input_select`, `select` or `input_text` that picks the room. Empty shows a hint in the room panel | | `page_selector_entity` | string | - | An `input_select` or `select` whose options become the page menu. Empty shows a hint in the sidebar | | `top_bar_entity` | string | - | An `input_boolean` that shows or hides the top bar. Empty leaves the top bar out | | `right_sidebar_entity` | string | - | An `input_boolean` that shows or hides the right sidebar. Empty keeps the sidebar shown | --- # Troubleshooting **Something not working? Work through these in order: most problems are a config typo or a setup issue, and both are quick to rule out.** ## 1. Check your config **Paste your card YAML (or the whole dashboard) into [Check Your Config](config-checker), and fix what it reports first.** A config LCARdS doesn't understand is mostly ignored without a word, which often looks like a bug. - It finds options that don't exist, misspelt preset, animation and colour names, and values of the wrong kind, each with its line and a suggestion. - Using Claude with the [LCARdS skill](ai-assistance#with-claude-easiest)? Paste the YAML and ask it to check and fix it. ## 2. Run the health check **Open the LCARdS Config panel in the sidebar, then Welcome > Support & system info.** Its checklist covers the most common causes of problems, each with a fix. - The resource and `extra_module_url` checks need an **admin** user. | Check | What it means | |---|---| | **Home Assistant version** | LCARdS requires Home Assistant **2026.11** or newer. | | **Integration responding** | The cards loaded but the LCARdS integration did not answer. Add or repair it under **Settings > Devices & services**, then restart. | | **Frontend = integration version** | If these differ, your browser is running a cached copy of an older LCARdS. Hard-refresh (Ctrl+Shift+R / Cmd+Shift+R), or clear the companion app's frontend cache. If you just updated, restart Home Assistant. | | **Safe or recovery mode** | Home Assistant started in safe or recovery mode, so custom integrations may not load. Restart it normally. | | **UI eXtension (UIX) / card-mod** | HA-LCARS styles Home Assistant through [UIX](https://github.com/Lint-Free-Technology/uix). **card-mod** no longer works with current Home Assistant and conflicts with UIX: uninstall it in HACS and remove its `extra_module_url` line from `configuration.yaml`. An HA-LCARS theme without UIX is flagged too. | | **card-mod in `extra_module_url`** | A leftover `frontend: extra_module_url` entry still loads card-mod. Remove it and restart. | | **custom:layout-card** | Shown when `custom:layout-card` is installed. LCARdS cards can shrink inside it; switch to the LCARdS [Layout Card](../cards/layout-card/). | | **Lovelace resources** | LCARdS loads itself through the integration. An old manually added resource (e.g. `/hacsfiles/lcards/lcards.js`) or a duplicate loads it twice. Remove extras under **Settings > Dashboards > ⋮ > Resources**. | | **HA-LCARS theme** | Shows whether an HA-LCARS theme is active. LCARdS works without it, but it is designed to pair with it. | ## 3. Common problems **Most reports come down to one of these.** - **Cards collapse or margins look wrong inside `custom:layout-card`:** use LCARdS's own [Layout Card](../cards/layout-card/) instead. Change the `type` to `custom:lcards-layout-card` and remove `layout_type`; the rest of the config stays the same. See [Sizing inside `custom:layout-card`](../cards/common#inside-custom-layout-card). - **Cards look out of date after an update:** hard-refresh the page (Ctrl+Shift+R / Cmd+Shift+R) or clear the companion app's frontend cache. - **Styling from card-mod stops working:** card-mod no longer works with current Home Assistant; HA-LCARS uses [UIX](https://github.com/Lint-Free-Technology/uix) instead. Remove card-mod. - **Moving over from CB-LCARS?** See [Coming from CB-LCARS](cb-lcars-migration) for the equivalent of each card. ## 4. Report an issue **Still stuck? Report an issue, in the same Support & system info section, opens a GitHub bug report with your versions and support info already filled in.** It also copies the full info to your clipboard. Review the form, describe the problem, add your card YAML, then submit: nothing is sent automatically. - **Copy support info** copies the same information, to paste into an existing issue or a [Discussion](https://github.com/snootched/LCARdS/discussions). - **Using Claude?** The [LCARdS skill](ai-assistance) helps you write the report (`/lcards:issue` in Claude Code): it checks your config first, cuts your YAML down to a small example, and gives you the text to paste. You submit it yourself. - **Want to fix it yourself?** See the [contributing guide](https://github.com/snootched/LCARdS/blob/main/CONTRIBUTING.md): open the issue first, then a pull request that links it. - Tick **Include data-source names & entity IDs** only if the problem involves data sources. - Expand **Preview what will be shared** to see exactly what is included: versions, browser, theme, UIX and card-mod status, integration options and the most recent LCARdS warnings. Those warnings can mention entity names, so review before sharing. ::: tip Please use the template Issues need the bug report template so we have the versions and environment we need. Issues opened without it are labelled `needs-template`. Edit the issue to add the template sections, or use **Report an issue**. ::: ## Other ways to collect info **Home Assistant's diagnostics file and the browser console give the same facts.** - **Download diagnostics**, Home Assistant's standard diagnostics file: **Settings > Devices & services > LCARdS > ⋮ > Download diagnostics**. It contains the same backend facts plus Home Assistant's own system information. - **Browser console** (F12, then Console): the calls below. Pass `{ includeConfig: true }` to the `support.*` calls to include data-source names and entity IDs. ```javascript window.lcards.info() // quick summary await window.lcards.support.copy() // copy full support info to the clipboard await window.lcards.support.openIssue() // copy + open a pre-filled bug report await window.lcards.support.collect() // raw support data (object) ``` --- # Installation **Install LCARdS from the Home Assistant Marketplace, add the LCARdS integration, then create its helpers in the LCARdS Config panel.** There is nothing else to install: the integration loads the cards on every dashboard. - **Needs Home Assistant 2026.11 or newer.** LCARdS relies on 2026.11's chip styling and dashboard card paths, and on 2026.10's dashboard visibility handling and validation library. The Marketplace doesn't offer it to older versions, and on an older version the integration logs an error and does not load. - Something not working after installing? See [Troubleshooting](getting-help). The LCARdS Config panel's **Welcome** tab also has a health check for common installation problems. ::: tip Pair it with HA-LCARS LCARdS is designed to pair with the [HA-LCARS themes](https://github.com/th3jesta/ha-lcars). HA-LCARS includes LCARdS theme profiles (**LCARS Picard [LCARdS Red Accent]** and **[LCARdS Blue Accent]**): choose one as your Home Assistant theme and Home Assistant's own screens match your LCARdS cards. See [HA-LCARS Theme Profiles](../configuration/ha-lcars-theme-profiles). ::: ## 1. Install from the Home Assistant Marketplace (HACS) **Download LCARdS as a Marketplace integration, then restart Home Assistant.** [![Open your Home Assistant instance and open a repository in the Marketplace.](https://my.home-assistant.io/badges/marketplace_repository.svg)](https://my.home-assistant.io/redirect/marketplace_repository/?owner=snootched&repository=lcards&category=integrations) 1. Open **Marketplace** in Home Assistant. 2. Go to **Integrations** and search for **LCARdS**. 3. Click **Download** and confirm. 4. **Restart Home Assistant**, then [add the integration](#_2-add-the-integration). ::: details Manual installation (unmanaged updates) 1. Download `lcards.zip` from the [latest GitHub release](https://github.com/snootched/lcards/releases/latest). 2. Extract the contents into `config/custom_components/lcards/`. The folder should hold `manifest.json` and `__init__.py` directly, not a nested `lcards/lcards/` folder. 3. **Restart Home Assistant**, then [add the integration](#_2-add-the-integration). Updates don't arrive by themselves this way: repeat these steps for each release. ::: ## 2. Add the integration **Go to Settings > Devices & services > Add integration and pick LCARdS.** It asks no questions, and only one LCARdS entry can be added. - The integration connects Home Assistant to the LCARdS cards, and adds the **LCARdS Config** panel to the sidebar. - Its options are listed under [Integration options](#integration-options). ## 3. First setup **Choose a theme, then create the helpers in the LCARdS Config panel.** The panel's **Welcome** tab walks you through the same steps. 1. **Choose your HA-LCARS theme** (recommended), ideally one of the LCARdS profiles HA-LCARS includes. See [HA-LCARS Theme Profiles](../configuration/ha-lcars-theme-profiles). 2. **Create the helpers.** Open **LCARdS Config** in the sidebar, go to the **Helpers** tab and click **Create All**. LCARdS keeps alert mode, sound and sizing settings in Home Assistant helpers, and several features (alert mode, the alert overlay, sounds) need them. 3. **Optional: customize your alert colours.** The **Alert Mode Lab** in **Theme Studio** sets how each alert mode recolours your dashboards. See [Alert Mode Lab](../configuration/alert-mode-lab). 4. **Optional: set up sounds.** The **Sounds** tab turns sounds on and picks a sound scheme you can customize. See [Sound Configuration](../configuration/sounds). 5. **Check the setup.** **Welcome > Support & system info** runs a health check (versions, browser cache, card-mod leftovers). The [Configuration](../configuration/) section covers every panel tab in detail. ## Next steps - **[Build a dashboard](building-dashboards)**: generate one, add LCARS sections, design one with Claude or lay out your first LCARS screen by hand. - **[Browse the gallery](dashboard-gallery)**: start from a complete dashboard. - Stuck? See **[Troubleshooting](getting-help)**. ## Integration options **Settings > Devices & services > LCARdS > Configure sets the sidebar entry, the log level and preview features.** Changes take effect when you save, with no restart; reload the browser page to pick up a new log level. | Option | Default | Description | |--------|---------|-------------| | Show sidebar panel | On | Show the LCARdS Config entry in the sidebar. Turn it off for a cleaner sidebar: the integration stays active, every card keeps working, and you can turn it back on at any time | | Sidebar title | `LCARdS Config` | The sidebar entry's label | | Sidebar icon | `mdi:space-invaders` | The sidebar entry's icon | | Log level | `warn` | How much LCARdS logs, in the browser console and in the Home Assistant log: `off`, `error`, `warn`, `info`, `debug` or `trace`. `debug` and `trace` are very verbose: use them only for deep troubleshooting. `?lcards_log_level=debug` on a page's address overrides it for that page | | Enable Preview Features | Off | Unlocks features still under active development. They may change; please give feedback, discuss or get help on GitHub Issues and Discussions | --- # Designing LCARS Screens **What makes a screen read and feel like LCARS - written down as guidelines you can pick from.** They come from an automated analysis of hundreds of recognizable LCARS screen samples. They include production panels from *The Next Generation*, *Deep Space Nine* and *Voyager*, and fan-made panels (like meWho's Titan.DS and LCARSlad London.) Images were generalized into themes and structures to build guidelines (not to reproduce those works.) - A dashboard that follows just a few of these guidelines already looks more like LCARS than one that follows none: pick the ones that suit your screen and taste. - [Build by Hand](build-by-hand) covers the mechanics (which card for which job, the layout view); this guide is about the look. - The [Dashboard Gallery](dashboard-gallery#generated-from-the-design-guide) has complete screens built from these guidelines. ## Two looks **LCARS comes in two broad looks: the thin, dark *Picard* screens and the thick, colourful classic ones.** Most of the guidelines below apply to both. - The look mostly comes from the theme: the same layout reads as Picard in a Picard theme and as classic in a classic one. | | Picard (*Picard* S3, Titan) | Classic (TNG, DS9, Voyager) | |---|---|---| | Structure | Thin frames in a few dark, muted tones | Thick blocks of colour | | Colour | Mostly black and structure tones; a little accent | Several pastel colours at once | | Buttons | Small square blocks with code numbers, pills at the edges | Grids of rounded pills, led by big numbers | | Main display | Line-drawn schematic inside an open sweep | Content inside a bracket or sweep frame | | Themes that suit it | `LCARS Picard [LCARdS Red/Blue Accent]`, `LCARS Picard I/II`, `LCARS 25C` | `LCARS Default`, `LCARS TNG`, `LCARS Classic`, `LCARS Nemesis Blue` | ## The Colours Colours can be set in many ways, but generally should come from your theme. - **Prefer the `theme:` tokens.** They resolve to your [HA-LCARS](https://github.com/th3jesta/ha-lcars) theme's variable when it's installed and fall back to the LCARdS palette when it isn't, so the card always has a colour. A bare `var(--lcars-...)` is empty without HA-LCARS: give it a fallback, as in the table. - **Keep accent colour sparse.** In the Picard references only about a tenth of the screen is accent colour; the rest is black and structure tones. A block stays a structure colour unless it means something. - **Classic screens are more colourful:** several roles side by side, mixed freely. The classic themes already set their roles to the pastel set. - HA-LCARS themes have one accent role, so the data colour is a deliberate pick from the palette: check it reads on your theme's structure colours. ```yaml live type: custom:lcards-layout-card layout: height: 64px grid-gap: 6px grid-template-columns: repeat(4, minmax(0, 1fr)) grid-template-rows: minmax(0, 1fr) cards: # main structure - type: custom:lcards-button preset: panel-light min_height: 0 text: label: content: PRIMARY style: card: color: background: default: theme:colors.ui.primary # secondary structure - type: custom:lcards-button preset: panel-light min_height: 0 text: label: content: SECONDARY style: card: color: background: default: theme:colors.ui.secondary # dark structure, with its text partner - type: custom:lcards-button preset: panel-light min_height: 0 text: label: content: DARK color: var(--lcars-card-top-text, var(--lcards-gray-lightest)) style: card: color: background: default: theme:colors.card.topColor # accent: used sparingly - type: custom:lcards-button preset: panel-light min_height: 0 text: label: content: ACCENT style: card: color: background: default: theme:colors.ui.tertiary ``` ::: details More about colour - **Light and dark mode belong to the theme.** If your theme has both, a screen built from roles works in both. - **A view can choose its own theme:** `theme: LCARS Default` on a view shows that view in that theme, whatever the user's profile theme is. Handy for a classic screen on an otherwise Picard dashboard. - **Every colour format:** [Colours](../core/colours) lists what a colour value can be and how theme tokens resolve. ::: | Role | Use for | Token | HA-LCARS variable | |---|---|---|---| | Main structure | Sweeps, frame bars, the most important frame | `theme:colors.ui.primary` | `--lcars-ui-primary` | | Secondary structure | Block columns, side bars | `theme:colors.ui.secondary`, `theme:colors.ui.quaternary` | `--lcars-ui-secondary`, `--lcars-ui-quaternary` | | Dark structure | Inner frames, inactive blocks, tabs | `theme:colors.card.topColor`, `theme:colors.card.bottomColor` | `--lcars-card-top-color`, `--lcars-card-bottom-color` | | Accent | What's on, selected or needs attention | `theme:colors.ui.tertiary`, `theme:colors.card.buttonOn` | `--lcars-ui-tertiary`, `--lcars-card-button-color` | | Data | Readings, schematic lines, gauges | | a palette colour, e.g. `var(--lcars-blue, var(--lcards-blue-medium))` | | Alert | Alert states | | `var(--lcars-alert-color, var(--lcards-orange-dark))` | | Text on a role | Labels on a coloured block | | the role's text partner: `--lcars-ui-primary-text`, `--lcars-card-top-text`, ... | ## Setting the Colours Note: The [gallery](dashboard-gallery) and the [patterns](lcars-patterns) are picked by hand for documentation/demo purposes. It's recommended that a real dashboard shouldn't unless needed. - **By state (the usual choice for your own dashboard):** leave the colour unset on a button bound to an entity, and its preset takes the theme's colours for on, off and unavailable. Every switch reads the same way, your theme and alert mode recolour it, and there is nothing to keep in step. Add a [state map](../core/colours/state-maps) only where one entity needs colours of its own. - **By hand:** each control gets its own role for on and off (`active` and `inactive`), which gives the many-coloured canon look. Every bound card then carries its own colours, so moving to state colours later means cleaning up each one. - **Mixed:** the decorative parts (sweeps, bars, code blocks, cascades) take roles picked by hand, which is where most of the look comes from, and the controls keep the theme's state colours. - **Why the samples pick by hand:** their entities are test helpers, so hand-picked roles are the only way to show the look. Treat their colours as a picture of the style, not as how your switches should be coloured. ```yaml live type: custom:lcards-layout-card layout: height: 48px grid-gap: 6px grid-template-columns: repeat(3, minmax(0, 1fr)) grid-template-rows: minmax(0, 1fr) cards: # decorative block: a role picked by hand - type: custom:lcards-button preset: panel-light text: label: content: 03-118 style: card: color: background: theme:colors.ui.secondary # bound control, by state: no colour set, the theme's on and off colours - type: custom:lcards-button preset: panel-light entity: light.living_room text: label: content: LIGHTS tap_action: action: toggle # bound control, by hand: its own role for on and off - type: custom:lcards-button preset: panel-light entity: light.living_room text: label: content: LIGHTS style: card: color: background: active: theme:colors.ui.primary inactive: theme:colors.card.bottomColor tap_action: action: toggle ``` ## Structure **An LCARS screen is black, framed by sweeps, and filled with structure rather than empty space.** These hold for both looks. - **Black canvas.** Content sits on black inside frames, not on coloured blocks. - **Sweeps make the frames.** A frame is a bar that turns 90° into another bar (an [elbow](../cards/elbow/)). Two sweeps facing each other (a header pair, or a left and a right sweep) is the signature LCARS shape; a lone elbow in a corner is rarer. - **Frame the display with an open sweep.** On Picard screens the main display sits in one thin sweep that runs along the top, down the left and back along the bottom, open on the right ([display sweep](lcars-patterns#display-sweep)); classic ones put a thin sweep inside a thick one. A fully closed or double frame is rare: use it only when asked. - **Break long bars into segments** of different lengths, separated by small black gaps. A segment can carry a small label or number. - **One gap size everywhere.** The same gap between blocks, segments and frames on a screen (`grid-gap` on the layout view and layout cards). Blocks never touch. - **Labels sit right-aligned**, usually at the bottom right of their block, in condensed capitals (the theme font). Numbers right-aligned in columns. - **One title, top right**, large, in the accent colour or white; a dim subtitle at the bottom right if you need one. Classic titles often read `NAME • NUMBER`. - **Numbers as texture.** Code-like numbers (`13-650`, `0099•06`) fill blocks and columns, and dense number cascades fill spare areas. Real readings and decorative numbers look alike; that's part of the look. - **A sweep is at least as wide as what it frames.** If a sweep's vertical bar is narrower than the column above it, it looks detached; close a narrow column with a segmented bar instead. - **Fill space with structure, not black.** If an area is empty, put blocks, a number cascade or a segmented bar in it. ## Scale and density **An LCARS screen is many small parts of fixed size around one large part that takes the rest.** Measured on the reference screens, this matters more than colour. Generated screens most often look fan-made because their parts are too big and too few. - **Small parts keep a fixed size.** Give their grid tracks a size in px (`64px`, `24px`) and leave `minmax(0, 1fr)` for the main display. With every track at `1fr`, blocks and pills grow with the screen and turn into large slabs. In a column or bar that must reach the screen edge, let one part (the last sidebar block, one long bar segment) take what is left. - **Many parts.** A full screen carries about 50 to 90 small blocks, pills and bars, plus thin lines, ticks and number rows. A screen with fewer than about 30 reads as a web dashboard painted in LCARS colours. - **No large empty patch.** About a sixth of the screen is plain black, spread out as gaps; no single empty region is larger than about a tenth of the screen. A chart or a short list alone in a big frame breaks this. Put readouts, a scale, or a column of blocks beside it. - **Three or four size tiers, no medium-large.** One large display, one large title, small blocks and pills, and tiny labels, ticks and codes. ```yaml live type: custom:lcards-layout-card layout: height: 192px grid-gap: 4px # fixed small columns; only the display grows grid-template-columns: 64px 64px minmax(0, 1fr) grid-template-rows: repeat(7, 24px) cards: # a two-wide code-block column, each block 64 x 24 px - type: custom:lcards-button preset: panel-light min_height: 0 text: label: content: 63-934 position: center-right - type: custom:lcards-button preset: panel-light min_height: 0 text: label: content: 13-650 position: center-right - type: custom:lcards-button preset: panel-dark min_height: 0 text: label: content: 19-638 position: center-right - type: custom:lcards-button preset: panel-light min_height: 0 text: label: content: 42-991 position: center-right style: card: color: background: default: theme:colors.ui.tertiary - type: custom:lcards-button preset: panel-light min_height: 0 text: label: content: 28-130 position: center-right - type: custom:lcards-button preset: panel-dark min_height: 0 text: label: content: 50-957 position: center-right - type: custom:lcards-button preset: panel-light min_height: 0 text: label: content: 81-782 position: center-right - type: custom:lcards-button preset: panel-light min_height: 0 text: label: content: 85-334 position: center-right # the one part that grows: here a number cascade standing in for the main display - type: custom:lcards-data-grid data_mode: decorative format: digit view_layout: grid-column: "3" grid-row: 1 / -1 grid: grid-template-columns: repeat(8, 44px) grid-template-rows: repeat(9, 18px) gap: 3 style: font_size: 14 color: theme:colors.ui.secondary align: right ``` ::: details More about scale and density - **Measured sizes.** Measured at 1600 px wide on Picard and classic references, the typical block is about 2.5% of the screen height and 4% of the width (about 64 x 24 px). Letters in a block are about half the block's height: `font_size` 13 to 14 in a 24 px block. The title's letters are 3 to 4% of the screen height (Picard) or 6 to 7% (classic). Take these as targets to aim near, not limits. - **A starting grid.** For the display with side columns at 1600 px wide: `grid-template-columns: 116px 134px minmax(0, 1fr) 196px` (pills, a two-wide block column, the display, a readings column) and `grid-template-rows: 84px minmax(0, 1fr) 132px` (header, display, strip). For the classic data screen: `grid-template-columns: 168px 200px minmax(0, 1fr) 156px 156px` and `grid-template-rows: 84px 142px 18px 18px 90px minmax(0, 1fr)`, the first row sized for the title (about 1.3 times its `font_size`) and the two 18 px rows holding the upper and lower sweeps' bars. Classic pills are about 30 px tall at this size. Other archetypes keep the same idea: fixed px for every area but the display. - **Overlap by lines, not areas.** Each named area must be one rectangle, or the browser drops the whole template (the [config checker](config-checker) reports it). Where a part sits inside a sweep's open corner (the classic number rows, a display tucked under a curve), place it with `view_layout` `grid-row` and `grid-column` instead of an area, with a left margin that clears the sweep's inner curve. Columns that must line up (a ruler of blocks beside its numbers) need the same row sizes. - **Edge columns are narrow.** Picard block columns, gauge pairs and pill columns are each about 4 to 9% of the width and sit tight against the frame. A classic sidebar is thicker, about 8 to 12%. - **Thin structure fills black without weight.** 1 to 3 px rules, leader lines from a block to what it labels, tick scales and [dot rows](lcars-patterns#dot-rows) are everywhere on the references. - **Frames interlock.** A header bar runs into a sweep that becomes a column, and the column ends in another bar. Regions are divided by thin frames and small gaps, not by one large gap between equal boxes. - **The main display is busy.** A schematic with labels and leader lines, or a chart with a scale and readouts beside it; not a chart alone. - **Phones and portrait panels** hold fewer parts (about half), at the same small sizes. ::: ### Check a screen **Before you call a screen done, run down this list.** Each item is a guideline from the references; a screen can break one on purpose. | Check | Aim near | |---|---| | Small parts on fixed px tracks | Only the main display uses `1fr`, plus one filler part per edge column or bar | | Small blocks, pills and bars on a full screen | 50 to 90 (a portrait panel about 600 px wide: 25 to 45) | | Block size at 1600 px wide | About 64 x 24 px; a classic sidebar block is wider | | Label text | Letters about half the block's height (`font_size` 13 to 14 in a 24 px block); one title at 36 to 48 (Picard) or 56 to 80 (classic), clear of everything round it | | Largest empty region | Under about a tenth of the screen | | Accent colour | About a tenth of the screen (Picard); classic carries more | | Number cascades and readouts | On black, never in outlined or rounded boxes | | Numbers that mean something | Most numbers are readings with a label; at most one decorative cascade filling an area, in a slot a reading can take (short groups inside a code-block column don't count) | | Frames | Open sweeps that interlock; bars in two to four segments (a bracket screen's header may run on in many short coded segments); never one thick frame around a grid of equal boxes | | Ends at the screen edge | Sweeps and bars that run off the screen end square; a short capped bar or a pill keeps its round cap | | Leader lines | One style for the whole MSD; leave the label's side facing the part, at the text's mid-height; turn once, near the part, with a curve (broad on classic, tight on Picard), never a square corner; the bracket style runs straight, or turns sharply into one diagonal, in its bar's colour | ## Picard **Picard screens are thin frames in dark tones, with columns of small blocks and a schematic in the middle.** - **Columns of small number blocks** down one or both sides: mostly structure tones, a few in the accent, some dark (inactive). See [code-block column](lcars-patterns#code-block-column). - **A utility column at the far edge:** a bracket frame open on the outer side, square-ended there, holding three to five small dark pills (zoom, settings, dimmer) with a red alert pill at the bottom. Every other button is a rectangular block. See [utility pills](lcars-patterns#utility-pills). - **Concentric sweeps**: a thick sweep with a thin line running parallel inside it, for headers and corners. See [concentric sweep](lcars-patterns#concentric-sweep). - **Controls inside a wide arm**: a thick frame whose black inset holds a group of blocks. See [controls inside a wide arm](lcars-patterns#controls-inside-a-wide-arm). - **Vertical gauges with tick scales** beside the number columns ([Picard and gauge sliders](../cards/slider-card/)). See [gauge bank](lcars-patterns#gauge-bank). - **The main display is a schematic**: a line drawing with leader lines to labels, small accent highlights for faults ([MSD](../cards/msd/)). A leader leaves its label from the side, runs out and turns once into the part with a tight curve, never a square corner. A screen keeps one style for every label: that one, a thin bar beside each label whose line leaves the bar's corner and runs straight (level with its part, or one sharp turn into a diagonal), or a short stub and an angled run. See [labelled schematic](lcars-patterns#labelled-schematic). - **A strip of tabs and sliders along the bottom.** Tabs show their state as a line along the top ([toggle tab strip](lcars-patterns#toggle-tab-strip)). - **Fixed chrome, changing centre.** Titan.DS keeps the same frame, columns and strips on every screen and swaps only the central display. In LCARdS: a layout view whose centre area holds several cards with [visibility conditions](../cards/layout-view/), one shown at a time. ## Classic (TNG, DS9, Voyager) **Classic screens build their structure from thick blocks of colour, with grids of pills led by big numbers.** - **The data screen is the classic shape.** An upper band about a quarter of the height carries a sweep, a [readings table](lcars-patterns#readings-table) of tiny labelled values (one or two colours a row), a few pills and the big title, which keeps clear of the readings. A thin band of two to four segments per bar divides it from the lower part. The lower part is a thick sidebar of stacked blocks beside one large line-art display (a grid, scan or schematic). See the [data screen archetype](#screen-archetypes). - **Colour blocks are the structure.** Thick header blocks, often in several roles side by side. - **Grids of rounded pills**, each with a small code label, in column groups that alternate two or three roles. See [pill grid](lcars-patterns#pill-grid-classic). - **A column of big numbers** (`20`, `008`, `358`) leads each group of pills. - **Bracket frames**: a top and a bottom bar with rounded ends, and a sidebar of stacked blocks with code numbers. See [bracket frame](lcars-patterns#bracket-frame-classic). - **A split header**: two sweeps meeting across the top, with a thin segmented band in the gap between them. See [split header](lcars-patterns#split-header-classic). - **Schematics list their labels in columns** beside the drawing, and each leader sweeps round into its part with a broad curve, like a small sweep. See [labelled schematic](lcars-patterns#labelled-schematic). - **Segment the long arms.** A classic bar seldom runs unbroken across the screen: the sweep turns into a short bar, then segments of different lengths and roles carry labels. See [segmented bar](lcars-patterns#segmented-bar-classic-arms). ## Motion and alerts **Keep an LCARS screen mostly still: small things move, and an alert changes everything at once.** - **At rest, move small things only**: ticking numbers, a dot row, a scanning line. On the reference screens about one twentieth of the screen moves at a time. See [Animations](../core/animations) and [data grid cascades](../cards/data-grid/). - **Animate entrances once** (`on_show` with `draw`, `cascade` or `text-reveal`), not continuously. - **Alerts change the whole screen at once**: [alert mode](../core/alert-mode) recolours everything in place, and an [alert overlay](../cards/alert-overlay/) adds the alert symbol. Avoid making every card flash. - **Show state by colour in place**, not by moving things: a block turns to the accent, a tab's line lights up. ## Screen archetypes **Start a screen by picking its overall shape, then fill the areas with [patterns](lcars-patterns).** These are the layouts that recur across the reference screens, and each suits a different job. - An archetype isn't tied to a look: any of them works as a Picard or a classic screen, whatever the table's examples name. The gallery's environmental screen is a data screen in the Picard look. - Take groupings and sections from the [gallery](dashboard-gallery) and the references freely, but compose the screen for its own job rather than reproducing one whole. - Two things vary a screen more than anything else: which archetype you start from, and which patterns you put in its areas. A screen that reuses one gallery screen's grid with new labels is the same screen; one that combines a different archetype with two or three patterns is a new one. | Archetype | Good for | Shape (`grid-template-areas`) | In the gallery | |---|---|---|---| | **Display with side columns** | One main system (a ship, a floor plan, a chart) with controls around it; Titan.DS modules | `"pills top top top" "pills left main right" "pills left strip right"` | [Picard](dashboard-gallery#picard-display-with-side-columns) | | **Display over controls** | A wide display with a dense control deck under it; Titan.DS ship screens | `"head head" "display display" "deck1 deck2"` | [Picard](dashboard-gallery#picard-display-over-controls) | | **Wings** | Two related halves (port and starboard, upstairs and downstairs) around a shared centre | `"head head head" "lwing centre rwing"` | [Classic](dashboard-gallery#classic-wings) | | **Switchable display** | Several systems on one screen, one at a time: a selector strip swaps the centre while the frame, columns and strips stay; Titan.DS modules | `"head head head" "left main right" "sel sel sel"` (several cards in `main`, each with a visibility condition) | [Picard](dashboard-gallery#operations) | | **Master systems display** | One whole ship, house or floor as a schematic filling the screen, with routed callouts to readings and controls round its edges | `"head head head" "calll msd callr" "foot foot foot"` | [Picard](dashboard-gallery#engineering) | | **Portrait panel** | Phones and wall tablets mounted upright | `"title" "main" "gauges" "controls"` | [Picard](dashboard-gallery#picard-portrait-panel) | | **Tile wall** | Many similar things at once: cameras, rooms, sensors | `"head head head" "t1 t2 t3" "t4 t5 t6"` | [Picard](dashboard-gallery#picard-tile-wall) | | **Data screen** | One large display (a scan, a map, a chart) with data rows above it | `"sweep data title" "side band band" "side display display"` | [Classic](dashboard-gallery#classic-data-screen) | | **Sweep console** | A control panel: thick header sweep, sidebar, button groups; or two sweeps facing across the top, their arms running down the middle as stacked blocks | `"head head head" "side pills readout" "foot foot foot"` | [Classic](dashboard-gallery#classic-sweep-console) | | **Bracket screen** | A readout or a document: capped top and bottom bars, a numbered sidebar | `"top top" "side main" "bottom bottom"` | [Classic](dashboard-gallery#classic-bracket-screen) | | **List** | Rosters, schedules, logs: rows of text under a split header | `"head head" "list numbers" "pills pills"` | [Classic](dashboard-gallery#classic-list) | ## Putting it together **A screen is a [layout view](../cards/layout-view/) shaped by one of the archetypes, with [patterns](lcars-patterns) in its areas.** For example: a facing-sweeps header across the top, a code-block column and utility pills down the left, a display sweep round an MSD or chart in the centre, and a toggle tab strip along the bottom. Or a portrait panel: a header bar with a title, a gauge bank, a selector strip. The [Dashboard Gallery](dashboard-gallery#generated-from-the-design-guide) has ten complete screens built this way, five in the Picard look and five classic, each laid out differently. --- # LCARS Patterns **Building blocks to help compose LCARS screens. Each one is a card or a [layout card](../cards/layout-card/) you can drop into an area of a layout view, with every colour taken from a theme role. Change the numbers, labels and entities to yours. [Designing LCARS Screens](lcars-design) explains what makes a screen read as LCARS, and its [archetypes](lcars-design#screen-archetypes) give the overall shapes to put these in. - **Patterns are modules with slots.** A slot holds a decorative part or a control of the same size: a code block can toggle a light, a gauge can follow a real sensor, a number in a cascade can be a reading. Swap them freely; the module keeps its shape. - **Small parts keep a fixed size.** The examples use the sizes measured on the reference screens (blocks about 64 x 24 px, letters about half the block height, `font_size` 13 to 14) on px tracks, so they keep that size on a full screen; only a main display takes `minmax(0, 1fr)`. See [Scale and density](lcars-design#scale-and-density). - **Give the layout card's rows a size** (`grid-template-rows` or `grid-auto-rows` in px or `minmax(0, 1fr)`): rows left to size themselves squash the cards. - **Keep a button's row at least as tall as the button:** 56 px by default. Small pills and blocks set a lower `min_height`, and bar labels size their text to it. - Patterns marked *(classic)* come from TNG, DS9 and Voyager screens, and most of the others from the *Picard* references. The theme sets the colours, so most work in either look. - The examples pick every colour by hand to show the look. Before you copy them onto controls bound to your entities, read [Setting the Colours](lcars-design#setting-the-colours). | For | Patterns | |---|---| | Frames and headers | [Facing sweeps header](#facing-sweeps-header), [Concentric sweep](#concentric-sweep), [Display sweep](#display-sweep), [Header bar with a title](#header-bar-with-a-title), [Slanted bars](#slanted-bars), [Segmented bar](#segmented-bar-classic-arms), [Bracket frame](#bracket-frame-classic), [Split header](#split-header-classic) | | Controls | [Code-block column](#code-block-column), [Utility pills](#utility-pills), [Controls inside a wide arm](#controls-inside-a-wide-arm), [Toggle tab strip](#toggle-tab-strip), [Selector strip](#selector-strip), [Flagged blocks](#flagged-blocks), [Pill grid](#pill-grid-classic) | | Readings | [Labelled schematic](#labelled-schematic), [Status rows](#status-rows), [Readout rows](#readout-rows), [Gauge bank](#gauge-bank), [Tile wall](#tile-wall), [Fleet tiles](#fleet-tiles), [Brackets and scopes](#brackets-and-scopes), [List](#list) | | Filling space | [Number cascade filler](#number-cascade-filler), [Dot rows](#dot-rows) | ## Code-block column **The Picard side column: small blocks with code numbers, mostly in structure tones, one in the accent.** Use it down one or both sides of a screen. - The blocks are panels (`panel-light`, `panel-dark`) with the label moved to the middle right and `min_height: 0`, on 64 x 24 px tracks. Two columns side by side is the usual Picard width. - A panel with an entity shows the theme's accent while it's on and the dark structure tone while it's off: toggle the light under the card to see block 42-991 change. - Leave out `text.label.content` and each block gets a random code. - Picard columns often break the blocks with a short group of three or four rows of small numbers: a [number cascade](#number-cascade-filler) in the column's width. ```yaml live controls type: custom:lcards-layout-card layout: height: 108px grid-gap: 4px grid-template-columns: 64px 64px grid-auto-rows: 24px cards: - type: custom:lcards-button preset: panel-light min_height: 0 text: label: content: 63-934 position: center-right - type: custom:lcards-button preset: panel-light min_height: 0 text: label: content: 13-650 position: center-right - type: custom:lcards-button preset: panel-light min_height: 0 text: label: content: 19-638 position: center-right - type: custom:lcards-button preset: panel-light min_height: 0 entity: light.demo text: label: content: 42-991 position: center-right tap_action: action: toggle - type: custom:lcards-button preset: panel-light min_height: 0 text: label: content: 28-130 position: center-right - type: custom:lcards-button preset: panel-light min_height: 0 text: label: content: 50-957 position: center-right - type: custom:lcards-button preset: panel-light min_height: 0 text: label: content: 81-782 position: center-right - type: custom:lcards-button preset: panel-light min_height: 0 text: label: content: 85-334 position: center-right ``` ## Toggle tab strip **A row of tabs whose state shows as a line along the top: dark when off, the accent when on.** The `toggle-tab` preset shows the entity's name in the middle; a tab without an entity takes its `text.name.content`. ```yaml live controls type: custom:lcards-layout-card layout: height: 30px grid-gap: 4px grid-template-columns: repeat(3, 96px) grid-template-rows: 30px cards: - type: custom:lcards-button preset: toggle-tab min_height: 0 entity: light.bridge tap_action: action: toggle - type: custom:lcards-button preset: toggle-tab min_height: 0 entity: switch.viewscreen tap_action: action: toggle - type: custom:lcards-button preset: toggle-tab min_height: 0 text: name: content: AUDIO ``` ## Facing sweeps header **Two sweeps meeting across the top, with the title in the black space between them.** The signature LCARS header: a `header-left` and a `header-right` elbow side by side, each in its own role. ```yaml live type: custom:lcards-layout-card layout: height: 120px grid-gap: 6px grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) grid-template-rows: minmax(0, 1fr) cards: - type: custom:lcards-elbow elbow: type: header-left segment: bar_width: 120 bar_height: 20 color: theme:colors.ui.primary - type: custom:lcards-elbow elbow: type: header-right segment: bar_width: 120 bar_height: 20 color: theme:colors.ui.secondary text: label: content: ENGINEERING position: center color: theme:colors.ui.tertiary ``` ## Display sweep **The frame round a Picard main display: one sweep that runs along the top, turns down the left and back along the bottom, open on the right.** The top and bottom bars run on past the display as segments or dot rows; the display (an MSD, a chart) fills the black inside. On a full screen the usual form is wider: the header bar turns down over a [code-block column](#code-block-column), the column is the display's left side, and a short sweep at its foot turns into the closing bar under the display. The frame below is the compact form for a display on its own. - The bars end square on the open side, and thin bars keep one width round the corners: leave `inner_curve` unset. - An elbow draws its inner curve only when its area is wider than its `bar_width` (and taller than its `bar_height`). When a header or foot sweep sits over a code column, give its area a gutter of about 40 px past the column, or it fills with a slab. - Keep the bars thin (10 to 16 px) with a large outer curve; a code-block column often sits just left of the sweep. - To run the bars on past the display, place the frame across the first columns of the area and the display over the rest, then put segments or a dot row in line with the top and bottom bars. - One sweep per corner: the display sweep's top bar can be the header's bar. Don't stack a separate header corner right above the sweep's own corner, or the two curves read as a double ring. - A closed frame on all four sides, or two nested rings (`style: segmented` with `segments.inner_frame`), is not seen on the reference screens; use it only when a screen asks for a boxed display. ```yaml live type: custom:lcards-elbow grid_options: rows: 4 elbow: type: frame segment: color: theme:colors.ui.secondary frame: bar_width: 14 bar_height: 12 outer_curve: 60 right: enabled: false ``` ## Labelled schematic **The main display: a dimmed line drawing with small labels pointing at its parts.** It is an [MSD](../cards/msd/) whose labels are `text-only` buttons placed as controls, each joined to its part by a leader line. - Widen `view_box` beyond the drawing to leave room for the labels, and place each label in that margin, well inside the `view_box` edge, with its proportions matching the display's area (otherwise the drawing is letterboxed and the margin moves). - In the MSD Studio, the [Quick label](../cards/msd/quick-start#labels-with-leader-lines) tool places a label and its leader line in any of these styles. - A leader leaves its label from the side that faces the part (`anchor_side: left` or `right`), at the text's mid-height. Align the text toward that side (`center-right` or `center-left`) and size the box close to the text, so the line starts at the text, not at empty box. - Place the label so the part lies well past its end, above or below it: the line runs out, turns once near the part, and goes in. Leave top and bottom exits to a bar's corner. - Sizes are in `view_box` units and scale with the drawing. Aim for labels that render at 12 to 14 px, lines at 2 to 3 px (Picard) or 1.5 to 2 px (classic), and bends that read as curves: value = px x `view_box` width / the display's width in px. Use one leader style for the whole MSD, with one corner size and line width; mix styles only when asked. ```yaml live type: custom:lcards-msd-card msd: base_svg: source: builtin:enterprise-d-shuttlecraft15-anomaly filters: - mode: css type: grayscale value: 1 - mode: css type: opacity value: 0.55 view_box: - -60 - -150 - 1160 - 800 overlays: - id: lbl-tanks type: control attachment: top-left position: - -50 - -120 size: - 240 - 40 card: type: custom:lcards-button preset: text-only min_height: 0 text: label: content: DEUTERIUM 1-3 show: true position: center-right font_size: 28 color: theme:colors.ui.secondary # every label the same way: out of the side, one tight bend into the part - id: ln-tanks type: line anchor: lbl-tanks attach_to: - 281 - 60 anchor_side: right anchor_gap: 8 route: manhattan corner_radius: 22 style: color: var(--lcars-card-top-color, var(--lcards-gray-medium)) width: 5 - id: lbl-cargo type: control attachment: top-left position: - -50 - 570 size: - 300 - 40 card: type: custom:lcards-button preset: text-only min_height: 0 text: label: content: CARGO 4 · SEAL FAULT show: true position: center-right font_size: 28 color: theme:colors.ui.tertiary # the fault: the accent, the same style - id: ln-cargo type: line anchor: lbl-cargo attach_to: - 450 - 440 anchor_side: right anchor_gap: 8 route: manhattan corner_radius: 22 style: color: theme:colors.ui.tertiary width: 5 - id: lbl-seat type: control attachment: top-left position: - 880 - 540 size: - 170 - 40 card: type: custom:lcards-button preset: text-only min_height: 0 text: label: content: FLIGHT DECK show: true position: center-left font_size: 28 color: theme:colors.ui.secondary - id: ln-seat type: line anchor: lbl-seat attach_to: - 632 - 227 anchor_side: left anchor_gap: 8 route: manhattan corner_radius: 22 style: color: var(--lcars-card-top-color, var(--lcards-gray-medium)) width: 5 ``` ::: details More about leader lines - **Picard bends are tight but never square:** a small `corner_radius` (about 8 to 12 px rendered), never `corner_style: miter`. The bracket style is the exception: its lines are straight, or turn once at a sharp corner into a diagonal. - **Picard styles, one per MSD:** straight out of the side with one tight bend (above); a thin bar beside every label, its line leaving the bar's top corner straight or into one diagonal (below); or a short stub and then a straight run at an angle (`route: angled`, `stub_length`; see [routing modes](../cards/msd/line-overlay#routing-modes)). A fault keeps the screen's style and takes the accent. - **Gap:** the button's text `padding` (8 by default) plus `anchor_gap` keeps the line off the letters. A line leaving a bar or a filled block touches it. - **End on a point:** `attach_to` as `[x, y]` on the drawing. A line that ends on an overlay (a shape or control) arrives at the side nearest its label, which adds a bend; give it `attach_side: center` to keep the one bend. - **Faults** take the accent, the line too; everything else stays in structure tones. - **A grid behind the drawing** (the `grid` background preset) suits it, but that preset scrolls by default: set its `config.scroll_speed_x` and `config.scroll_speed_y` to `0` so the screen stays still. ::: **The bracket style gives every label a thin bar on the side its line leaves, and the line runs from the bar's top corner along its edge, then straight to the part.** The bar is the label's own border (`style.border.width.right` or `left`); `anchor_side: top-right` or `top-left` with `route_hint: xy` starts the line along the top, flush with the bar. Lay the labels out one of two ways: in columns beside the drawing, each level with its part so every line runs straight out; or above and below it, each line running a long stub (about 60 px) along the bar's edge before one sharp turn into a straight diagonal (`route: angled`, `stub_length`, `corner_style: miter`). No curves. The line takes the bar's colour. ```yaml live type: custom:lcards-msd-card msd: base_svg: source: builtin:enterprise-d-shuttlecraft15-anomaly filters: - mode: css type: grayscale value: 1 - mode: css type: opacity value: 0.55 view_box: - -60 - -150 - 1160 - 800 overlays: # a thin bar beside every label; each line leaves the top corner along the bar, then runs straight - id: lbl-tanks type: control attachment: top-left position: - 520 - -120 size: - 240 - 40 card: type: custom:lcards-button preset: text-only min_height: 0 style: border: width: left: 5 color: theme:colors.ui.secondary text: label: content: DEUTERIUM 1-3 show: true position: center-left font_size: 28 color: theme:colors.ui.secondary padding: left: 16 - id: ln-tanks type: line anchor: lbl-tanks attach_to: - 281 - 60 anchor_side: top-left route_hint: xy route: angled stub_length: 115 corner_style: miter style: color: theme:colors.ui.secondary width: 5 - id: lbl-cargo type: control attachment: top-left position: - -50 - 570 size: - 300 - 40 card: type: custom:lcards-button preset: text-only min_height: 0 style: border: width: right: 5 color: theme:colors.ui.tertiary text: label: content: CARGO 4 · SEAL FAULT show: true position: center-right padding: right: 16 font_size: 28 color: theme:colors.ui.tertiary - id: ln-cargo type: line anchor: lbl-cargo attach_to: - 450 - 440 anchor_side: top-right route_hint: xy route: angled stub_length: 115 corner_style: miter style: color: theme:colors.ui.tertiary width: 5 - id: lbl-seat type: control attachment: top-left position: - 880 - 540 size: - 170 - 40 card: type: custom:lcards-button preset: text-only min_height: 0 style: border: width: left: 5 color: theme:colors.ui.secondary text: label: content: FLIGHT DECK show: true position: center-left font_size: 28 color: theme:colors.ui.secondary padding: left: 16 - id: ln-seat type: line anchor: lbl-seat attach_to: - 632 - 227 anchor_side: top-left route_hint: xy route: angled stub_length: 115 corner_style: miter style: color: theme:colors.ui.secondary width: 5 ``` **The classic version lists its labels in a column beside the drawing, and each line sweeps round into its part.** The default `corner_radius` (34) gives the broad curve; the drawing keeps its colours. ```yaml live type: custom:lcards-msd-card msd: base_svg: source: builtin:enterprise-d-shuttlecraft15-anomaly filters: - mode: css type: opacity value: 0.6 view_box: - -60 - -150 - 1160 - 800 overlays: - id: lbl-tanks type: control attachment: top-left position: - -50 - -85 size: - 240 - 40 card: type: custom:lcards-button preset: text-only min_height: 0 text: label: content: DEUTERIUM 1-3 show: true position: center-right font_size: 28 color: theme:colors.ui.primary - id: lbl-cargo type: control attachment: top-left position: - -50 - -130 size: - 240 - 40 card: type: custom:lcards-button preset: text-only min_height: 0 text: label: content: CARGO BAY 4 show: true position: center-right font_size: 28 color: theme:colors.ui.primary # a column of labels, the top one going furthest, so the lines nest - id: ln-tanks type: line anchor: lbl-tanks attach_to: - 281 - 60 anchor_side: right anchor_gap: 8 route: manhattan style: color: theme:colors.ui.secondary width: 3 - id: ln-cargo type: line anchor: lbl-cargo attach_to: - 400 - 340 anchor_side: right anchor_gap: 8 route: manhattan style: color: theme:colors.ui.secondary width: 3 ``` ## Utility pills **The Picard edge column: a bracket frame open on the outer side, a few small dark pills, and red alert at the bottom.** The frame and a layout card of pills share one grid area, and the inner layout card's padding keeps the pills inside the frame. - The bracket's bars end square on the open side; only the corners where a bar turns are rounded. A frame does this by itself when a side is off. - Pills are for the few utility controls only (zoom, settings, dimmer, red alert: three to five). Other buttons on a Picard screen are rectangular blocks. - The empty `text-only` button takes up the flexible row, so the red alert pill sits at the bottom whatever the height. On a full screen that row is a slot: a gauge pair or a code-block column fits there. - RED ALERT runs `lcards.red_alert`: tap it here and the page goes to red alert. ```yaml live type: custom:lcards-layout-card layout: height: 300px grid-template-columns: 150px grid-template-rows: minmax(0, 1fr) grid-template-areas: | "col" cards: - type: custom:lcards-elbow view_layout: grid-area: col elbow: type: frame segment: color: theme:colors.ui.secondary frame: bar_width: 14 bar_height: 36 outer_curve: 36 left: enabled: false - type: custom:lcards-layout-card view_layout: grid-area: col layout: padding: 46px 22px 46px 4px grid-gap: 8px grid-template-columns: minmax(0, 1fr) grid-template-rows: 26px 26px 26px minmax(0, 1fr) 26px cards: - type: custom:lcards-button preset: lozenge min_height: 26 text: label: content: ZOOM show: true position: center color: theme:colors.ui.secondary style: card: color: background: default: theme:colors.card.topColor - type: custom:lcards-button preset: lozenge min_height: 26 text: label: content: SETTINGS show: true position: center color: theme:colors.ui.secondary style: card: color: background: default: theme:colors.card.topColor - type: custom:lcards-button preset: lozenge min_height: 26 text: label: content: DIMMER show: true position: center color: theme:colors.ui.secondary style: card: color: background: default: theme:colors.card.topColor - type: custom:lcards-button preset: text-only min_height: 0 - type: custom:lcards-button preset: lozenge min_height: 26 text: label: content: RED ALERT show: true position: center style: card: color: background: default: var(--lcars-alert-color, var(--lcards-orange-dark)) tap_action: action: perform-action perform_action: lcards.red_alert ``` ## Concentric sweep **A thick sweep with a thin line running parallel inside it: the Picard header and corner shape.** It is a segmented elbow (`style: segmented`): `outer_segment` is the sweep and `inner_segment` the line. - Leave the inner segment's curves unset: the line then stays concentric with the sweep and keeps one even width round the corner. - Use it where nothing else turns the same corner: above a [display sweep](#display-sweep), let the display's own sweep make the corner instead. - The line ends where the sweep's bar ends. When the bar carries on as segments in the next cards, end the elbow's area at the first gap, so the line stops at that gap with the bar. - Keep the sweep's vertical part short: let the bar carry on as a segmented band beside a column of small blocks rather than as one tall block, or a wide inner block becomes a full-height slab. - Swap the weights for the other common Picard form: a thin outer band with a large curve wrapped round a wide inner block. The [split screen](dashboard-gallery#picard-split-screen) uses `outer_segment` 40 by 14 with `outer_curve: 100` round an `inner_segment` 134 by 24 (as wide as a two-block column); the lcars-shell strategy's corners have the same form. ```yaml live type: custom:lcards-elbow grid_options: rows: 3 elbow: type: header-left style: segmented segments: gap: 6 outer_segment: bar_width: 140 bar_height: 24 color: theme:colors.ui.secondary inner_segment: bar_width: 6 bar_height: 4 color: theme:colors.ui.primary text: title: content: COURSE SELECT position: bottom-right color: theme:colors.ui.tertiary ``` ## Controls inside a wide arm **A thick frame whose black inset holds a group of controls, as in the Titan console side panels.** The frame and a layout card share the area, and the layout card's padding is a little more than the frame's bars (34 px inside 24 px bars). ```yaml live controls type: custom:lcards-layout-card layout: height: 240px grid-template-columns: 290px grid-template-rows: minmax(0, 1fr) grid-template-areas: | "arm" cards: - type: custom:lcards-elbow view_layout: grid-area: arm elbow: type: frame segment: color: theme:colors.ui.primary frame: bar_width: 24 bar_height: 24 outer_curve: 0 inner_curve: 0 - type: custom:lcards-layout-card view_layout: grid-area: arm layout: padding: 34px grid-gap: 6px grid-template-columns: 1fr 1fr grid-template-rows: repeat(3, 34px) cards: - type: custom:lcards-button preset: outline min_height: 34 text: label: content: 6-3390 position: center-right show: true - type: custom:lcards-button preset: filled min_height: 34 text: label: content: 60-1204 position: center-right show: true - type: custom:lcards-button preset: outline min_height: 34 entity: light.demo tap_action: action: toggle text: label: content: 5-6549 position: center-right show: true - type: custom:lcards-button preset: panel-dark min_height: 34 text: label: content: 34-3719 position: center-right - type: custom:lcards-button preset: panel-dark min_height: 34 text: label: content: 80-1932 position: center-right - type: custom:lcards-button preset: panel-light min_height: 34 text: label: content: 8-5300 position: center-right ``` ## Segmented bar (classic arms) **Classic screens rarely run one unbroken bar across the screen: the sweep turns into a short bar, then continues as labelled segments of different lengths and roles.** Each segment is a panel in its own grid column. - Keep the elbow's area just wider than its vertical bar, and put the segments in a row the same height as the bar (40 px here). - Two to four segments per bar is plenty; more reads as a ruler. A bracket screen's header is the exception: its top bar runs on in many short coded segments. - The same works for a Picard closing bar: thin segments (14 to 20 px) in structure tones, one in the accent. ```yaml live type: custom:lcards-layout-card layout: height: 110px grid-gap: 6px grid-template-columns: 220px 3fr 1fr 4fr 2fr grid-template-rows: 40px minmax(0, 1fr) grid-template-areas: | "corner s1 s2 s3 s4" "corner . . . ." cards: - type: custom:lcards-elbow view_layout: grid-area: corner elbow: type: header-left segment: bar_width: 140 bar_height: 40 color: theme:colors.ui.primary - type: custom:lcards-button preset: panel-light min_height: 40 view_layout: grid-area: s1 text: label: content: COURSE SELECT position: bottom-right - type: custom:lcards-button preset: panel-light min_height: 40 view_layout: grid-area: s2 text: label: content: "541" position: bottom-right style: card: color: background: default: theme:colors.ui.tertiary - type: custom:lcards-button preset: panel-light min_height: 40 view_layout: grid-area: s3 text: label: content: NAV REF position: bottom-right style: card: color: background: default: theme:colors.ui.secondary - type: custom:lcards-button preset: panel-light min_height: 40 view_layout: grid-area: s4 text: label: content: FLIGHT position: bottom-right ``` ## Status rows **A label block and a long value bar per line, for readings.** The `bar-label-left` preset draws the bar with its label cut into the left end. ```yaml live type: custom:lcards-layout-card layout: height: 190px grid-gap: 6px grid-template-columns: 1fr grid-template-rows: repeat(3, minmax(0, 1fr)) cards: - type: custom:lcards-button preset: bar-label-left text: label: content: PRIMARY - type: custom:lcards-button preset: bar-label-left text: label: content: SECONDARY - type: custom:lcards-button preset: bar-label-left text: label: content: AUXILIARY ``` ## Number cascade filler **Fills a spare area with moving numbers instead of black.** A [data grid](../cards/data-grid/) in `decorative` mode needs no other keys; fixed px rows keep it dense. - Use one small cascade on a screen at most, as a slot a [readings table](#readings-table) can take over later. Numbers that mean nothing read as noise once they fill more than a corner. Short groups of three or four rows between the blocks of a [code-block column](#code-block-column) are part of that column and don't count. - Size the area to the rows: about `font_size` + 4 px per row (18 px rows at `font_size: 14`); smaller rows cut the text off. - With rows left to `auto`, a tall area spreads the numbers far apart. Give `grid.grid-template-rows` a fixed row height (about 18 px with `font_size: 14`) and as many rows as fit the area, and the columns a fixed width (about 44 px for four digits) so the numbers stay in tight groups. ```yaml live type: custom:lcards-data-grid data_mode: decorative format: digit refresh_interval: 2000 refresh_cells: 0.1 grid: grid-template-columns: repeat(6, 44px) grid-template-rows: repeat(8, 18px) gap: 2 style: font_size: 14 color: theme:colors.ui.secondary align: right ``` ## Readings table **Dense rows of short labels with live values, for the numbers on a screen that mean something.** A [data grid](../cards/data-grid/) in `data` mode: a code or short name, the entity's state as Home Assistant formats it, and a status word that follows the value. - Keep it on black, with no header box: fixed px rows about `font_size` + 6 px, and fixed px columns sized to the longest value. Labels sit left and values right; `text_transform: uppercase` makes Home Assistant's states (`On`, `beta`) read as LCARS capitals. - Colour by row (`rows[].style.color`) in one or two roles, and turn a value to the alert colour past a limit with a [state map](../cards/data-grid/data#conditional-colours). - A classic data screen's upper band is a good home: three to six rows beside the sweep, in the slot a number cascade would fill. ```yaml live type: custom:lcards-data-grid data_mode: data rows: - values: - 01-TMP - sensor.living_room_temperature - "{{ 'NOMINAL' if states('sensor.living_room_temperature') | float(0) < 24 else 'HIGH' }}" style: color: theme:colors.ui.secondary - values: - 02-HUM - sensor.living_room_humidity - NOMINAL style: color: theme:colors.ui.secondary - values: - 03-PWR - value: sensor.house_power style: color: default: theme:colors.ui.primary above:3000: var(--lcars-alert-color, var(--lcards-orange-dark)) - DRAW style: color: theme:colors.ui.primary # codes and status words left, values right columns: - style: align: left - style: align: right - style: align: left grid: grid-template-columns: 70px 70px 80px grid-template-rows: repeat(3, 20px) gap: 0px 10px style: font_size: 14 align: right text_transform: uppercase ``` ## Pill grid (classic) **Big numbers leading a group of pills, the groups in different roles.** The numbers are `text-only` buttons; each pill is a `lozenge` with its background set to a role. - The `lozenge` preset hides its label; to name a pill, add a label with `show: true` (WARP below). - For a live big number without its unit, use a template such as `{{ states('input_number.warp') | int }}`; `{entity.state}` adds the unit. ```yaml live type: custom:lcards-layout-card layout: height: 180px grid-gap: 6px grid-template-columns: 70px repeat(3, minmax(0, 1fr)) grid-template-rows: repeat(2, minmax(0, 1fr)) cards: - type: custom:lcards-button preset: text-only text: label: content: "358" show: true position: center-right color: theme:colors.ui.tertiary - type: custom:lcards-button preset: lozenge style: card: color: background: default: theme:colors.ui.primary - type: custom:lcards-button preset: lozenge style: card: color: background: default: theme:colors.ui.primary - type: custom:lcards-button preset: lozenge style: card: color: background: default: theme:colors.ui.secondary - type: custom:lcards-button preset: text-only text: label: content: "451" show: true position: center-right color: theme:colors.ui.secondary - type: custom:lcards-button preset: lozenge style: card: color: background: default: theme:colors.ui.secondary - type: custom:lcards-button preset: lozenge style: card: color: background: default: theme:colors.ui.tertiary # a named pill - type: custom:lcards-button preset: lozenge text: label: content: WARP show: true style: card: color: background: default: theme:colors.ui.primary ``` ## Bracket frame (classic) **Classic screens: a header bar with the title, a sidebar of blocks and a footer bar, round the content.** Two elbows (`header-left` and `footer-left`) with the same `bar_width` as the sidebar column make the bracket. ```yaml live type: custom:lcards-layout-card layout: height: 260px grid-gap: 6px grid-template-columns: 120px minmax(0, 1fr) grid-template-rows: 70px minmax(0, 1fr) minmax(0, 1fr) 70px grid-template-areas: | "top top" "side1 main" "side2 main" "bottom bottom" cards: - type: custom:lcards-elbow view_layout: grid-area: top elbow: type: header-left segment: bar_width: 120 bar_height: 24 color: theme:colors.ui.primary text: label: content: "STELLAR CARTOGRAPHY • 2387" position: top-right color: theme:colors.ui.tertiary - type: custom:lcards-button preset: panel-dark view_layout: grid-area: side1 - type: custom:lcards-button preset: panel-light view_layout: grid-area: side2 - type: custom:lcards-data-grid data_mode: decorative view_layout: grid-area: main - type: custom:lcards-elbow view_layout: grid-area: bottom elbow: type: footer-left segment: bar_width: 120 bar_height: 24 color: theme:colors.ui.primary ``` ## Header bar with a title **A bar that carries the screen or section title, with a short cap before it.** Picard sections (*MISSION OPS*, *PROPULSION*) use this instead of a sweep. - The title grows to fill the bar's height, so in a narrow area set a smaller `text.label.font_size` (or a shorter `min_height`) or it runs off the end. ```yaml live type: custom:lcards-button preset: bar-label-left min_height: 48 text: label: content: MISSION OPS color: theme:colors.ui.tertiary style: card: color: background: default: theme:colors.ui.tertiary ``` ## Readout rows **A label block and a horizontal gauge per line, for a set of levels read side by side.** Each line is a `panel-dark` button beside a slider with the `gauge-basic` preset; drag a level under the card to move its gauge. - A slider keeps a minimum height of about 40 px so it stays easy to drag. A thin readout gauge in a shorter row sets `height` to the row (24 here); otherwise it spills into the next row. - In rows this small, turn the gauge's scale labels off (`style.gauge.scale.labels.enabled: false`): at their default size they cover the fill. The ticks stay. - On a full screen, a thin bar reads better than a full-height fill, which turns each row into a large accent slab: set `style.gauge.progress_bar.height` to about 8 with the ticks in a structure tone. ```yaml live controls type: custom:lcards-layout-card layout: height: 80px grid-gap: 4px grid-template-columns: 110px minmax(0, 1fr) grid-template-rows: repeat(3, 24px) cards: - type: custom:lcards-button preset: panel-dark min_height: 0 text: label: content: PRIMARY position: center-right - type: custom:lcards-slider entity: input_number.primary_level preset: gauge-basic height: 24 style: gauge: scale: labels: enabled: false - type: custom:lcards-button preset: panel-dark min_height: 0 text: label: content: SECONDARY position: center-right - type: custom:lcards-slider entity: input_number.secondary_level preset: gauge-basic height: 24 style: gauge: scale: labels: enabled: false - type: custom:lcards-button preset: panel-dark min_height: 0 text: label: content: RESERVE position: center-right - type: custom:lcards-slider entity: input_number.reserve_level preset: gauge-basic height: 24 style: gauge: scale: labels: enabled: false ``` ## Gauge bank **A row of upright gauges, as on the Picard consoles: a number cap at each end, a thin value bar, a range strip and a short ruler.** Good for several readings of the same kind: each is a slider with the `picard-gauge-column` preset (the Picard component's column shape), which shows the value in its top cap. - The bottom cap shows the entity's name; give `text.name.content` a code or a short label instead when the name is too long for the cap. - Keep the gauges narrow (about 70 px) and side by side; a bank of them sits beside a code-block column. Under about 60 px, turn the scale numbers off (`style.gauge.scale.labels.enabled: false`). - The ticks are in the entity's units (a major tick every 10, a minor every 2). For another range, such as 10 to 35 °C, set `style.gauge.scale.tick_marks.major.interval` and `minor.interval` to suit. - For the wide console gauge, use the `picard-gauge-vertical` preset instead ([Picard component](../cards/slider-card/components#picard-component)). ```yaml live controls type: custom:lcards-layout-card layout: height: 420px grid-gap: 6px grid-template-columns: repeat(4, 60px) grid-template-rows: minmax(0, 1fr) cards: - type: custom:lcards-slider preset: picard-gauge-column entity: sensor.demo_temperature text: name: content: "37-88" - type: custom:lcards-slider preset: picard-gauge-column entity: sensor.demo_humidity text: name: content: "51-80" - type: custom:lcards-slider preset: picard-gauge-column entity: sensor.demo_battery text: name: content: "21-10" - type: custom:lcards-slider preset: picard-gauge-column entity: input_number.demo_level text: name: content: "65-87" ``` ## Selector strip **A row of equal tabs for choosing one of several, as in the Titan.DS fleet directory.** It is a [select menu](../cards/select-menu/) with the `toggle-tab` preset; the selected option is highlighted. - In a fixed px row (about 30 px), set `grid.grid-auto-rows` to the row's height so the tabs fit it. ```yaml live controls type: custom:lcards-select-menu entity: input_select.demo_mode preset: toggle-tab grid: columns: 4 gap: 6px ``` ## Tile wall **Small framed tiles, each with its own reading, as in the Picard signal-processing panels.** Each frame holds its reading as an embedded card ([symbiont](../cards/elbow/symbiont)): a chart, a camera, a data grid. - `imprint.enabled: false` keeps the embedded card's own styling instead of taking the frame's colours and font. ```yaml live type: custom:lcards-layout-card layout: height: 170px grid-gap: 10px grid-template-columns: repeat(3, minmax(0, 1fr)) grid-template-rows: minmax(0, 1fr) cards: - type: custom:lcards-elbow elbow: type: frame segment: color: theme:colors.card.topColor frame: bar_width: 4 bar_height: 4 outer_curve: 10 symbiont: enabled: true position: top: 10 right: 10 bottom: 10 left: 10 imprint: enabled: false card: type: custom:lcards-data-grid data_mode: decorative format: digit grid: grid-template-rows: repeat(4, auto) grid-template-columns: repeat(3, minmax(0, 1fr)) - type: custom:lcards-elbow elbow: type: frame segment: color: theme:colors.card.topColor frame: bar_width: 4 bar_height: 4 outer_curve: 10 symbiont: enabled: true position: top: 10 right: 10 bottom: 10 left: 10 imprint: enabled: false card: type: custom:lcards-data-grid data_mode: decorative format: hex grid: grid-template-rows: repeat(4, auto) grid-template-columns: repeat(3, minmax(0, 1fr)) - type: custom:lcards-elbow elbow: type: frame segment: color: theme:colors.ui.tertiary frame: bar_width: 4 bar_height: 4 outer_curve: 10 symbiont: enabled: true position: top: 10 right: 10 bottom: 10 left: 10 imprint: enabled: false card: type: custom:lcards-data-grid data_mode: decorative format: float grid: grid-template-rows: repeat(4, auto) grid-template-columns: repeat(3, minmax(0, 1fr)) ``` ## Split header (classic) **The classic split header: an upper block that sweeps down into a bar, a thin gap, and a lower block that sweeps out of the next bar.** The title sits in the black beside the upper sweep, as a text field on the upper elbow. ```yaml live type: custom:lcards-layout-card layout: height: 200px grid-gap: 8px grid-template-columns: minmax(0, 1fr) grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) cards: - type: custom:lcards-elbow elbow: type: footer-left segment: bar_width: 140 bar_height: 18 color: theme:colors.ui.primary text: title: content: PATIENT BIOMEDICAL STATUS position: top-right font_size: 26 color: theme:colors.ui.tertiary - type: custom:lcards-elbow elbow: type: header-left segment: bar_width: 140 bar_height: 18 color: theme:colors.ui.secondary ``` ## List **Rows of text in columns, for rosters, schedules and logs, such as a crew duty roster.** It is a [data grid](../cards/data-grid/) in data mode with fixed text or your entities. - The first row names the columns in another role, on black like the rest; `header: true` would draw boxed header cells. ```yaml live type: custom:lcards-data-grid data_mode: data rows: - values: [NAME, STATION, SHIFT] style: color: theme:colors.ui.secondary - [TUVOK, SECURITY, ALPHA] - [TORRES, ENGINEERING, BETA] - [PARIS, CONN, ALPHA] - [KIM, OPS, GAMMA] grid: grid-template-columns: 1fr 1fr 90px gap: 4px style: font_size: 20px columns: - style: align: left color: theme:colors.ui.tertiary ``` ## Slanted bars **Bars with a cut end, for labels and indicators (Titan console side panels).** The elbow's `bar-slant-right`, `bar-slant-left` and `bar-parallelogram` types make the whole card one bar, and `segment.diagonal_angle` sets the cut. ```yaml live type: custom:lcards-layout-card layout: height: 96px grid-gap: 8px grid-template-columns: 200px 120px grid-template-rows: 44px 44px cards: - type: custom:lcards-elbow elbow: type: bar-slant-right segment: color: theme:colors.ui.secondary text: label: content: LCARS position: center-left font_size: 22 color: var(--lcars-text-dark, var(--lcards-gray-darkest)) - type: custom:lcards-elbow elbow: type: bar-parallelogram segment: color: theme:colors.ui.tertiary diagonal_angle: 60 - type: custom:lcards-elbow elbow: type: bar-slant-right segment: color: theme:colors.ui.primary text: label: content: "47" position: center-left font_size: 22 color: var(--lcars-text-dark, var(--lcards-gray-darkest)) ``` ## Flagged blocks **Number blocks with a thin accent tick on the left, as in the Titan console's number columns.** The `panel-flagged` preset draws them; with an entity, the tick turns to the off colour while it's off. ```yaml live controls type: custom:lcards-layout-card layout: height: 150px grid-gap: 6px grid-template-columns: 140px grid-template-rows: repeat(4, minmax(0, 1fr)) cards: - type: custom:lcards-button preset: panel-flagged min_height: 0 text: label: content: "012" - type: custom:lcards-button preset: panel-flagged min_height: 0 text: label: content: "330" - type: custom:lcards-button preset: panel-flagged min_height: 0 entity: light.demo tap_action: action: toggle text: label: content: "436" - type: custom:lcards-button preset: panel-flagged min_height: 0 text: label: content: "542" ``` ## Dot rows **Rows of dots in groups, along the top or bottom edge of a frame (Titan.DS headers and footers).** It is a `text-only` button whose label is runs of `•`. ```yaml live type: custom:lcards-button preset: text-only min_height: 24 text: label: content: "• ••• •• ••••• • •• •••" show: true position: center-right color: theme:colors.ui.secondary font_size: 44 ``` ## Fleet tiles **A row of framed tiles, one per item, as in the Titan.DS fleet directory.** Each tile is a frame elbow with two text fields, the name and the class; its thicker top and bottom bars (`bar_height`) can carry a state colour. - The two fields need about 90 px of tile height; in a shorter tile, put both on one line (`NCC-1701-A · CONSTITUTION`). ```yaml live type: custom:lcards-layout-card layout: height: 150px grid-gap: 8px grid-template-columns: repeat(3, minmax(0, 1fr)) grid-template-rows: minmax(0, 1fr) cards: - type: custom:lcards-elbow elbow: type: frame segment: color: theme:colors.card.topColor frame: bar_width: 4 bar_height: 18 outer_curve: 8 text: label: content: NCC-1701-A position: top-center font_size: 14 color: theme:colors.ui.tertiary class: content: CONSTITUTION position: center font_size: 18 color: theme:colors.ui.primary - type: custom:lcards-elbow elbow: type: frame segment: color: theme:colors.ui.secondary frame: bar_width: 4 bar_height: 18 outer_curve: 8 text: label: content: NCC-1701-C position: top-center font_size: 14 color: theme:colors.ui.tertiary class: content: AMBASSADOR position: center font_size: 18 color: theme:colors.ui.primary - type: custom:lcards-elbow elbow: type: frame segment: color: theme:colors.card.topColor frame: bar_width: 4 bar_height: 18 outer_curve: 8 text: label: content: NCC-1701-E position: top-center font_size: 14 color: theme:colors.ui.tertiary class: content: SOVEREIGN position: center font_size: 18 color: theme:colors.ui.primary ``` ## Brackets and scopes **Round displays framed by bracket arcs, and radar scopes (meWho's Titan.DS and Protostar screens).** Brackets are the button's `brackets` [component](../cards/button/components#brackets), coloured by the theme roles; a scope is the Astrometrics card's [Radar scope starter](../cards/astrometrics/starters#radar-scope). - The scope is a real 3D scene: range rings, a turning sweep and contacts you can place from entities by distance and bearing, and you can tilt it. ```yaml live type: custom:lcards-layout-card layout: height: 300px grid-gap: 12px grid-template-columns: 300px grid-template-rows: minmax(0, 1fr) cards: - type: custom:lcards-button component: brackets text: label: content: "88" show: true position: center font_size: 48 color: theme:colors.ui.tertiary ``` --- # Live Demo **LCARdS running live: every view below is made of real LCARdS cards from this version, on sample entities, laid out the way a Home Assistant sections view lays them out.** Open a topic in the menu and pick a view, try the controls (the alert buttons, sliders, taps on the cards), then open **YAML of this view** to copy it, or follow the **Docs** button on the view to read about the feature. **Show** at the top of the menu picks one release: the views of what is new in , or of an earlier release. - **Whole-screen dashboards** are shown at the window size they were made for (1600 px wide, or a phone's width), so their layout is the one Home Assistant shows. On a narrower screen, scroll the view sideways. - **A few taps only work in Home Assistant,** such as opening an entity's details or going to another view. A view that has them says so under it; everything else (toggles, sliders, alert buttons, templates, cards shown only while a condition holds) works here. The same views make up the demo dashboard the LCARdS developers check every release on. ## In your own Home Assistant **Paste a view's YAML into a dashboard (Edit dashboard > Raw configuration editor) and add the helpers it uses.** The views drive `lcards_test_*` helpers (sliders, toggles, a select), so they work unchanged once those helpers exist: add this to `configuration.yaml` (or a file in your `packages/` folder) and restart Home Assistant. Afterwards you can delete the helpers again, or swap them for your own entities in the YAML.
{{ data.helpers }}
A few views also read a real temperature sensor, `sensor.desk_sensor_temperature`: replace it with any temperature sensor of yours. --- # Preview Your YAML **Paste LCARdS YAML below, or open a preview link, to see it as real cards before you put it on a dashboard.** The cards are the same LCARdS bundle your Home Assistant runs, on sample states. - **Works with** one card, a view, or a whole dashboard: a dashboard with several views gets a tab for each. - **Private:** the YAML stays in your browser. A preview link carries it after the `#`, a part of the address that browsers never send to a server. - **Sample states:** entities you name get a believable state for their domain (a light on or off, a sensor with a number), so the values are examples. Taps on toggles and sliders change them, as in the [live demo](live-demo). ## Preview links from an AI assistant **When Claude with the [LCARdS skill](ai-assistance) designs a dashboard with you, it can give you a link to this page with the YAML inside.** Open it to see the draft before you paste anything. - Claude makes the link when it can run code (Claude Code, or claude.ai and the Claude apps with code execution turned on). Without that, it gives you the YAML: paste it above. - A link for a big dashboard is long. If the chat cuts it off, the page says the link couldn't be read; paste the YAML instead. - **Copy link to this preview** makes a link for whatever is in the editor, to share or keep. ## What a preview can't show **A preview is a close look, not your dashboard: your own states, theme and other cards aren't here.** - **Other cards:** cards that aren't LCARdS (tiles, entities, custom cards from HACS) show as an empty space the size of the card. - **Your theme:** cards show LCARdS' default colours, as on a dashboard without a theme. Your theme's own colours appear once the YAML is on your dashboard. - **Strategies:** a dashboard strategy such as the LCARS shell builds its views inside Home Assistant, so it can't be previewed here. - **Problems in the YAML:** the page runs the [config checker](config-checker) and says how many errors and warnings it found; fix those first, as the preview may differ from Home Assistant until they're gone. --- # Section Strategies **An automatic section fills itself with cards for the area (or devices, labels, entities) you pick, and stays up to date.** LCARdS adds three to Home Assistant's sections dashboards, each an LCARS building block: readings, gauges and controls, drawn in the classic (TNG) or the Picard look. - They work in any sections view, beside your own sections and Home Assistant's built-in automatic sections. - When you add a light to an area, rename a sensor or move a device, the section rebuilds itself. You change its settings, not its cards. - Every section has a title and uses your theme's LCARS colours. A frame in the section's look is one switch away. - For more than these settings, take control of the section and edit its cards. ![LCARS sections on a sections dashboard: readings, gauges and controls, in the classic look with a bracket frame (top) and the Picard look (bottom)](/img/strategies/lcars-sections.webp) | Section | In the chooser | Classic look | Picard look | |---|---|---|---| | [`custom:lcars-readings`](#lcars-readings) | LCARS readings | A number column: big values beside their names | A numbered readings table | | [`custom:lcars-gauges`](#lcars-gauges) | LCARS gauges | Pill bars with the name in the end cap | Upright column gauges | | [`custom:lcars-controls`](#lcars-controls) | LCARS controls | Rounded pills | Filled buttons beside a thin bar | ## Add a section **Sections are added in the dashboard's edit mode, from Create section.** The dashboard's view must be a sections view, Home Assistant's default for new dashboards. 1. Open the dashboard, select the pencil, and select the **Create section** tile at the end of the view. 2. Pick **Automatic section**, then one of the LCARS sections under **Community sections**. Each tile shows a preview built from the area with the most matching entities. 3. On the **Strategy** tab, pick an area (or devices, floors, labels or entities), and if you like a title, the look, a frame, how many items sit side by side and the spacing. Save. ::: details More about adding sections - **Not in the chooser:** the Community sections heading appears only when the browser has loaded LCARdS. Hard refresh the page (Ctrl+Shift+R) after installing or updating. - **Change it later:** select the section's pencil in edit mode; the Strategy tab holds its settings, and the three-dot menu shows them as YAML. - **Width and visibility:** the section's other tabs (appearance, visibility) work as for any section. - **Take control:** to change more than the settings, take control of the section in its menu; it becomes ordinary LCARdS cards that no longer update themselves. ::: ## Section keys **Every LCARS section takes the same keys: the two of Home Assistant's own Entities section (`title`, `target`) and nine for its look and sizes.** The settings form writes them for you; this is what its YAML looks like inside a sections view. - `target` can name several things at once; the section shows the matching entities of all of them. - Hidden entities and configuration or diagnostic entities are left out, unless you name them under `entity_id`. - Names are shortened for the small LCARS labels: the area's name and any words every name in the section starts with are dropped ("Bridge Temperature" in the Bridge reads TEMPERATURE). - The frame follows the look: the classic bracket, open on the right, is built in pieces like the DS9 brackets (a sweep that runs on as the title bar, a bar down the left and a closing sweep, with small breaks between them); the Picard sweep runs along the top, down the left and along the bottom, open on the right, under the Picard title (a thin bar with the title at its end). - The classic bracket's side breaks into blocks as the section grows taller (about one per 90 px), as on the TNG panels; `codes: true` puts a random code number on each. - Sizes have four keys: `item_height` for each row of items, `gap` between items, `padding` between the items and the frame (or the section's edges), and `header_gap` between the title and the first row. Leave them out for what suits the look; give sections side by side the same `item_height` to line their rows up. ```yaml type: sections sections: - strategy: type: custom:lcars-readings title: BRIDGE target: area_id: bridge - strategy: type: custom:lcars-controls look: picard frame: true columns: 3 item_height: 40 gap: 8 header_gap: 12 target: floor_id: deck_1 entity_id: - switch.coffee_maker ``` | Key | Type | Default | Description | |---|---|---|---| | `type` | string | required | The section: `custom:lcars-readings`, `custom:lcars-gauges` or `custom:lcars-controls` | | `title` | string | the area's name | The title's text. Without it: the target's area name when the target is one area, else READINGS, LEVELS or CONTROLS | | `look` | string | `classic` | `classic` (TNG-era pills and bars) or `picard` (column gauges, filled buttons, a readings table) | | `frame` | boolean | `false` | A frame round the items in the look's style: a bracket in pieces with the title in its top bar (classic) or a sweep open on the right (Picard) | | `codes` | boolean | `false` | Classic frame only: a random code number at the bottom right of each block of the bracket's side | | `columns` | number | per section | Items side by side, 1 to 6. The Picard readings table is always one column | | `max_items` | number | per section | At most this many items: 12 readings, 8 gauges or 24 controls unless set | | `item_height` | number | per section | Height of each row of items, px (in a readings table, of each line). Rows are then exactly this tall, so sections side by side line up. Kept above a floor per kind (120 for Picard column gauges) | | `gap` | number | `6` | Space between the items, px (0 to 64) | | `padding` | number | per look | Space between the items and the frame or the section's edges, px: `18` in a classic bracket, `16` in a Picard sweep, the gap beside the Picard controls' side bar, else `0` | | `header_gap` | number | per look | Space between the title (or the bracket's top bar) and the first row, px: `18` in a classic bracket, else `8` | | `target.area_id` | string or list | - | Areas: entities in the area, directly or through their device | | `target.floor_id` | string or list | - | Floors: every area on them | | `target.device_id` | string or list | - | Devices: their entities | | `target.label_id` | string or list | - | Labels on entities, devices or areas | | `target.entity_id` | string or list | - | Entities, always shown in the section whatever their domain, even when hidden; an area, device, floor or label brings in only what suits the section | ## lcars-readings **Each sensor's name and its value: a number column, as on the TNG operations panels, or a readings table.** Use it for an area's temperature, humidity, power and the like. - Sensors with a device class or a unit are listed; temperature, humidity, light level, CO2, pressure, power, energy and battery come first, in that order, then the rest by name. - Number column: each value as a big number, a small block, then the name in a pill (classic) or a filled button (Picard); tap the name for its more-info dialog. It is the classic look's default. - Table: names and values in rows; the Picard table numbers its rows and lights the first in the accent colour. It is the Picard look's default. ```yaml type: sections sections: - strategy: type: custom:lcars-readings mode: table target: area_id: living_room ``` | Key | Type | Default | Description | |---|---|---|---| | [Section keys](#section-keys) | | | `type`, `title`, `target`, `look`, `frame`, `codes`, `columns`, `max_items`, `item_height`, `gap`, `padding`, `header_gap` | | `mode` | string | `numbers` classic, `table` Picard | `numbers` (the number column) or `table` | | `columns` | number | `1` | Number-column rows side by side; a table is always one | ## lcars-gauges **Gauges for levels: classic pill bars, or a bank of upright Picard column gauges with the value in the top cap and a short name in the bottom one.** Use it for humidity, battery, a temperature, a number helper or the lights of a room. - From an area, device or label: sensors in % and temperature, humidity or battery sensors, number helpers and number entities, dimmable lights (brightness), fans (speed), covers (position) and media players (volume). Drag a gauge to set what it can set: a light's gauge follows your finger while you drag. - An entity you pick yourself is always a gauge, whatever its domain; so a dimmable light can be a toggle in a controls section and a gauge here. - A Picard cap shows one word, shortened (TEMP, HUMID, BATT); a classic bar shows the whole short name in its left cap. ```yaml type: sections sections: - strategy: type: custom:lcars-gauges title: LEVELS frame: true codes: true target: label_id: climate ``` | Key | Type | Default | Description | |---|---|---|---| | [Section keys](#section-keys) | | | `type`, `title`, `target`, `look`, `frame`, `codes`, `columns`, `max_items`, `item_height`, `gap`, `padding`, `header_gap` | | `columns` | number | `1` classic, `4` Picard | Gauges side by side | ## lcars-controls **Toggles for the lights, switches, fans and toggle helpers of the target: classic rounded pills, or Picard filled buttons beside a thin bar.** Tap one to toggle it, hold it for its more-info dialog. - A pill or button shows its entity's state by colour. ```yaml type: sections sections: - strategy: type: custom:lcars-controls look: picard target: area_id: kitchen ``` | Key | Type | Default | Description | |---|---|---|---| | [Section keys](#section-keys) | | | `type`, `title`, `target`, `look`, `frame`, `codes`, `columns`, `max_items`, `item_height`, `gap`, `padding`, `header_gap` | | `columns` | number | `2` | Pills or buttons side by side | --- # What is LCARdS? **LCARdS builds Star Trek LCARS-style dashboards in Home Assistant: a set of cards and services that work together as one system.** It includes buttons, elbows, sliders, charts, data grids, ship displays and more, designed to pair with the [HA-LCARS theme](https://github.com/th3jesta/ha-lcars). ## How it works **Three layers, plus a small integration running inside Home Assistant.** ## What that gives you **One system instead of separate cards, so the whole screen reacts together.** - **Colours that follow state:** a button lights up when its light is on, a reading turns red past a threshold. No automations needed. - **One look everywhere:** every card takes its colours, fonts and sizes from the same theme, so the whole screen matches. - **Screen-wide reactions:** [rules](../core/rules/) restyle many cards at once, and [alert mode](../core/alert-mode) repaints the whole dashboard. - **Live values anywhere:** put a sensor value, a smoothed reading or a [template](../core/templates/) in any label. - **Motion and sound:** [animations](../core/animations) and LCARS [sounds](../core/sounds) on taps and state changes. - **Control from automations:** [actions](../configuration/ha-actions) like `lcards.red_alert` work from scripts, automations and voice. ## Next steps 1. **[Install LCARdS](installation)**: from the Home Assistant Marketplace, then a quick setup. 2. **[Build a dashboard](building-dashboards)**: generate one, add LCARS sections, design one with Claude, borrow a sample layout or lay out a screen by hand. 3. **[Browse the gallery](dashboard-gallery)**: copy a complete dashboard and make it yours. 4. **[Get AI help](ai-assistance)**: let an assistant write the YAML for you. ::: info A hobby project LCARdS is a fan-made hobby project, not a fully commissioned Starfleet product: expect the occasional tribble. If something in these docs doesn't match what you see, please [open an issue](https://github.com/snootched/lcards/issues). ::: --- # Configuration **The LCARdS Config Panel is the sidebar page where you set LCARdS up for the whole installation: its helpers, alert mode colours, sounds, the connection overlay, and the users and devices that have their own settings.** The integration adds it to the sidebar as **LCARdS Config**. - Card settings live in each card's YAML or editor. The panel holds what is shared: the Home Assistant helpers LCARdS reads, and settings stored by the integration. - Some settings can differ per user or per device (sounds, the connection overlay, theme token overrides). The panel's scope switches choose which level you are editing. - Every tab has a **Docs** link at its top right that opens its page here. ::: tip New install? Start with [First setup](../getting-started/installation#_3-first-setup): create the helpers, then tune alert modes and sounds. ::: | Page | Covers | |------|--------| | [Persistent Helpers](./persistent-helpers) | Every helper LCARdS and HA-LCARS use, and how to create them by hand | | [Users & Devices](./users-devices) | Device names and ids, and who has their own settings | | [HA-LCARS Theme Profiles](./ha-lcars-theme-profiles) | The two LCARdS profiles HA-LCARS ships | | [HA-LCARS Theme Lab](./ha-lcars-theme-lab) | Building your own HA-LCARS theme profile | | [Alert Mode Lab](./alert-mode-lab) | How each alert mode recolours your dashboards | | [Sound Configuration](./sounds) | Sound schemes, categories, per-event sounds, browser autoplay | | [Fonts](./fonts) | The fonts LCARdS includes, adding your own in the Fonts tab, HA-LCARS's Tungsten | | [Home Assistant Actions](./ha-actions) | The `lcards.*` actions for automations and scripts | | [Using browser_mod](./browser-mod) | LCARdS effects next to browser_mod popups | | [Connectivity](./connectivity) | The overlay shown when the dashboard loses Home Assistant | --- ## Accessing the Panel **Open LCARdS Config in the Home Assistant sidebar.** The integration registers it on install; there is nothing to add to your dashboards. - If the entry is missing, open **Settings > Devices & services > LCARdS > Configure** and turn on **Show sidebar panel**. It appears at once, with no restart. - The same screen sets the sidebar title and icon, the log level and preview features: see [Integration options](../getting-started/installation#integration-options). - A link can open a tab directly: `/lcards-config?tab=theme`. The tab names are `welcome`, `helpers`, `theme`, `connectivity`, `sounds`, `fonts`, `users`, `packs` and `storage`. --- ## Panel Tabs **The panel has a tab for each area.** Storage shows for Home Assistant administrators only. ### Welcome **The first tab: a setup checklist, a guide to the other tabs, a health check of your installation and links.** - **Get Started** lists the first steps: create the helpers, customize the alert modes in the Alert Lab, customize sounds. - **Panel guide** describes each tab; a click on one opens it. - **Support & system info** checks your setup and shows the LCARdS, integration, Home Assistant and frontend versions. **Report an issue** opens a pre-filled GitHub bug report for you to review (nothing is sent on its own), and **Copy support info** copies the same report. ### Helpers **Lists every Home Assistant helper LCARdS uses, with its value and whether it exists, and creates the missing ones.** - When any helper is missing, a banner says how many; **Create All** creates them all and gives each its default value. Each table row can also create one helper. - The helpers are grouped into **Alert Lab Configuration**, **HA-LCARS Theme Settings** and **Sound System**. **Reset to Defaults** on a group sets its helpers back to their default values (the sound scheme choice is left alone). - Helpers are ordinary `input_*` entities: they survive restarts and automations can read and change them. See [Persistent Helpers](./persistent-helpers). ::: tip First launch Open the **Helpers** tab and click **Create All** before using anything else. This creates every helper LCARdS uses for alert mode, sounds and the alert colours, plus the HA-LCARS theme helpers, in one step. ::: ### Theme Studio **The theme tools, one per tab: the two labs, the token and CSS variable browsers, and token overrides.** - **LCARdS Alert Mode Lab**: tune how each alert mode recolours your dashboards, then save it to helpers. See [Alert Mode Lab](./alert-mode-lab). - **HA-LCARS Theme Lab**: build your own HA-LCARS theme profile, with full palettes, LCARS chrome and state colours. See [HA-LCARS Theme Lab](./ha-lcars-theme-lab). - **LCARdS Theme Tokens**, **LCARS CSS Variables** and **All CSS Variables** browse the active theme's tokens and the page's CSS variables: find the `theme:colors.ui.primary` path to use in card config, or the variable behind a colour. - **Token Overrides** changes a token's value for everyone, for one user or for one device. A card editor's **Main Engineering > Theme** tab lists the tokens that card uses and links here. See also [Alert Mode](../core/alert-mode) and [Themes](../core/themes/). ### Connectivity **Sets up the full-screen overlay shown when a browser loses its connection to Home Assistant, so a kiosk never goes stale without anyone noticing.** - The overlay can show styled text, any card, or the Borg assimilation, over effect layers you choose. - It is off until you turn it on, and can be set for everyone, one user or one device. See [Connectivity](./connectivity). ### Sounds **Turns LCARS sounds on, picks the sound scheme and changes or mutes single events.** - Sound categories (card interactions, UI navigation, alerts) switch groups of events on and off. - Users and devices can have their own volume, scheme and event sounds without changing the defaults. See [Sound Configuration](./sounds). ### Fonts **Turns the font files you add into fonts you can use in cards, themes and other dashboards, without copying files or writing YAML.** - A dropped file becomes one of your fonts, named after the font in it; one of your fonts can also stand in for the bring-your-own fonts, and each can have other names (like `Tungsten` for HA-LCARS) and its own size and spacing. - Administrators add and delete files and change fonts; everyone else sees the tab read-only. See [Fonts](./fonts). ### Users & Devices **Shows this browser's device name and id, and lets administrators see and tidy the users and devices that have their own settings.** - Anyone can rename their own device here. Device names are what [targeted actions](./ha-actions#targeting) use. - Administrators also see every user with stored settings and every registered device. See [Users & Devices](./users-devices). ### Pack Explorer **Browses every content pack loaded in LCARdS and what each one adds.** - Packs are listed with their themes, style presets, components and their presets, animations, SVG assets, fonts, sounds, images and textures. - Picking an item shows its details and, for themes, presets and SVG assets, a preview. ### Storage [advanced] **Shows the raw key and value store the integration keeps for LCARdS settings that are not in helpers.** Visible to administrators only. :::warning Advanced: use with caution Editing or deleting a key here changes LCARdS settings directly, with no checks. Use it to inspect or repair stored settings. ::: - Lists every stored key, with a JSON viewer and an editor for each value. - Deletes one key, after a confirmation, or resets the whole store, after an explicit confirmation. - Useful for debugging, recovering from a broken stored value, or seeing what per-user and per-device settings hold. --- ## HA-LCARS Theme Profiles **[HA-LCARS](https://github.com/th3jesta/ha-lcars) includes two theme profiles made for LCARdS.** They map the LCARdS palette onto the HA-LCARS chrome and Home Assistant's own colour tokens, so stock Home Assistant screens, LCARdS cards and the HA-LCARS chrome share one palette, alert mode colour shifts included. Pick one as your Home Assistant theme; there is nothing to install separately. See [HA-LCARS Theme Profiles](./ha-lcars-theme-profiles). --- # Alert Mode Lab **The Alert Mode Lab tunes how each alert mode recolours your dashboards, shows the result, and saves it to helpers so it lasts.** It is the first tab of **LCARdS Config > Theme Studio**. - An alert mode turns every theme colour toward one hue and changes its saturation and lightness. Red, yellow and blue alert also pull colours into a hue band; black alert pushes dark colours darker and light ones lighter. - Green alert is the baseline (the theme's own colours) and has nothing to tune. - [Alert Mode](../core/alert-mode) explains what alert mode does and how to raise it. ::: tip Prerequisites **Save to helpers** needs the Alert Mode Lab helpers. Click **Create All** in the [Helpers tab](./index.md#helpers) first. ::: --- ## Using the Lab **Pick a mode, move the sliders, apply it to see it, then save.** - **Alert mode** picks the mode to tune. With **Apply the mode when selected** on, choosing a mode also applies it. - **Apply Live** applies the mode with the Lab's current values in this browser, so you can open a dashboard and look. It does not change `input_select.lcards_alert_mode` or other browsers. - **Reset** puts the mode's sliders back to their built-in values. **Save to helpers** writes them to the mode's [helpers](./persistent-helpers#alert-mode-lab-parameters); every browser uses the saved values the next time that mode is raised. - The right side has three views: **Live Preview** (key LCARS colours in the mode), **HSL Wheel** (how each colour moves; circles are green alert, squares the selected mode) and **Full Comparison** (every LCARS colour variable, before and after). --- ## Core Transform Parameters **The four sliders every mode has: the hue colours turn toward, how far they turn, and how saturated and light they are.** | Slider | Range | Description | |--------|-------|-------------| | **Hue Target** | 0 to 360° | The hue every colour is turned toward | | **Hue Strength** | 0 to 1 | How far colours turn: `0` leaves hues alone, `1` turns them all the way | | **Saturation** | 0 to 3× | Multiplies saturation: below 1 is more muted, above 1 more vivid | | **Lightness** | 0 to 2× | Multiplies lightness: below 1 is darker, above 1 brighter | ## Hue Anchoring **Red, yellow and blue alert also pull colours into a band of hues, so the whole palette reads as one colour family.** Colours already near the band move little; the rest are pulled in. | Slider | Range | Description | |--------|-------|-------------| | **Center Hue** | 0 to 360° | Centre of the band | | **Range** | 0 to 180° | How far the band reaches either side of the centre | | **Pull Strength** | 0 to 1 | How strongly colours are pulled into the band | ## Contrast Enhancement **Black alert splits colours at a lightness threshold: colours below it get darker and colours above it get lighter, which keeps text readable on a near-black screen.** | Slider | Range | Description | |--------|-------|-------------| | **Threshold** | 0 to 100% | The lightness that splits dark colours from light ones | | **Dark Multiplier** | 0 to 1 | Multiplies the lightness of colours below the threshold | | **Light Multiplier** | 1 to 2 | Multiplies the lightness of colours above the threshold | --- ## Defaults **The values each mode starts with: what its helpers are created with, and what LCARdS uses when they are missing.** Saturation and lightness are shown as multipliers here; the helpers store them as percentages (`1.4` is `140`). | Mode | Hue Target | Hue Strength | Saturation | Lightness | Anchor (centre, range, strength) | Contrast (threshold, dark, light) | |------|-----------|--------------|------------|-----------|----------------------------------|-----------------------------------| | Red | 0° | 0.8 | 1.4× | 0.9× | 0°, 60°, 0.9 | - | | Yellow | 45° | 0.9 | 1.5× | 1.05× | 45°, 50°, 0.9 | - | | Blue | 210° | 0.85 | 1.5× | 1.0× | 210°, 70°, 0.85 | - | | Gray | 0° | 0 | 0× | 1.0× | - | - | | Black | 0° | 0 | 0× | 0.7× | - | 69%, 0.6, 1.0 | --- ## Related - [Alert Mode](../core/alert-mode): how alert mode works, how to raise it, and how cards respond - [Persistent Helpers](./persistent-helpers#alert-mode-lab-parameters): the helper behind each slider - [Sound Configuration](./sounds): the sound each alert mode plays --- # Using LCARdS with browser_mod **LCARdS and [browser_mod](https://github.com/thomasloven/hass-browser_mod) work side by side: LCARdS draws full-screen alerts, effects and colour changes, and browser_mod handles popups, navigation and browser sensors.** They don't get in each other's way. - A typical pairing: browser_mod shows the popup with the buttons, LCARdS sets the mood behind it. - Each tool has its own id for a browser: see [Pattern 3](#pattern-3-targeted-effect-on-one-device). ::: info No dependency LCARdS works fully without browser_mod installed. Everything here is optional. ::: --- ## Integration Patterns ### Pattern 1: LCARdS effects alongside a browser_mod popup **browser_mod shows the information and the buttons; an LCARdS screen effect darkens and tints the screen behind them.** ```yaml actions: - action: browser_mod.popup data: title: Security Alert content: type: entities entities: - binary_sensor.front_door - binary_sensor.hallway_motion right_button: Acknowledge right_button_action: action: browser_mod.close_popup - action: lcards.trigger_effect data: duration: 10000 layers: backdrop: preset: blur amount: 10px color: preset: color-tint color: alpha(var(--lcars-alert-red), 0.3) canvas: preset: static opacity: 0.25 ``` --- ### Pattern 2: Full LCARS alert with browser_mod acknowledgement button **LCARdS holds the alert; browser_mod's popup clears it when someone acknowledges.** ```yaml actions: - action: lcards.red_alert - action: browser_mod.popup data: title: CONDITION RED content: type: markdown content: Motion detected at **Front Entrance**. Acknowledge to clear. right_button: Acknowledge & Clear right_button_action: action: lcards.clear_alert left_button: Keep Active left_button_close: true dismissable: false ``` --- ### Pattern 3: Targeted effect on one device **Both tools can act on one browser, each by its own id.** ::: warning Independent device IDs The LCARdS device name and browser_mod's `BrowserID` are separate. To give a tablet the same name in both, open it once with both URL parameters: `?lcards_device=kitchen-tablet&BrowserID=kitchen-tablet`. ::: ```yaml actions: - action: lcards.trigger_effect data: duration: 15000 target_device_names: - kitchen-tablet layers: backdrop: preset: blur amount: 8px color: preset: color-tint color: alpha(var(--lcars-alert-red), 0.35) - action: browser_mod.popup data: title: Kitchen Timer content: Timer expired - check the oven! timeout: 15000 target: browser_id: - kitchen-tablet ``` --- ### Pattern 4: browser_mod activity sensor gating an LCARdS effect **browser_mod's sensors tell you whether a tablet is in use; play the effect only then.** ```yaml conditions: - condition: state entity_id: binary_sensor.kitchen_tablet_browser state: "on" actions: - action: lcards.trigger_effect data: duration: 5000 target_device_names: - kitchen-tablet layers: canvas: preset: glitch intensity: 0.5 ``` --- ### Pattern 5: Trigger LCARdS effects from browser_mod JavaScript **browser_mod can run LCARdS's browser console API directly, with no round trip to the server.** - `window.lcards.screenEffect.play()` plays one effect for a while; `window.lcards.screenEffect.applySlot()` keeps one on a layer until it is cleared. See the [console API](/core/effects/screen-effects#console-api). ```yaml action: browser_mod.javascript data: code: "window.lcards?.screenEffect?.play('static', { duration: 2000, opacity: 0.4 })" ``` As a card's `tap_action` (browser_mod reads `service:` inside its own `browser_mod:` block; that is browser_mod's grammar, not a Home Assistant action): ```yaml tap_action: action: fire-dom-event browser_mod: service: browser_mod.javascript data: code: "window.lcards?.screenEffect?.play('glitch', { duration: 1500 })" ``` An effect that stays until cleared: ```yaml action: browser_mod.javascript data: code: "window.lcards?.screenEffect?.applySlot('canvas', 'scanlines', { opacity: 0.2 })" ``` --- ## Reference ### Service quick reference **Which action to use for what.** The LCARdS ones are on the [Home Assistant Actions](./ha-actions) page. | Intent | Action | |---|---| | Red alert everywhere | `lcards.red_alert` | | Red alert on one device | `lcards.red_alert` with `target_device_names` | | Screen blur, tint or canvas effect | `lcards.trigger_effect` | | Clear screen effects | `lcards.clear_effect` | | Clear the alert | `lcards.clear_alert` | | A card over the whole screen | `lcards.show_portal_card` | | A popup with buttons | `browser_mod.popup` | | Navigate a browser | `browser_mod.navigate` | | A toast notification | `browser_mod.notification` | | Reload a browser | `lcards.reload` or `browser_mod.refresh` | | Run JavaScript in a browser | `browser_mod.javascript` | | Set a browser's Home Assistant theme | `browser_mod.set_theme` | ### Capability comparison **What each tool can do.** | | LCARdS | browser_mod | |---|---|---| | Full-screen visual overlay | Yes: backdrop, colour and canvas layers | Partly: a dialog, not a screen overlay | | Recolouring the whole interface | Yes: alert modes shift every `--lcars-*` and `--lcards-*` colour | No | | Backdrop filters and canvas animations | Yes | No | | An alert state that lasts | Yes: `input_select.lcards_alert_mode` | No | | Popup dialogs with buttons | Partly: an [alert overlay](../cards/alert-overlay/) card or [`lcards.show_portal_card`](./ha-actions#lcards-show-portal-card) can show any card | Yes | | Browser navigation | No | Yes | | Per-browser sensors | No | Yes: path, activity, battery, viewport and more | | Screen on and off (Fully Kiosk) | No | Yes | | Per-device and per-user targeting | Yes | Yes | | Running JavaScript remotely | No | Yes: `browser_mod.javascript` | --- # Connection Overlay **The connection overlay covers the screen when a browser loses its connection to Home Assistant, and takes itself away when the connection is back.** On a wall tablet or kiosk you see at once that the dashboard is offline, instead of a screen quietly going stale. - It is set up in the **Connectivity** tab of **LCARdS Config**, and is off until you turn it on. - It can show styled text, any card, or the [Borg assimilation](/core/borg), over animated effect layers. - Settings can be the same everywhere, or differ for one user or one device. ::: tip Try it **Simulate Disconnect** at the bottom of the tab shows the overlay with your current settings, saved or not, while the dashboard keeps running. ::: --- ## How it works **LCARdS watches each browser's connection to Home Assistant and shows the overlay when it drops.** - After a drop it waits for the [disconnect tolerance](#general) (2.5 seconds by default) before showing the overlay, so short blips during a restart or a network handover pass unseen. - When the connection is back, and has held for a second, the overlay goes. A short **Connection Restored** message can show first. - The overlay covers everything on the page, Home Assistant's own sidebar and header included. It does not wait for the alert mode: during an alert it shows over the alert overlay, and its effect layers take the place of the alert's. --- ## Setting up **Open LCARdS Config > Connectivity, change the settings, and click Save.** - Nothing is live until you save. A banner says when there are unsaved changes; **Discard changes** goes back to the stored values. - Pick the [scope](#scope-and-per-device-overrides) first (Global, User or Device): **Save** writes to that one. --- ## General **Turns the overlay on, lets people close it, and sets how long a drop must last before it shows.** | Setting | Default | Description | |---------|---------|-------------| | **Enable connection overlay** | off | Show the overlay when the connection to Home Assistant is lost | | **Allow user to dismiss** | on | A click on the overlay's backdrop closes it. It comes back at the next disconnect | | **Disconnect tolerance (ms)** | `2500` | How long to wait after a drop before showing the overlay, `0` to `30000`. `0` shows it at once; 2000 to 5000 suits phones and shaky connections | --- ## Screen Overlay **What the overlay shows when the connection is lost, and when it comes back.** The section is collapsed at first. ### Display style **Display style picks one of three kinds of overlay.** - **Simple text:** styled text over the effect layers. See [Simple text mode](#simple-text-mode). - **Custom card (YAML):** any Home Assistant card, centred or placed where you like. See [Custom card mode](#custom-card-mode). - **Resistance is Futile:** the Borg assimilation runs instead of an overlay. See [Borg mode](#borg-mode). ### Simple text mode **Styled text, with its own font, size and colour, for the lost and the restored message.** #### Connection Lost | Setting | Default | Description | |---------|---------|-------------| | **Message text** | `Connection Lost` | The text shown while disconnected | | **Text colour** | `var(--error-color)` | Any CSS colour, CSS variable or theme token | | **Font** | `Antonio` | Pick from the font list, or type a font name | | **Size** | `42` px | Font size, `1` to `200` px | | **Weight** | `400` | CSS font weight: `400`, `700`, `bold`, `lighter` ... | | **Transform** | UPPERCASE | **UPPERCASE**, **Title Case** or **None** | #### Connection Restored **A short message when the connection is back, which goes by itself.** | Setting | Default | Description | |---------|---------|-------------| | **Show reconnect message** | on | Show the message on reconnect. Off: the overlay just goes | | **Message text** | `Connection Established` | The text shown on reconnect | | **Text colour** | `var(--primary-color)` | Any CSS colour, CSS variable or theme token | | **Font**, **Size**, **Weight**, **Transform** | as for Connection Lost | Set separately from the lost message | | **Auto-dismiss after (seconds)** | `3` | How long the message stays, `1` to `30` seconds | The restored message shows only when the overlay itself was shown: a drop shorter than the tolerance shows neither. ### Custom card mode **Any Home Assistant card as the disconnect screen: an LCARdS button, a picture, a markdown card, a whole stack.** Paste its YAML into the editor; it shows over the effect layers. - Grids and stacks may need a width and height: CSS units such as `400px`, `30vw` or `auto`. ```yaml live # A card to paste into Connection Lost Card type: custom:lcards-button preset: lozenge text: name: content: NO SIGNAL show: true style: card: color: background: var(--lcars-alert-red) ``` #### Connection Lost Card | Setting | Default | Description | |---------|---------|-------------| | **YAML editor** | empty | The card's YAML, as in a dashboard | | **Position** | centre | Where the card sits: one of nine places, from top left to bottom right | | **Width** | `auto` | CSS width: `400px`, `40vw`, `auto` | | **Height** | `auto` | CSS height: `300px`, `30vh`, `auto` | #### Connection Restored Card | Setting | Default | Description | |---------|---------|-------------| | **YAML editor** | empty | A card shown on reconnect. Empty: the text reconnect message shows instead | | **Show reconnect message** | on | Show the card (or text) on reconnect | | **Auto-dismiss after (seconds)** | `3` | How long it stays, `1` to `30` seconds | ### Borg mode **Resistance is Futile: on disconnect the [Borg assimilation](/core/borg) runs instead of an overlay, and reverses when the connection is back.** The dashboard turns Borg green, its font changes, and the assimilation intro plays over it. - The assimilation starts once the [disconnect tolerance](#general) has passed, as the overlay does, so a short blip shows nothing. A click ends the intro; the Borg colours and effects stay until the connection returns, when the normal deassimilation plays. - Messages, cards and the Effect Layers section are not used. Instead the mode has its own **Canvas Effect** (always the Borg intro, with its settings), **Backdrop Filter**, **Colour Tint**, **Palette Hue** and **Font Swap**. - **Simulate Disconnect** runs the assimilation with these settings; **Simulate Reconnect** or **Clear Test** reverses it. | Setting | Default | Description | |---------|---------|-------------| | **Canvas Effect** | the Borg intro: 8 sites, 5 tendrils each, 600 px, 2 particles | The intro's settings: renderer, injection sites, tendrils, particles, colours, cube, signal corruption and overrun. See [intro.canvas](/core/borg#intro-canvas) | | **Backdrop Filter** | `saturate` `200%` | A filter on the dashboard during the intro, or **None (disabled)** | | **Colour Tint** | `color-tint`, a dark green | A colour over the dashboard during the intro, or **None (disabled)** | | **Palette hue (degrees)** | `110` | The hue the dashboard colours turn toward, `0` to `359`: `0` red, `60` yellow, `110` Borg green, `180` cyan, `240` blue, `300` magenta | | **Enable Borg font replacement** | on | Off: the dashboard keeps its font; everything else still runs | --- ## Effect Layers **Three full-screen effect layers behind the message, each set on its own: an animated canvas, a colour overlay and a backdrop filter.** The section is collapsed at first, and is hidden in Borg mode. | Layer | What it does | Default | |-------|--------------|---------| | **Canvas Effect** | An animation drawn over the page: static, pixelate, glitch, scanlines | `static` at 0.55 opacity | | **Colour Overlay** | A colour over the page | `color-tint` with `rgba(0,0,0,0.55)` | | **Backdrop Filter** | A CSS filter on everything behind it: blur, saturate, grayscale and more | **None (disabled)** | ### Configuring a slot **Pick an Effect Preset for a layer; its settings appear under it.** The list holds the built-in [screen effects](/core/effects/screen-effects) and any a content pack adds. **None (disabled)** turns the layer off. | Preset | Layer | Settings | |--------|-------|----------| | `static` | Canvas | Opacity, Grain Scale, Tint Color, Tint Strength | | `pixelate` | Canvas | Pixel Size, Opacity, Light Variance, Base Lightness, Tint Color, Tint Strength | | `glitch` | Canvas | Intensity, Max Shift, Band Height, Opacity, FPS | | `scanlines` | Canvas | Line Height, Opacity, Scroll Speed | | `color-tint` | Colour | Tint Color (any CSS colour; use `rgba()` for transparency) | | `vignette` | Colour | Opacity | | `blur` | Backdrop | Blur Amount (`8px`) | | `saturate` | Backdrop | Amount (`200%`) | | `grayscale` | Backdrop | Amount (`100%`) | | `contrast` | Backdrop | Amount (`200%`) | | `hue-rotate` | Backdrop | Angle (`180deg`) | Mix them freely: a `grayscale` backdrop with a `color-tint` overlay and no canvas gives a washed-out, tinted page with no animation. --- ## Test Controls **Preview the overlay with your current settings, saved or not.** The dashboard keeps running behind it; nothing is actually disconnected. - **Simulate Disconnect** shows the overlay (and is greyed out while it shows). - **Simulate Reconnect** plays what happens when the connection comes back, the restored message included. - **Clear Test** removes it. ::: tip Workflow Change a setting, click **Simulate Disconnect**, look, adjust, repeat. When it looks right, click **Save**. ::: --- ## Scope and per-device overrides **Settings can be the same for everyone, or differ for one user or one browser.** A browser uses its device's setting first, then its user's, then the global one, then the built-in default. ``` Device → User → Global ``` | Scope | Who it applies to | |-------|-------------------| | **Global** | Every user and device | | **User** | Your Home Assistant user, on any device | | **Device** | This browser, whoever is logged in | - Pick the scope with the switch at the top of the tab. Each setting shows a badge for where its value comes from; the clear button next to it removes the override at this scope. - **Save (scope)** writes only the settings you changed, so the others keep coming from the scopes below. - **Reset (scope)** removes every override stored at that scope, after a confirmation. ### Admin: editing another device or user **Administrators can pick another user or device in the scope switch and save settings for it.** The browser it belongs to picks them up within seconds, with no reload. - If you have the tab open on a device whose settings another administrator changes, and you have no unsaved edits, the tab refreshes itself. - With unsaved edits, a banner says **Settings were updated from another device** with **Discard edits & refresh**; your edits stay until you choose. ### Broadcast buttons **Two administrator buttons at the bottom act on every connected browser.** | Button | Effect | |--------|--------| | **Push Live Config** | Every connected browser reads its overlay settings again, with no page reload. Use it for a device that was offline when you saved | | **Reload All Clients** | Every connected browser reloads its page. A last resort | --- ## Upgrading: existing stored settings **Settings saved before field-by-field saving existed may hold every field at one scope.** That is harmless: the values are right and the scopes still apply in order. To keep only the overrides you meant at device scope: 1. Open **Connectivity**, pick the **Device** scope for that device and note which settings should differ from the user or global ones. 2. Click **Reset device** to remove all its device overrides. 3. Change and save only the settings you want to pin to the device. Afterwards only those settings show a **device** badge. --- ## Related - [Configuration overview](./index.md): all Config Panel tabs - [Users & Devices](./users-devices): manage stored per-device and per-user settings - [Screen Effects](/core/effects/screen-effects): the effect presets and their settings - [Borg Assimilation](/core/borg): what the Borg mode plays - [Connection Overlay Service](../architecture/subsystems/connection-overlay): developer reference --- # Fonts **LCARdS includes a set of LCARS fonts, and you can add your own in LCARdS Config > Fonts without copying files or writing YAML.** Antonio is the default LCARS font. A card uses another one through `font_family`. - LCARdS only includes fonts whose license it can confirm from the original author: the SIL Open Font License, or the author's own terms in the font file. - Fonts marked **(BYOF)** in the card editors are "bring your own font": not included, but their names still work. Until you give one a file it shows in Antonio. - Every LCARdS font works on every Home Assistant page, without internet, including in other cards and themes. ::: tip Try it Open **LCARdS Config > Fonts** (`/lcards-config?tab=fonts`) and drop a font file on it. It shows up under **Your fonts**, ready to pick in any card editor. ::: --- ## Using a Font **Set `font_family` on a text field, or in `text.default` for the whole card, to a font's key.** The keys are in the tables below and in the Fonts tab; the font picker in the card editors lists them all, your own fonts under **My fonts**. - A key works like any CSS font family, so a stack such as `"lcards_michroma, Antonio"` falls back in order. - The other text keys (size, weight, case, spacing) are on [Fonts, Colour and Backgrounds](../core/text-fields-style#fonts). ```yaml live type: custom:lcards-button preset: lozenge text: default: color: var(--lcars-black) title: content: Shuttle bay position: top-left font_family: lcards_michroma font_size: 16 sub: content: Doors sealed position: bottom-left font_family: lcards_borg font_size: 16 grid_options: rows: 2 ``` ## Adding Your Own Fonts **Drop a font file on LCARdS Config > Fonts and it becomes a font you can use, named after the font in the file.** LCARdS gives it a key of its own, such as `lcards_user_ubuntu_mono`, which you pick in the card editors or copy into YAML. - Add a font's other weights the same way: Ubuntu Mono Bold joins Ubuntu Mono, and cards with `font_weight: bold` use it. A file of the same weight as one the font already has becomes a font of its own instead of replacing it. - **TTF, OTF, WOFF and WOFF2** files work, up to 10 MB each. A TTF or OTF also works in the LCARdS Voice Skin and other Android apps; WOFF and WOFF2 work in browsers only. Font collections (`.ttc`) aren't supported: add the single font files. - The key is made once from the name and stays the same when you rename the font, so your YAML keeps working. - Changes reach every open dashboard within seconds, with no reload. Administrators add and change fonts; everyone else sees the tab read-only. This example uses a font added in the Fonts tab, so it can't run here: the docs site has no fonts of yours. ```yaml type: custom:lcards-button preset: lozenge text: title: content: Engineering show: true font_family: lcards_user_ubuntu_mono ``` ::: details More about your own fonts - **The files:** they go in `/config/www/lcards/fonts/`, which LCARdS creates when it starts and updates never touch. A full Home Assistant backup includes them. - **Files section:** **Files in your fonts folder**, at the bottom of the tab, lists every file with the font that uses it. A file that belongs to no font has **Make a font**; **Delete** asks first and names the fonts that use the file. - **A file named after a bring-your-own key** (`lcards_swiss_911.otf`) is that font as soon as it arrives. - **The media browser:** the folder also shows under **Media > LCARdS > My fonts**. ::: ## Bring Your Own Fonts **The bring-your-own fonts are LCARS fonts LCARdS can't include: give one a file and every card using its key draws it.** Until then those cards show Antonio. - **Let one of your fonts stand in:** on its card under **Your fonts**, add bring-your-own fonts to **Stands in for**. One font can stand in for several, and it stays your font; **Clear** in the checklist removes only the link. - **Or give it a file of its own:** upload a file named after the key (`lcards_handel_gothic.otf`), or copy one into `/config/www/lcards/fonts/` with the File editor or Studio Code Server add-on, or a Samba share, the same way as [your own 3D models](../cards/astrometrics/models#the-my-models-folder). - The **Bring your own fonts** checklist in the Fonts tab shows which are set and which font each uses. - A file copied in by hand appears after a browser refresh (Ctrl+Shift+R on a computer; on a wall tablet, reload the dashboard or clear the app's cache). Fonts added in the tab need no refresh. | Font | Key | Shows until you add it | |---|---|---| | Changeling | `lcards_changeling` | Antonio | | Context Ultra Condensed | `lcards_context_ultra_condensed` | Antonio | | Crillee | `lcards_crillee` | Antonio | | Eurostile | `lcards_eurostile` | Antonio | | Eurostile Oblique | `lcards_eurostile_oblique` | Antonio | | Fabrini | `lcards_fabrini` | Antonio | | Federation | `lcards_federation` | Antonio | | Galaxy | `lcards_galaxy` | Antonio | | Handel Gothic | `lcards_handel_gothic` | Antonio | | Jeffries | `lcards_jeffries` | Antonio | | Klingon | `lcards_klingon` | Antonio | | Microgramma | `lcards_microgramma` | Antonio | | Microgramma Regular | `lcards_microgramma_regular` | Antonio | | Millennium Extended Bold | `lcards_millenium_extended_bold` | Antonio | | Romulan | `lcards_romulan` | Antonio | | Sonic | `lcards_sonic` | Antonio | | Square 721 | `lcards_sqaure_721` | Antonio | | Stellar | `lcards_stellar` | Antonio | | Swiss 911 | `lcards_swiss_911` | Antonio | | Tholian | `lcards_tholian` | Antonio | | Tungsten | `lcards_tungsten` | Antonio | ::: details More about bring your own fonts - **Bold:** until a font has its file, `font_weight: bold` gives Antonio Bold. - **Size:** a font shows at its own size. Some symbol fonts draw small; set its **Size** in the Fonts tab, or raise `font_size` or `font_size_percent` on those cards. - **Several files named after the key:** LCARdS uses the first it finds of `.woff2`, `.otf` and `.ttf`. - **Adding a font to LCARdS:** a font can be included when its author publishes a license that allows sharing it, such as the SIL Open Font License. Open an issue with a link to the author's own download page. ::: ## Size, Spacing and Other Names **Each of your fonts has a Size and spacing block and an "Also available as" field in the Fonts tab.** Use them when a font draws too small or sits too high beside Antonio, or when a theme or another card asks for the font by its own name. - The preview on the font's card shows it above Antonio at the same size, with each line's box shaded, so you can match them by eye. **Reset** goes back to the font's own values. - The values apply everywhere the font draws, including the bring-your-own fonts it stands in for. - **Also available as** gives the font other family names, separated by commas, such as `Tungsten`. A name can't start with `lcards_`, be a CSS keyword such as `serif`, or be the name of a font LCARdS includes. | Setting | Range | What it does | |---|---|---| | Size | 50 to 200 % | Scales the font, so it matches Antonio at the same font size | | Ascent | 0 to 150 % | Space above the baseline, as a share of the font size | | Descent | 0 to 150 % | Space below the baseline, as a share of the font size | | Line gap | 0 to 150 % | Extra space between lines | ## HA-LCARS Fonts **The HA-LCARS theme draws Home Assistant in Tungsten when it's there, else Antonio, and LCARdS covers both.** You no longer need a dashboard resource for either. - **Antonio** comes with LCARdS and is on every page, so HA-LCARS's Antonio works without the Google Fonts resource its guide describes. - **Tungsten:** press **Add Tungsten** at the top of the Fonts tab and choose your Tungsten Medium and Bold files. LCARdS sets them up with HA-LCARS's own weights and size, under the name `Tungsten` the theme asks for, and the theme uses it on every page. - A setup made by hand (a Google Fonts resource for Antonio, or HA-LCARS's `tungsten.css` with its files in `www/community/fonts/`) keeps working. The Fonts tab points out those resources; once Tungsten is added there you can remove them under **Settings > Dashboards > Resources**. ## Using LCARdS Fonts Elsewhere in Home Assistant **Every LCARdS font name works anywhere in Home Assistant: other cards, theme variables and UIX styles.** LCARdS declares all its fonts and yours on every page when it starts; a font file only downloads when something uses it. - Use the key as the family name, such as `lcards_michroma`, or one of your fonts' other names. - No UIX or theme changes are needed, and HA-LCARS's own font settings keep working. This example styles a stock markdown card with UIX, so it can't run here: the docs demos draw LCARdS cards only. ```yaml type: markdown content: "## Main Engineering" uix: style: | ha-card { font-family: lcards_michroma, Antonio, sans-serif; } ``` ## Included Fonts **These fonts ship with LCARdS, with their licenses.** The license texts and the notices copied from the font files are in `custom_components/lcards/fonts/LICENSES/`, and the [Credits](../credits) page lists them too. - The alien scripts draw their symbols on the ordinary letters: type `ABC` and you see three symbols. - The two Ferengi fonts are one script, written left or right; pick the one that reads the way you want. - The Fonts tab lists them under **Included fonts**, each with a sample and a Copy button for its key. | Font | Key | Group | Author | License | |---|---|---|---|---| | Antonio | `Antonio` | Core | The Antonio Project Authors | SIL Open Font License 1.1 | | Michroma | `lcards_michroma` | Standard | The Michroma Project Authors | SIL Open Font License 1.1 | | Trek Arrow Caps | `lcards_trekarrowcaps` | Standard | Neale Davidson (Pixel Sagas) | SIL Open Font License 1.1 | | Bajoran Ancient | `lcards_bajoran_ancient` | Alien | "Tommy of Escondido" | Charityware (notice in the font) | | Bajoran Ideogram | `lcards_bajoran_ideogram` | Alien | "Tommy of Escondido" | Charityware (notice in the font) | | Binar | `lcards_binar` | Alien | "Tommy of Escondido" | Charityware (notice in the font) | | Borg | `lcards_borg` | Alien | "Tommy of Escondido" | Charityware (notice in the font) | | Cardassian | `lcards_cardassian` | Alien | "Tommy of Escondido" | Charityware (notice in the font) | | Dominion | `lcards_dominion` | Alien | "Tommy of Escondido" | Charityware (notice in the font) | | Ferengi (Left) | `lcards_ferengi_left` | Alien | not named in the file | Charityware (notice in the font) | | Ferengi (Right) | `lcards_ferengi_right` | Alien | not named in the file | Charityware (notice in the font) | | Tellarite | `lcards_tellarite` | Alien | Neale Davidson (Pixel Sagas) | SIL Open Font License 1.1 | | Trill | `lcards_trill` | Alien | "Tommy of Escondido" | Charityware (notice in the font) | | Vulcan | `lcards_vulcan` | Alien | "Tommy of Escondido" | Charityware (notice in the font) | --- # Home Assistant Actions **LCARdS adds Home Assistant actions under the `lcards` domain, so automations, scripts, voice assistants and dashboard buttons can raise alerts, play effects and sounds, move an astrometrics camera and more.** They appear wherever Home Assistant lists actions: the automation and script editors, **Developer Tools > Actions**, and the REST and WebSocket APIs. - Each action reaches every browser that has a dashboard open, or only the devices and users you [target](#targeting). - The examples on this page are plain YAML for an automation's or script's actions (or **Developer Tools > Actions** in YAML mode): actions can't run as live cards on this site. A dashboard button runs one with `tap_action: action: perform-action`. - Home Assistant checks every field before anything reaches a browser: a value out of range, or a missing required field, fails the action with an error. | Group | Actions | |-------|---------| | [Alert Mode](#alert-mode-actions) | `lcards.set_alert_mode`, `lcards.red_alert`, `lcards.yellow_alert`, `lcards.blue_alert`, `lcards.gray_alert`, `lcards.black_alert`, `lcards.clear_alert` | | [Screen Effects](#screen-effect-actions) | `lcards.trigger_effect`, `lcards.clear_effect` | | [Sound](#sound-actions) | `lcards.play_sound` | | [Astrometrics](#astrometrics-actions) | `lcards.fly_to`, `lcards.set_clock` | | [Portal Overlay](#portal-overlay-actions) | `lcards.show_portal_card`, `lcards.clear_portal_card` | | [Borg Assimilation](#borg-assimilation-actions) | `lcards.borg_assimilate`, `lcards.borg_deassimilate` | | [Frontend Control](#frontend-control-actions) | `lcards.reload`, `lcards.set_log_level` | --- ## Targeting **Four optional fields send an action to some devices or users only; without them it reaches every connected browser.** Every `lcards.*` action takes them, in any combination. - A browser acts when its device or its user is in the lists. Device names and user names are matched in any case, and a name shared by several devices matches all of them. - If the fields are set but match no device and no user (a typo in a name, say), the action fails with an error instead of reaching every browser. A list that matches only some of its names acts on the ones it matches. - [Users & Devices](./users-devices) shows each browser's device name and id; `window.lcards.targeting.getMyIds()` in the browser console returns them too. ```yaml # Red alert on the kitchen tablet only action: lcards.red_alert data: target_device_names: - Kitchen Tablet ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | `target_device_ids` | list | every device | Browser device ids (the `lcards_device_id` each browser keeps in `localStorage`) | | `target_device_names` | list | every device | Device display names, set in **LCARdS Config > Users & Devices** or with `?lcards_device=` | | `target_user_ids` | list | every user | Home Assistant user ids | | `target_user_names` | list | every user | Home Assistant user display names | --- ## Alert Mode Actions **The alert actions change the [alert mode](../core/alert-mode): the colours, the alert sound and any [alert overlay](../cards/alert-overlay/) on the page.** Without targeting they set `input_select.lcards_alert_mode`, so every browser follows and the mode survives reloads. - With [targeting](#targeting) the helper is not changed: only the matched browsers change their alert mode, until they reload or the helper changes. - Without targeting the actions need the `input_select.lcards_alert_mode` helper: create it in **LCARdS Config > Helpers** (see [Persistent Helpers](./persistent-helpers#alert-mode)). ### lcards.set_alert_mode **Sets any alert mode by name.** Use it when the mode comes from a template or a helper. ```yaml action: lcards.set_alert_mode data: mode: red_alert ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | `mode` | string | required | `red_alert`, `yellow_alert`, `blue_alert`, `gray_alert`, `black_alert` or `green_alert` | | [Targeting](#targeting) | - | every browser | `target_device_ids`, `target_device_names`, `target_user_ids`, `target_user_names` | ### Shortcut actions **One action per alert mode, with no fields but the targeting ones.** `lcards.clear_alert` returns to normal. | Action | Effect | |--------|--------| | `lcards.red_alert` | Red alert | | `lcards.yellow_alert` | Yellow alert | | `lcards.blue_alert` | Blue alert | | `lcards.gray_alert` | Gray alert | | `lcards.black_alert` | Black alert | | `lcards.clear_alert` | Back to normal (`green_alert`) | ```yaml action: lcards.red_alert ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | [Targeting](#targeting) | - | every browser | `target_device_ids`, `target_device_names`, `target_user_ids`, `target_user_names` | --- ## Screen Effect Actions **Full-screen effects over the dashboard, in three independent layers: `backdrop` (a CSS filter on the page), `color` (a colour over it) and `canvas` (an animation).** [Screen Effects](/core/effects/screen-effects) describes every preset and its settings. ### lcards.trigger_effect **Plays one or more screen effect layers, until cleared or for a set time.** Each layer in `layers` takes a `preset` and that preset's settings. - A layer left out of `layers` keeps whatever it shows; a layer set to `null` is cleared. - `duration` clears the layers this call set after that many milliseconds; each layer keeps its own timer, so a later call is never cut short by an earlier one. Without it the effect stays until [`lcards.clear_effect`](#lcards-clear-effect). - An alert overlay, the connection overlay or a portal card with `layers` replaces only the layers it sets, and clears only its own when it closes, so an effect from this action on another layer keeps running. ```yaml # A red-tinted blur, until cleared action: lcards.trigger_effect data: layers: backdrop: preset: blur amount: 12px color: preset: color-tint color: alpha(var(--lcars-alert-red), 0.35) ``` ```yaml # TV static for 5 seconds action: lcards.trigger_effect data: duration: 5000 layers: canvas: preset: static opacity: 0.4 ``` ```yaml # All three layers, on one device action: lcards.trigger_effect data: target_device_names: - Kitchen Tablet layers: backdrop: preset: grayscale amount: 80% color: preset: vignette opacity: 0.5 canvas: preset: scanlines opacity: 0.3 ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | `layers` | object | required | A map of layers: `backdrop`, `color` and `canvas`, each a `preset` with its settings, or `null` to clear it | | `duration` | number | until cleared | Clear the layers this call sets after this many ms, at least `100` | | [Targeting](#targeting) | - | every browser | `target_device_ids`, `target_device_names`, `target_user_ids`, `target_user_names` | The presets for each layer, with their main settings: | Layer | Preset | Main settings | |-------|--------|---------------| | `backdrop` | `blur` | `amount` (`8px`) | | `backdrop` | `grayscale` | `amount` (`100%`) | | `backdrop` | `saturate` | `amount` (`200%`) | | `backdrop` | `contrast` | `amount` (`200%`) | | `backdrop` | `hue-rotate` | `angle` (`180deg`) | | `color` | `color-tint` | `color` | | `color` | `vignette` | `opacity` (`0.7`) | | `canvas` | `static` | `opacity`, `scale` | | `canvas` | `pixelate` | `opacity`, `pixelSize` | | `canvas` | `glitch` | `opacity`, `intensity` | | `canvas` | `scanlines` | `opacity`, `lineHeight`, `scroll` | ### lcards.clear_effect **Clears one screen effect layer, or all of them.** ```yaml # Clear every layer on every browser action: lcards.clear_effect ``` ```yaml # Clear only the backdrop layer, on one device action: lcards.clear_effect data: slot: backdrop target_device_names: - Kitchen Tablet ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | `slot` | string | every layer | `backdrop`, `canvas` or `color` | | [Targeting](#targeting) | - | every browser | `target_device_ids`, `target_device_names`, `target_user_ids`, `target_user_names` | --- ## Sound Actions ### lcards.play_sound **Plays a sound, without changing the alert mode, the theme or the screen.** Use it for a soft chime when a kiosk tablet wakes, or a beep when a door opens. - `event_type` plays the sound each browser has for that event (its own per-event sound, else its scheme's), and the event's [sound category](./sounds#enabling-sounds) switch applies. - `asset_key` plays one exact sound whatever the scheme says: a sound asset key (**LCARdS Config > Sounds** lists them), a file URL such as `/local/sounds/chime.mp3`, or a `media-source://` id. Only the master switch applies. - Give one of the two: a call with neither is refused. If both are given, `asset_key` wins. A browser whose master switch (`input_boolean.lcards_sound_enabled`) is off stays silent. [Sound Configuration](./sounds) has the schemes and the per-user and per-device settings. ```yaml # The "notification" sound, as each browser has it set up action: lcards.play_sound data: event_type: notification ``` ```yaml # One exact sound on one tablet action: lcards.play_sound data: asset_key: lcards_default_system_ready target_device_names: - Kitchen Tablet ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | `event_type` | string | - | One of the 27 event keys in [What Events Are Covered](./sounds#what-events-are-covered), such as `notification`, `card_tap` or `alert_red` | | `asset_key` | string | - | A sound asset key, a file URL or a `media-source://` id | | [Targeting](#targeting) | - | every browser | `target_device_ids`, `target_device_names`, `target_user_ids`, `target_user_names` | --- ## Astrometrics Actions **Move the camera or set the clock of an [astrometrics card](/cards/astrometrics/) from an automation**, for example to show the front door on the wall panel when the doorbell rings. The card needs an `id`; every open dashboard showing that card follows, unless you target devices or users. ### lcards.fly_to **Flies the card's camera to one of its named views or to one of its points.** Give a `view` or a `point`; with both, `point` wins, and with neither the action fails. - From another LCARdS card on the same dashboard, the `fly-to` card action does the same without a round trip: see [Fly-to from other cards](/cards/astrometrics/data#fly-to-from-other-cards-and-automations). ```yaml # Show the front door on every dashboard with the house map action: lcards.fly_to data: card_id: house_map point: front_door ``` ```yaml # The sector overview on the bridge tablet, slowly, with warp streaks action: lcards.fly_to data: card_id: galaxy view: sector duration: 4000 warp: true target_device_names: - Bridge Tablet ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | `card_id` | string | required | The astrometrics card's `id` | | `view` | string | - | A named view of the card (`camera.views`) | | `point` | string | - | A point id of the card; the camera flies to it as a tap on it would | | `duration` | number | the card's `camera.fly_duration` | Flight time in ms, `0` to `60000` | | `warp` | boolean | the view's `warp`, else the card's `camera.warp` | `true`: stars and dust streak on the way; `false`: they don't | | [Targeting](#targeting) | - | every browser | `target_device_ids`, `target_device_names`, `target_user_ids`, `target_user_names` | ### lcards.set_clock **Sets the card's [scene date](/cards/astrometrics/scale#the-scene-clock) and how fast it runs: where its real planets and moons are, and how they are turned.** Give a `date`, a `rate` or both (with neither the action fails); the one you leave out keeps running as it was. - From another LCARdS card, the `set-clock` card action does the same: see [the scene clock](/cards/astrometrics/scale#the-scene-clock). ```yaml # Show the planets on the date in a helper, held still action: lcards.set_clock data: card_id: sol date: "{{ states('input_datetime.lcards_test_date') }}" rate: 0 ``` ```yaml # Back to now, running an hour a second action: lcards.set_clock data: card_id: sol date: now rate: 1 h/s ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | `card_id` | string | required | The astrometrics card's `id` | | `date` | string | keeps running | `now`, or an ISO date and time (`2026-10-30`, `2026-10-30T12:00:00Z`). A date and time helper's state works too (local time) | | `rate` | string / number | unchanged | Days per second (`1` a day a second, `0` holds it, negative runs back), `live` for real time, or with a unit as the time slider shows it: `1 h/s`, `30 d/s`, `1 y/s` (units `s`, `min`, `h`, `d`, `w`, `mo`, `y`) | | [Targeting](#targeting) | - | every browser | `target_device_ids`, `target_device_names`, `target_user_ids`, `target_user_names` | --- ## Portal Overlay Actions **Show any Home Assistant card over the whole screen of the connected browsers, with screen effects behind it if you like.** The card has its own layer: it doesn't disturb an [alert overlay](../cards/alert-overlay/) or the [connection overlay](./connectivity), and they don't disturb it. For popups with buttons, see [Using browser_mod](./browser-mod). ### lcards.show_portal_card **Shows a card in the portal overlay, until cleared, dismissed or for a set time.** ```yaml # A light button over a blurred, darkened screen for 10 seconds action: lcards.show_portal_card data: content: type: custom:lcards-button entity: light.bridge position: center width: 360px duration: 10000 layers: backdrop: preset: blur amount: 8px color: preset: color-tint color: alpha(var(--lcars-black), 0.5) ``` ```yaml # A markdown note on one device, until cleared action: lcards.show_portal_card data: content: type: markdown content: "# Alert!\nDoor opened." target_device_names: - Kitchen Tablet ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | `content` | object | required | Any card config (`type: custom:lcards-button`, `type: entities` ...) | | `layers` | object | none | Screen effect layers behind the card, as in [`lcards.trigger_effect`](#lcards-trigger-effect) | | `position` | string | `center` | `center`, `top`, `top-left`, `top-right`, `bottom`, `bottom-left`, `bottom-right`, `left` or `right` | | `width` | string | `auto` | CSS width of the card's box: `400px`, `40vw`, `auto` | | `height` | string | `auto` | CSS height of the card's box: `300px`, `30vh`, `auto` | | `duration` | number | until cleared | Close it after this many ms, at least `100` | | `dismiss` | boolean | `true` | A click on the backdrop closes it | | [Targeting](#targeting) | - | every browser | `target_device_ids`, `target_device_names`, `target_user_ids`, `target_user_names` | ### lcards.clear_portal_card **Takes away the card shown by `lcards.show_portal_card`.** Alert and connection overlays stay. ```yaml # Clear it on one device only action: lcards.clear_portal_card data: target_device_names: - Kitchen Tablet ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | [Targeting](#targeting) | - | every browser | `target_device_ids`, `target_device_names`, `target_user_ids`, `target_user_names` | --- ## Borg Assimilation Actions **Start and end the [Borg assimilation](/core/borg) from automations.** It is not stored: a reload, or a browser opened later, shows the normal dashboard, so a reload also ends it. [Borg Actions](/core/borg-actions) has more examples. ### lcards.borg_assimilate **Starts the assimilation; its fields tune the intro, the transition, the font, the sound and the effects left after the intro.** With no fields, the intro waits for a click and the default effects follow it. - The flat intro fields (`site_count` to `overrun`) are shortcuts for `intro_layers.canvas`. When both are given, the keys in `intro_layers.canvas` win; they may be camelCase or snake_case. - The Borg never writes `input_select.lcards_alert_mode`, targeted or not. ```yaml # Every browser; the intro waits for a click action: lcards.borg_assimilate ``` ```yaml # Auto-dismiss after 12 seconds, more and longer tendrils, palette and font only afterwards action: lcards.borg_assimilate data: intro_duration: 12000 transition_style: fade_only site_count: 12 tendrils_per_site: 14 tendril_length: 900 suppress_persistent: true ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | `intro_duration` | number | wait for a click | End the intro after this many ms, `1000` to `60000`; a click still ends it earlier | | `site_count` | number | `8` | Injection sites on the screen, `1` to `20` | | `tendrils_per_site` | number | `5` | Tendrils per injection site, `1` to `20` | | `tendril_length` | number | `600` | Longest tendril reach in pixels, `100` to `1200` | | `particle_count` | number | `2` | Nano-probe particles per tendril, `0` to `6`; `0` turns them off | | `renderer` | string | `auto` | `auto` or `webgl`: the WebGL intro where the browser supports it; `canvas`: the [classic intro](/core/borg#classic-intro) | | `cube` | string | `detailed` | WebGL intro: `detailed` (solid cube with machinery), `classic` (wireframe) or `none` | | `corruption` | number | `0.5` | WebGL intro: signal corruption strength, `0` to `1`; `0` turns it off | | `overrun` | number | `0.65` | WebGL intro: darkness behind the assimilation front, `0` to `1` | | `transition_style` | string | `blur_fade` | Palette transition: `blur_fade`, `flash`, `fade_only` or `off` | | `font_swap` | boolean | `true` | `false` keeps the dashboard font; everything else still runs | | `sound` | string | the `borg_assimilate` [sound event](/core/borg#sounds) | A file URL (`/local/sounds/borg.mp3`), a `media-source://` id or a sound asset key; `none` for silence | | `suppress_persistent` | boolean | `false` | `true` leaves no effects after the intro. Ignored when `persistent_layers` is set | | `intro_layers` | object | - | Layers for the intro, merged slot by slot with the defaults; see [Layers format](/core/borg#layers-format) | | `persistent_layers` | object | - | Layers kept after the intro, replacing the defaults; `{}` keeps none. Wins over `suppress_persistent` | | [Targeting](#targeting) | - | every browser | `target_device_ids`, `target_device_names`, `target_user_ids`, `target_user_names` | ### lcards.borg_deassimilate **Restores the dashboard: a short glitch outro, then the normal colours, font and screen.** A browser that is not assimilated ignores it. ```yaml # At once, with no outro action: lcards.borg_deassimilate data: with_outro: false ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | `with_outro` | boolean | `true` | `false` restores at once, with no outro and no wait | | `outro_layers` | object | glitch on `canvas` for 1200 ms | Outro layers, replacing the default. The longest `duration` in them sets the wait, at least 1200 ms | | `revert_transition_style` | string | `fade_only` | Palette transition back to normal: `fade_only`, `flash`, `blur_fade` or `off` | | `sound` | string | the `borg_deassimilate` [sound event](/core/borg#sounds) | A sound for this call, as for `lcards.borg_assimilate` | | [Targeting](#targeting) | - | every browser | `target_device_ids`, `target_device_names`, `target_user_ids`, `target_user_names` | --- ## Frontend Control Actions **Reload dashboards, or change how much LCARdS logs, from an automation.** Useful for troubleshooting and for kiosks nobody stands at. ### lcards.reload **Reloads the page in every matched browser tab, at once.** Use it after updating LCARdS or changing a resource. ::: warning The page reloads immediately: anyone using that dashboard loses what they were doing. ::: ```yaml # Reload one device action: lcards.reload data: target_device_names: - Kitchen Tablet ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | [Targeting](#targeting) | - | every browser | `target_device_ids`, `target_device_names`, `target_user_ids`, `target_user_names` | ### lcards.set_log_level **Changes how much LCARdS writes to the browser console and the Home Assistant log, at once and with no reload.** Use `debug` while chasing a problem, then go back to `warn`. - The browser level changes in the matched tabs only. The Home Assistant log level is one for the whole server, so it changes whatever the targeting says. - The level lasts until the page reloads; the integration's **Log level** option sets the lasting one (see [Integration options](../getting-started/installation#integration-options)). ```yaml action: lcards.set_log_level data: level: debug ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | `level` | string | required | `off`, `error`, `warn`, `info`, `debug` or `trace` | | [Targeting](#targeting) | - | every browser | `target_device_ids`, `target_device_names`, `target_user_ids`, `target_user_names` | --- ## Automation Examples ### Red alert on motion ```yaml alias: Red alert on motion triggers: - trigger: state entity_id: binary_sensor.hallway_motion to: "on" actions: - action: lcards.red_alert ``` ### Set the alert mode from a helper ```yaml # input_select.ship_condition is your own helper, with alert mode names as its options alias: Alert mode from a helper triggers: - trigger: state entity_id: input_select.ship_condition actions: - action: lcards.set_alert_mode data: mode: "{{ states('input_select.ship_condition') }}" ``` ### Debug logging while a dev mode switch is on ```yaml alias: LCARdS debug on dev mode triggers: - trigger: state entity_id: input_boolean.lcards_dev_mode actions: - action: lcards.set_log_level data: level: "{{ 'debug' if is_state('input_boolean.lcards_dev_mode', 'on') else 'warn' }}" ``` ### A soft chime when a kiosk tablet wakes ```yaml alias: Tablet wake chime triggers: - trigger: state entity_id: binary_sensor.hallway_motion to: "on" actions: # your existing screen-wake action first - action: rest_command.fully_kiosk_wake_screen - action: lcards.play_sound data: event_type: notification target_device_names: - Kitchen Tablet ``` ### Borg mode for 30 minutes ```yaml alias: Borg mode triggers: - trigger: time at: "20:00:00" actions: - action: lcards.borg_assimilate data: intro_duration: 10000 - delay: minutes: 30 - action: lcards.borg_deassimilate ``` --- ## From AI agents **An AI agent connected to Home Assistant (through the Model Context Protocol server, a voice assistant, or the REST or WebSocket API) can drive LCARdS with the same actions.** They are ordinary `lcards.*` actions, so anything that can call a Home Assistant action can raise an alert, run a screen effect, play a sound or show a portal card. - Every action and its fields is on this page; `services.yaml` in the integration carries the same descriptions, so agents that read the action list see them too. - Without [targeting](#targeting) fields an action reaches every connected browser. Agents should target a device or user when the request is about one screen. - To change what a dashboard looks like (rather than trigger something on it), an agent edits dashboard YAML instead. Point it at the [JSON Schemas and the config checker](/getting-started/ai-assistance) so it only writes keys LCARdS has. --- ## Related - [Borg Actions](/core/borg-actions) and [Borg Assimilation](/core/borg): more Borg examples, the layers format and the console API - [Screen Effects](/core/effects/screen-effects): every preset for the `layers` of `trigger_effect`, `show_portal_card` and the Borg actions - [Sound Configuration](./sounds): the events, schemes and per-user and per-device settings `play_sound` uses - [Users & Devices](./users-devices): how device ids and names are set - [Alert Mode](../core/alert-mode) and the [Alert Mode Lab](./alert-mode-lab): what the alert actions change --- # HA-LCARS Theme Lab **The HA-LCARS Theme Lab builds your own theme profile for [HA-LCARS](https://github.com/th3jesta/ha-lcars), the same kind as the [LCARdS profiles](./ha-lcars-theme-profiles) HA-LCARS ships.** Start from any HA-LCARS theme, change its colours, check the result, and copy the YAML into HA-LCARS. - **Five full palettes:** the colour roles Home Assistant's own screens use (primary, neutral, warning, danger, success), each an 11-tone scale, with separate light and dark versions if you want them. - **Readable by design:** button text colours are checked for contrast and corrected automatically. - **Everything else in one place:** the LCARS chrome (sidebar, header, status bars), legacy Home Assistant colours and the colour of every entity state. ::: tip Try it Open it from the LCARdS panel: **LCARdS Config > Theme Studio > HA-LCARS Theme Lab**. ::: ![The HA-LCARS Theme Lab: the Start section with a theme to load, below the Configuration and Preview & Export switch](/img/theme-lab/start.webp) ## 1. Start from a theme **Load a theme to start from, or paste one, and give yours a name.** - **Load from HA-LCARS:** pick a theme. Ones installed on your Home Assistant are marked *installed*; the others are reference copies bundled with LCARdS. A good start is one of the LCARdS profiles, **LCARS Picard [LCARdS Red Accent]** or **[LCARdS Blue Accent]**. - **Paste theme YAML:** bring in a theme you already have, including one you made here earlier. - Give your theme a **Theme Name**. That is the name you'll pick in Home Assistant later. ## 2. Palette Seed: the five colour roles ![Palette Seed: the Primary role with its 11-tone light and dark scales, button badges and contrast notes, and the other four roles below](/img/theme-lab/palette-seed.webp) **Each colour role (Primary, Neutral, Orange (Warning), Red (Danger), Green (Success)) gets a full scale of 11 tones, from darkest to lightest.** For each role, choose where its tones come from: - **None:** leave it to Home Assistant's own default. - **LCARdS Palettes:** use one of the LCARdS colour families (orange, gray, blue, green, yellow). - **Custom:** set the tones yourself. - **Imported:** keep the scale of the theme you loaded. While you set the tones: - Turn on separate **dark mode** tones for a role when light and dark mode should look different. - The small **A**, **F**, **T** and **O** badges show which tone becomes a button's background or text (open *The A/F/T/O badges* for details). - When a tone wouldn't be readable as button text, the lab picks a readable one on export and explains it under the role. ## 3. The other sections **The LCARS chrome, the older Home Assistant colours, the state colours and any other variable.** - **HA-LCARS & Legacy Home Assistant Semantic Colours:** the LCARS chrome (sidebar, header, status bars, buttons) and the older Home Assistant colour variables. Anything you leave unset keeps HA-LCARS's or Home Assistant's default. - **Domain & State Colours:** the colour of an entity's icon in each state, per domain (lights, locks, climate and more), with a global fallback. - **Advanced / Raw Overrides:** any other theme variable, by name. ## 4. Preview and export **Switch to Preview & Export to check the theme in Light and Dark, then copy its YAML.** The preview shows the full palettes, a mock-up of the LCARS chrome, and real Home Assistant controls (buttons, switches, inputs) drawn with your colours. ![Preview & Export: the five palettes in dark mode with their button badges](/img/theme-lab/preview.webp) At the bottom, **Copy YAML** copies the finished theme. ![Generated Theme YAML: the instructions and the Copy YAML button above the theme's YAML](/img/theme-lab/export.webp) ## 5. Add it to HA-LCARS **Paste the YAML at the end of HA-LCARS's theme file and reload themes.** The theme builds on HA-LCARS's shared settings (its fonts, chrome and styling), so it goes into HA-LCARS's own theme file, as HA-LCARS's guide to [making your own colour themes](https://github.com/th3jesta/ha-lcars#make-your-own-color-themes) describes: 1. Open HA-LCARS's theme file, `lcars.yaml`, in the `themes` folder of your Home Assistant configuration. 2. Paste the YAML at the very end of the file. 3. Reload themes: **Developer tools > YAML > Themes**, or the `frontend.reload_themes` action. 4. Pick your theme in your **Profile** (or set it as the default theme). ::: warning Keep a copy of your theme Updating HA-LCARS (for example through HACS) replaces `lcars.yaml`, and your theme with it. Keep the YAML somewhere safe and paste it back after an update. To change it later, load it again with **Paste theme YAML**. ::: ## Related - [HA-LCARS Theme Profiles](./ha-lcars-theme-profiles): the ready-made LCARdS profiles - [Alert Mode Lab](./alert-mode-lab): how each alert mode recolours your dashboards - [Themes](../core/themes/): LCARdS theme tokens and the colour palette --- # LCARdS Theme Profiles for HA-LCARS **[HA-LCARS](https://github.com/th3jesta/ha-lcars) includes two themes made for LCARdS: LCARS Picard [LCARdS Red Accent] and LCARS Picard [LCARdS Blue Accent].** Pick one, and Home Assistant's own screens, the HA-LCARS chrome and your LCARdS cards all share one palette. - They use the LCARdS colour palette (the `--lcards-*` variables), which the integration provides. - Home Assistant's core colour tokens (`--ha-color-*`), used by stock Home Assistant components, are mapped onto LCARdS palette colours, so the whole interface looks of a piece. - Every colour points at a palette variable rather than a fixed value, so alert mode colour shifts and the switch between light and dark mode reach everything. --- ## Using a profile **Install or update HA-LCARS, then pick one of the profiles as your theme.** There is nothing to copy into `themes.yaml`. 1. Install or update [HA-LCARS](https://github.com/th3jesta/ha-lcars): the LCARdS profiles are part of its theme file, so update it if you don't see them. 2. In Home Assistant, open your **Profile** and pick **LCARS Picard [LCARdS Red Accent]** or **LCARS Picard [LCARdS Blue Accent]** as the theme. To make your own profile, use the [HA-LCARS Theme Lab](./ha-lcars-theme-lab) in LCARdS Config: start from one of these profiles, change its palettes, and add the result to HA-LCARS. --- ## Available Profiles **Two profiles, differing in the accent colour Home Assistant's own buttons and controls use.** | Profile name | Accent colour | Notes | |---|---|---| | `LCARS Picard [LCARdS Red Accent]` | Orange and red (`--lcards-orange-*`) | Home Assistant's primary colour is the LCARdS orange family | | `LCARS Picard [LCARdS Blue Accent]` | Blue (`--lcards-blue-*`) | Home Assistant's primary colour is the LCARdS blue family | Both profiles have separate **light** and **dark** mode sections. They cover all 11 shades of Home Assistant's core colour tokens, and Home Assistant's `on-*`, `fill-*`, `border-*` and `surface-*` colours (the ones behind buttons, chips, form fields and dialogs). --- ## How the Colour Mapping Works ### Home Assistant Core Colour Tokens **Home Assistant's frontend has an 11-shade scale (05 to 95) for five colour families: `primary`, `neutral`, `orange`, `red` and `green`.** Stock Home Assistant components use them. - The profiles map each Home Assistant shade one to one onto the matching stop of the [LCARdS 11-stop palette](../core/themes/index.md#lcards-css-colour-palette). - The LCARdS palette grew from its original 7 canon stops to 11 for exactly this, so no two Home Assistant shades have to share one colour. The family mapping differs per profile: | Home Assistant family | Red Accent profile | Blue Accent profile | |---|---|---| | `primary` | `--lcards-orange-*` | `--lcards-blue-*` | | `neutral` | `--lcards-gray-*` | `--lcards-gray-*` | | `orange` | `--lcards-yellow-*` | `--lcards-yellow-*` | | `red` | `--lcards-orange-*` | `--lcards-orange-*` | | `green` | `--lcards-green-*` | `--lcards-green-*` | ### Semantic Tokens (text-on-fill contrast) **Both profiles also set Home Assistant's text and fill colours themselves, so button and chip text stays readable.** - Home Assistant picks the text colour of buttons, chips and form fields (`--ha-color-on-*`) as a fixed tone of the same palette, such as "tone 40 of whatever primary is", assuming any colour a theme puts there still reads well at that tone. - That doesn't hold equally for every hue: the LCARdS orange family has a narrower readable range of lightness than the blue one, so the Red Accent profile would otherwise get low-contrast button text. - The profiles therefore set the whole `on-*`, `fill-*`, `border-*` and `surface-*` layer, with every text and background pair checked against WCAG contrast and corrected where Home Assistant's default would fail. See [ha-css-vars.md](../development/ha-css-vars.md#layer-2-semantic-colour-tokens) for the technical detail. --- ## Related - [HA-LCARS repository](https://github.com/th3jesta/ha-lcars) - [HA-LCARS Theme Lab](./ha-lcars-theme-lab): build your own profile - [LCARdS Colour Palette](../core/themes/index.md#lcards-css-colour-palette) - [LCARdS Themes](../core/themes/index.md) - [Alert Mode](../core/alert-mode.md) - [Installation](../getting-started/installation.md) --- # Voice Skin Preview **Try the [Voice Skin](./voice-skin) before setting it up on a kiosk: pick a preset, change its parts and colours, and watch a conversation play.** - The controls under the screen are the settings with the names Kiosk Satellite shows: **Voice Satellite** holds Kiosk Satellite's own [voice settings](./voice-skin#kiosk-satellite-settings) (overlay mode, background, text size), the other groups the plugin's. **Settings to set in Kiosk Satellite** lists the ones you changed, ready to copy to the kiosk. - **Dashboard theme** and **Alert mode** stand in for the colours your dashboard gives the skin. On a kiosk they come from LCARdS itself. - **Who is talking** shows how the name of the person talking appears, as Ground Control's Voice Match gives it. - **View: All presets** plays every preset side by side; click one to open it with its settings. - **Turn** plays a whole conversation (listening, processing, the answer, then idle) or holds one state. **Screen** shows the layout on other screen sizes, portrait included, or any size in dp with **Custom size**: a dp is a pixel divided by the screen's scale, so a 1920 × 1200 tablet at 2× scale is 960 × 600 dp. ::: details More about the preview - **Same drawing:** the preview runs the plugin's own drawing code for frames and parts, at the same sizes, so the layout matches the kiosk. - **Colours:** the alert modes here are an approximation; on a kiosk the skin gets the exact colours LCARdS computes. - **Voice level:** the level here is simulated. On a kiosk it follows the microphone while you speak and the assistant's voice while it answers. ::: --- # Voice Skin **The LCARdS Voice Skin is a [Kiosk Satellite](https://kiosksatellite.com/) plugin that draws the voice assistant as an LCARS screen: what you said, the answer, the assistant's state and a live voice level, in your dashboard's colours.** ![Voice Skin, Comm wave preset: a Picard-style frame with a moving voice level along the top, the state RESPONDING, the question in capitals and the answer below it, in grey and blue](/img/voice-skin/comm-wave.webp) - Pick a preset for each look: **full screen** covers the dashboard during a conversation, **docked** is a bar at the bottom of the screen. Every part of a preset can then be changed on its own. - The skin takes its colours from the LCARdS dashboard on the same kiosk, alert modes included, so a red alert turns the voice screen red too. - The answer is the point of the screen: frames and readouts are decoration round it, and the state (listening, processing, responding) is always clear. - It draws in Antonio, or in any TTF or OTF font from [LCARdS Config > Fonts](#font). ::: tip Try it The [Voice Skin Preview](./voice-skin-preview) draws every preset and setting live, with a turn playing, and lists the settings to copy into Kiosk Satellite. Kiosk Satellite's own settings page has no preview. ::: --- ## Installing **Install the plugin from Kiosk Satellite's Community Plugins, then pick it as the assistant's skin.** Kiosk Satellite 2026.12.1 or later is needed. 1. In Kiosk Satellite, open **Settings > Plugin Manager** on the kiosk, or **Plugin Manager** in Remote Admin, and turn on **Enable Plugins**. 2. Choose **Browse plugins**, pick **LCARdS Voice Skin**, and choose **Trust and install**. Its page on the [Kiosk Satellite plugins site](https://kiosksatellite.com/plugins/) has an **Install** button that opens the same step in your kiosk's Remote Admin. 3. On the kiosk, open **Voice Satellite > Appearance** and pick **LCARdS Voice Skin** as the skin. **Preview** there shows the skin for a few seconds, in its idle state. 4. Open the plugin's settings (**Plugin Manager > LCARdS Voice Skin**) to choose presets and colours. - A conversation needs an Assist pipeline in Home Assistant with speech to text and text to speech. The skin only draws it; any pipeline works. - **Updates:** Kiosk Satellite checks for new releases and marks the plugin **New version** in Plugin Manager; its check for updates button, then **Trust and update**, installs it. Your settings are kept. The plugin's [releases](https://github.com/snootched/lcards-ks-voice-skin/releases) list what changed. - Kiosk Satellite's Preview always shows the idle state with the voice level at rest. Listening, processing and the moving level only appear in a real conversation, or in the [preview page](./voice-skin-preview). --- ## Presets **A preset is a frame with a style in each of its places: the starting point you pick for each look.** The Picard presets follow the newer LCARS screens (thin sweeps, readouts), the classic ones the TNG era (elbows and blocks). **Full screen.** | | | |---|---| | ![Comm wave preset: a moving comb of bars along the top of a Picard frame, answer below](/img/voice-skin/comm-wave.webp) | ![Crystal lattice preset: a fine spectrum with ring markers along the top, the state in a square-and-word block](/img/voice-skin/crystal.webp) | | **Comm wave** · Comm-wave deck · Picard | **Crystal lattice** · Comm-wave deck · Picard | | ![Briefing preset: a bracket frame with a ladder level on the left and the question on a light bar](/img/voice-skin/briefing.webp) | ![Helix preset: a bracket frame with a turning double helix on the left](/img/voice-skin/helix.webp) | | **Briefing** · Briefing bracket · Picard | **Helix** · Briefing bracket · Picard | | ![Vital scan preset: a classic frame with number cascades, a coloured band and a scope with a voice comb](/img/voice-skin/vital-scan.webp) | ![Matrix scan preset: a classic frame with a scope showing a matrix scan with brackets](/img/voice-skin/matrix-scan.webp) | | **Vital scan** · Scan display · Classic | **Matrix scan** · Scan display · Classic | | ![Console preset: a classic elbow frame with phase blocks on the left and a segmented meter at the bottom](/img/voice-skin/console.webp) | | | **Console** · Classic frame · Classic | | **Docked.** | | |---| | ![Header bar preset: a black bar with the state and a segmented meter above the answer](/img/voice-skin/header-bar.webp) | | **Header bar** · Picard | | ![Bracket bar preset: a bar with a bracket and a ladder on the left, the state and the answer](/img/voice-skin/bracket-bar.webp) | | **Bracket bar** · Picard | | ![Pill bar preset: a classic pill-shaped bar with the state on the left and the answer as a scrolling line](/img/voice-skin/pill-bar.webp) | | **Pill bar** · Classic | | ![Strip preset: a classic bar with rounded ends, the state as a word pair and the answer beside it](/img/voice-skin/strip.webp) | | **Strip** · Classic | The pictures show each preset mid-answer on a tablet in landscape: Picard presets in the LCARS Picard (blue accent) colours, classic ones in LCARS Classic. On a kiosk they take the dashboard's colours. --- ## Full Screen **The full screen look covers the dashboard while you talk to the assistant.** Choose a preset, and press **Preview** in Remote Admin to see it on the kiosk; to change single parts, turn on **Change parts of the preset**. - **Preview** plays a short sample conversation (listening, processing, then an answer) on the kiosk for about 10 seconds, with your settings, colours and font. Press it in Remote Admin: on the kiosk itself, the settings page covers the preview while it plays. A real conversation takes over from it. - The preset picker groups the presets as **Picard** or **Classic**, with a line on what each draws. - With **Change parts of the preset** on, a part left at **From preset** keeps the preset's style. Turned off, the parts are hidden and the preset shows as it is. - Picking another **Frame** than the preset's starts from that frame's own styles, so the parts you have not changed still fit the frame. - Not every frame has every place: only the scan display has a **Scope**, and **Tools** shows on the comm-wave deck and the briefing bracket on larger screens. A setting for a place the frame lacks is ignored. - Portrait screens stack the parts; tall voice level styles turn on their side to fit. | Setting | Type | Default | Description | |---------|------|---------|-------------| | Preset | choice | `Comm wave` | One of the full screen [presets](#presets) | | Change parts of the preset | boolean | off | Shows the settings below, Frame to Tools. Off, they don't apply | | Frame | select | `From preset` | Comm-wave deck, Briefing bracket, Scan display or Classic frame | | Voice level | select | `From preset` | Comb, Spectrum, Matrix scan, Helix, Segmented meter, Ladder, Marker band or Fill block. On the scan display, the band under the header | | Scope | select | `From preset` | The scan display's second level, above the conversation: the same styles as Voice level, or Hidden | | State | select | `From preset` | Word pair, Phase blocks, Square and word or Pill | | Command | select | `From preset` | How what you said is shown: Light bar, Line or Label and command | | Answer | select | `From preset` | Fade (the newest lines stay in view, older ones fade toward the top), Pages (a long answer in pages with a counter) or Ticker (one scrolling line) | | Tools | select | `From preset` | What the assistant ran: Readout rows, Step counter, Dot row or Hidden | | Number decoration | boolean | on | The frame's decorative number cascades and coded segments | | Title | text | `LCARS ACCESS` | The title in the frame's header, shown in capitals | | Preview | button | | Plays a sample conversation in the full screen look on the kiosk | --- ## Docked **The docked look is a bar at the bottom of the screen that leaves the dashboard in view.** It works like the full screen look, with fewer parts. - The bar is at most 760 dp wide and sits centred on wider screens. - **Preview** and **Change parts of the preset** work as for the full screen look. | Setting | Type | Default | Description | |---------|------|---------|-------------| | Preset | choice | `Header bar` | One of the docked [presets](#presets) | | Change parts of the preset | boolean | off | Shows the settings below, Frame to Answer. Off, they don't apply | | Frame | select | `From preset` | Header bar, Bracket bar, Pill bar or Strip | | Voice level | select | `From preset` | The same styles as the full screen Voice level | | State | select | `From preset` | Word pair, Phase blocks, Square and word or Pill | | Answer | select | `From preset` | Fade, Pages or Ticker | | Preview | button | | Plays a sample conversation in the docked look on the kiosk | --- ## Kiosk Satellite Settings **Some of Kiosk Satellite's own voice settings change the skin too: which look shows, the backdrop, the text size and which text appears.** They are under **Voice Satellite > Appearance** and **Voice Satellite > Conversation** on the kiosk, not in the plugin's settings. - **Overlay mode** picks the look: Full screen draws the [full screen](#full-screen) preset, Docked the [docked](#docked) one. - Kiosk Satellite's **Theme** (auto, light or dark) does not change the skin: LCARS screens are always drawn on black, in the dashboard's colours. - The [preview](./voice-skin-preview) has these settings too, under **Voice Satellite**. | Setting | Type | Default | Description | |---------|------|---------|-------------| | Assistant 1 skin | select | `Kiosk Satellite` | Pick **LCARdS Voice Skin**. **Assistant 2 skin** does the same for the second assistant | | Overlay mode | select | `Full screen` | **Full screen** for the full screen look, **Docked** for the docked bar | | Background | number | `-1` | How dark the full screen backdrop is over the dashboard, `0` (clear) to `100` (black). `-1` is the skin's own, `86` | | Text size | number | `100` | Scales your command, the answer and the tool lines, `50` to `200` percent | | Reactive activity bar | boolean | on | Off keeps the voice level at rest instead of following the voices | | Show what you said | boolean | on | Off leaves the command out | | Show the answer | boolean | on | Off leaves the answer out; the state still shows | | Show tool use | boolean | on | Off leaves the tool lines out | | Keep the answer on screen | number | `0` | Seconds the skin stays after the answer is spoken | | Announcement time | number | `5` | Seconds the skin stays after an announcement | --- ## Who Is Talking **With Kiosk Satellite Ground Control's Voice Match, the skin names the person talking: before the command, or before the state word in the docked looks.** - Ground Control is a companion service from Kiosk Satellite's author (a Home Assistant app or a Docker container) that recognizes enrolled voices. With Voice Match on, the kiosk's **Speaker** sensor holds the name of the person talking, about a second into the command, and the skin reads it. - The name is cleared when each command starts, so a name from an earlier conversation never shows. - The name is drawn in Ground Control's colour for the person when Kiosk Satellite passes it to skins; today it doesn't, so the name uses the **Who is talking** colour (the dashboard's Accent unless set in [Colours](#colours)). - Try it in the [preview](./voice-skin-preview) with **Who is talking**. | Setting | Type | Default | Description | |---------|------|---------|-------------| | Show who is talking | boolean | on | Names the person talking. Plugin settings, **Who is talking** group | | Speaker sensor | entity | `sensor._speaker` | The kiosk's Speaker sensor. Set it only when the kiosk's entities use another name | | Voice Match (Kiosk Satellite) | setting | off | Voice Satellite > **Ground Control Voice Match** on the kiosk; needs Ground Control connected and people enrolled | --- ## Font **The skin draws in Antonio unless you pick another font: any font in [LCARdS Config > Fonts](../fonts), your own included.** - The **Font** setting lists the fonts LCARdS has for apps, under **My fonts**, **Bring your own** and **Included**, with Antonio first. **Refresh** beside it reads the list again after you add a font in LCARdS. - Only TTF and OTF fonts work here: Android can't read WOFF or WOFF2. Upload a TTF or OTF to LCARdS to use a font in the skin; a bring-your-own font works when its file is one, or when one of your fonts stands in for it. - The font's files download from Home Assistant once and stay on the kiosk, under the plugin's **Storage**. A font changed in LCARdS downloads again by itself. - The font's **Size** from the Fonts tab applies, so a font that draws small matches Antonio. Its bold file draws the headings when it has one. - If the font can't be loaded (Home Assistant out of reach, a file that isn't a font), the skin keeps Antonio. | Setting | Type | Default | Description | |---------|------|---------|-------------| | Font | choice | Antonio | The font the skin draws with. Plugin settings, **Font** group. Needs LCARdS 2026.12 or later | --- ## Colours **The skin draws with your dashboard's LCARdS colours and follows its alert mode; each colour can also be changed.** - LCARdS running in Kiosk Satellite stores the dashboard's colours with this kiosk's [device record](../users-devices) whenever the theme, a token override or the alert mode changes. The plugin reads them through Home Assistant and redraws. - The plugin finds the record by the kiosk's name. If the LCARdS device name is different, use **Use kiosk name** in [Users & Devices](../users-devices#this-session), or enter the LCARdS name in **LCARdS device name**. - Each colour setting is **From dashboard**, another of the dashboard's colours by name, or **Custom**. A dashboard colour still changes with the alert mode; a custom colour stays fixed. - Without LCARdS on the kiosk, or before it has stored any colours, the skin uses the LCARdS defaults. | Setting | Type | Default | Description | |---------|------|---------|-------------| | LCARdS device name | text | the kiosk's name | The LCARdS device name of this kiosk's dashboard | | Frame | select | `From dashboard` | Sweeps, elbows and the main bars. Dashboard: `theme:colors.ui.primary` | | Frame 2 | select | `From dashboard` | Bands, labels and quieter bars. Dashboard: `theme:colors.ui.secondary` | | Inactive | select | `From dashboard` | Unlit blocks and empty segments. Dashboard: `theme:colors.ui.quaternary` | | Accent | select | `From dashboard` | Highlights, such as the title and the processing blink. Dashboard: `theme:colors.ui.tertiary` | | Readings | select | `From dashboard` | Scopes, readouts and number cascades. Dashboard: `theme:colors.grid.cascadeStart` | | Readings 2 | select | `From dashboard` | Mixed in with Readings. Dashboard: the theme's accent, `var(--lcars-ui-accent-color)` (orange in the classic themes) | | Text | select | `From dashboard` | Your command and the answer. Dashboard: `theme:colors.grid.cascadeEnd` | | Alert | select | `From dashboard` | The warning end of meters and bands. Dashboard: `theme:colors.alert.red` | | Voice level: you | select | `From dashboard` | The voice level and state while you speak. Dashboard: the Readings colour | | Voice level: assistant | select | `From dashboard` | The voice level and state while the assistant speaks. Dashboard: the Readings 2 colour | | Who is talking | select | `From dashboard` | The name of the person talking, when Ground Control's colour for them isn't known. Dashboard: the Accent colour | | *colour*: custom colour | colour | the LCARdS default | Shown when that colour is Custom: the fixed colour to use | --- # Persistent Helpers **LCARdS keeps its shared settings in ordinary Home Assistant helpers: the alert mode, the sound switches and volume, each alert mode's colours, and the HA-LCARS sizes.** They survive restarts, show up as entities, and automations can read and change them. - LCARdS works without them, with built-in defaults; a feature whose helper is missing simply can't be changed or saved. - Settings that are not helpers (per-user and per-device settings, per-event sounds, the connection overlay) are kept by the integration: see [Users & Devices](./users-devices). ::: tip Create helpers from the Config Panel Open **LCARdS Config > Helpers** and click **Create All**: every missing helper is created and given its default value. See [the Helpers tab](./index.md#helpers). ::: --- ## Helper Reference ### Alert Mode **The alert mode itself, and how it behaves.** Shown in the Helpers tab under **Alert Lab Configuration**. | Helper | Type | Default | Description | |--------|------|---------|-------------| | `input_select.lcards_alert_mode` | `input_select` | `green_alert` | The active alert mode: `green_alert`, `red_alert`, `yellow_alert`, `blue_alert`, `gray_alert` or `black_alert`. See [Alert Mode](../core/alert-mode) | | `input_boolean.lcards_alert_mode_auto_switch` | `input_boolean` | off | On: a dashboard that opens during an alert shows it from the start. Changes to the alert mode always apply | | `input_text.lcards_alert_message` | `input_text` | empty | A message an alert overlay can show, up to 255 characters: see [A message from a helper](../cards/alert-overlay/symbol#a-message-from-a-helper) | | `input_select.lcards_alert_transition_style` | `input_select` | `off` | The screen transition when the alert mode changes: `off`, `blur_fade`, `fade_only`, `flash`, `color_bleed`, `flicker`, `static` or `wipe` | ### Sound **The master sound switch, the three sound categories, the volume and the sound scheme.** Shown under **Sound System**. See [Sound Configuration](./sounds). | Helper | Type | Default | Description | |--------|------|---------|-------------| | `input_boolean.lcards_sound_enabled` | `input_boolean` | off | Master switch: no LCARdS sound plays while it is off or missing | | `input_boolean.lcards_sound_cards` | `input_boolean` | on | Card sounds: taps, holds, sliders, toggles | | `input_boolean.lcards_sound_ui` | `input_boolean` | on | Home Assistant navigation sounds: sidebar, views, dialogs, edit mode | | `input_boolean.lcards_sound_alerts` | `input_boolean` | on | Alert mode and system sounds | | `input_number.lcards_sound_volume` | `input_number` | `0.5` | Volume for every sound, `0` to `1` | | `input_select.lcards_sound_scheme` | `input_select` | `none` | The active sound scheme. Its options fill in as sound packs load | ### HA-LCARS Theme Helpers (optional) **Sizes and switches the [HA-LCARS](https://github.com/th3jesta/ha-lcars) theme reads.** Only useful with an HA-LCARS theme. Shown under **HA-LCARS Theme Settings**. | Helper | Type | Default | Description | |--------|------|---------|-------------| | `input_number.lcars_horizontal` | `input_number` | `30` | Width of the horizontal borders, `6` to `60` | | `input_number.lcars_vertical` | `input_number` | `40` | Width of the vertical borders, `26` to `60` | | `input_number.lcars_elbow_angle` | `input_number` | `45` | The diagonal cut angle of elbow corners, `1` to `89` degrees. Elbow segments set to **Theme Binding** follow it live | | `input_number.lcars_menu_font` | `input_number` | `14` | Sidebar menu font size, `8` to `24` px | | `input_boolean.lcars_sound` | `input_boolean` | off | HA-LCARS's own button and tap sounds | | `input_boolean.lcars_texture` | `input_boolean` | off | HA-LCARS's grain pattern and backlight effect | | `sensor.lcars_header` | template sensor | - | Text in the clock area of the HA-LCARS header. Can't be created from the panel: add the template sensor below to `configuration.yaml` | ### Alert Mode Lab Parameters **How each alert mode recolours the dashboard: one set of `input_number` helpers per mode, named `input_number.lcards_alert_lab__`.** The [Alert Mode Lab](./alert-mode-lab) writes them with **Save to helpers**; **Create All** in the Helpers tab creates them first (saving fails while they are missing). Shown under **Alert Lab Configuration**. - `` is `red`, `yellow`, `blue`, `gray` or `black`: for example `input_number.lcards_alert_lab_red_hue`. - Saturation and lightness are stored as percentages: `140` is 1.4 times. | Parameter | Modes | Range | Description | |-----------|-------|-------|-------------| | `hue` | all | `0` to `360` | The hue colours are turned toward, degrees | | `hue_strength` | all | `0` to `1` | How far colours turn toward `hue` | | `saturation` | all | `0` to `300` (`200` for gray and black) | Saturation, percent | | `lightness` | all | `0` to `200` | Lightness, percent | | `center_hue` | red, yellow, blue | `0` to `360` | Centre of the hue band colours are pulled into, degrees | | `range` | red, yellow, blue | `0` to `180` | Half-width of that band, degrees | | `strength` | red, yellow, blue | `0` to `1` | How strongly colours are pulled into the band | | `threshold` | black | `0` to `100` | The lightness that splits dark colours from light ones | | `dark_multiplier` | black | `0` to `2` | Multiplies the lightness of colours below the threshold | | `light_multiplier` | black | `0` to `2` | Multiplies the lightness of colours above the threshold | The defaults for each mode are on the [Alert Mode Lab](./alert-mode-lab#defaults) page. --- ## Manual YAML Setup **You can define the helpers in `configuration.yaml` instead of creating them from the panel.** Use the same entity ids; restart Home Assistant (or reload the helpers) afterwards. - Without an `initial` value Home Assistant starts an `input_boolean` off and an `input_number` at its minimum; the YAML below gives each helper the panel's default, so the sound categories start on and the volume at half. - The Alert Mode Lab helpers are easiest to create with **Create All**. ### Alert Mode ```yaml input_select: lcards_alert_mode: name: LCARdS Alert Mode options: - green_alert - red_alert - yellow_alert - blue_alert - gray_alert - black_alert initial: green_alert icon: mdi:alarm-light lcards_alert_transition_style: name: LCARdS Alert Transition Style options: - "off" - blur_fade - fade_only - flash - color_bleed - flicker - static - wipe initial: "off" icon: mdi:transition input_boolean: lcards_alert_mode_auto_switch: name: LCARdS Auto Alert Switch initial: false icon: mdi:auto-mode input_text: lcards_alert_message: name: LCARdS Alert Message max: 255 icon: mdi:message-alert ``` ### HA-LCARS Theme ```yaml input_number: lcars_elbow_angle: name: LCARS Elbow Angle min: 1 max: 89 step: 1 mode: slider unit_of_measurement: "°" initial: 45 icon: mdi:angle-acute lcars_vertical: name: LCARS Vertical min: 26 max: 60 step: 1 mode: slider icon: mdi:arrow-expand-vertical lcars_horizontal: name: LCARS Horizontal min: 6 max: 60 step: 1 mode: slider icon: mdi:arrow-expand-horizontal lcars_menu_font: name: LCARS Menu Font min: 8 max: 24 step: 1 mode: slider unit_of_measurement: "px" icon: mdi:format-font-size-increase input_boolean: lcars_sound: name: LCARS Sound icon: mdi:volume-high lcars_texture: name: LCARS Texture icon: mdi:texture template: - sensor: - name: LCARS Header state: >- {{ "LCARS " + states("sensor.time") }} icon: mdi:text-box ``` ### Sound ```yaml input_boolean: lcards_sound_enabled: name: LCARdS Sound Effects Enabled initial: false icon: mdi:volume-high lcards_sound_cards: name: LCARdS Card Interaction Sounds initial: true icon: mdi:gesture-tap lcards_sound_ui: name: LCARdS UI Navigation Sounds initial: true icon: mdi:navigation lcards_sound_alerts: name: LCARdS Alert & System Sounds initial: true icon: mdi:alert-circle input_number: lcards_sound_volume: name: LCARdS Sound Volume min: 0 max: 1 step: 0.05 initial: 0.5 mode: slider icon: mdi:volume-medium input_select: lcards_sound_scheme: name: LCARdS Sound Scheme options: - none icon: mdi:music-box-multiple ``` LCARdS adds the installed schemes to `lcards_sound_scheme`'s options by itself, so the list needs no editing when you add a sound pack. --- ## Using Helpers in Automations **Because LCARdS reads these helpers live, any automation can change LCARdS, and any automation can react to it.** - Changing `input_select.lcards_alert_mode` is the same as calling [`lcards.set_alert_mode`](./ha-actions#lcards-set-alert-mode); the `lcards.*` alert actions also work on single devices. - See [Alert Mode](../core/alert-mode) for everything that happens when the alert mode changes. ```yaml # Raise red alert from an automation actions: - action: input_select.select_option target: entity_id: input_select.lcards_alert_mode data: option: red_alert ``` ```yaml # Run something when red alert starts triggers: - trigger: state entity_id: input_select.lcards_alert_mode to: red_alert ``` --- # Sound Configuration **LCARdS can play LCARS sounds when you tap cards, move around Home Assistant, open dialogs and change the alert mode.** The **Sounds** tab of **LCARdS Config** turns them on, picks the sound scheme and changes single events. - Sounds are off until you create the sound helpers and turn on the master switch. - A new installation's scheme is **None (silent)**: pick **lcards_default** (or another scheme) in **Sound Scheme** to hear the built-in sounds. - A card can mute itself or play other sounds: see [Card Sounds](../core/sounds). --- ## Setup **Create the sound helpers once: LCARdS Config > Helpers > Create All.** They hold the master switch, the three category switches, the volume and the scheme. See [Persistent Helpers](./persistent-helpers#sound). ## Enabling Sounds **No sound plays until `input_boolean.lcards_sound_enabled` is on.** Turn it on with **Sound effects enabled** in the Sounds tab's **Master Controls**, from a dashboard, or from an automation. - **Volume** sets the volume of every sound, `0` to `1` (default `0.5`). There is no volume per event. - **Sound Categories** switch groups of events: **Card interaction sounds** (`lcards_sound_cards`), **UI navigation sounds** (`lcards_sound_ui`) and **Alert and system sounds** (`lcards_sound_alerts`). They are on by default, and a missing category helper counts as on. - The category switches are the same for everyone; the master switch, volume and scheme can also be set per user or device (see [below](#per-user-per-device-overrides)). ## Sound Schemes **A scheme gives every event its sound.** Pick it in the Sounds tab's **Sound Scheme** section, or set `input_select.lcards_sound_scheme`. **Preview** plays a sample. - **lcards_default** is built in and covers every event with LCARS beeps and tones, except **Slider Value Change** (silent, so dragging a slider doesn't beep on every step) and the two Borg events. Sound packs add more schemes; the helper's options update by themselves. - **None (silent)** is an empty scheme: nothing plays except the events you give a sound below. To turn every sound off, use the master switch instead. - **Save as new scheme…** (under Per-Event Overrides) saves the current per-event sounds as a scheme of your own, listed as *name (custom)*. With a custom scheme active, per-event edits change that scheme directly; **Delete** removes it permanently. ## Per-Event Overrides **Give any single event another sound, or mute it, whatever the scheme says.** Open **Per-Event Overrides** inside the Sound Scheme section and pick a sound for the event. - Each event offers **(Use scheme default)**, **Mute this event**, **Browse Home Assistant Media…** (a sound from the media library) and every sound asset from the loaded packs. The play button next to it previews the result. - Click **Save** to keep your changes, or **Discard**. **Reset to scheme defaults** clears every override at once. - Overrides made here are global: they apply to every user and device that has no override of its own. They are stored by the integration (see the Storage tab), not in helpers. --- ## Per-User / Per-Device Overrides **Your own sound settings, for your Home Assistant user on any device, or for this one browser, without changing everyone else's.** The section is at the bottom of the Sounds tab. ### Scope selector **The User and Device switches choose which one you are editing.** - **User:** applies to your Home Assistant user on every device. - **Device:** applies to this browser, whoever is logged in. - Each setting shows where its current value comes from; the clear button next to an override removes it, and the next level takes over. ### What can be overridden per-user / per-device | Setting | User | Device | |---------|------|--------| | Sound effects enabled | yes | yes | | Volume | yes | yes | | Sound scheme | yes | yes | | Per-event overrides | yes | yes | | Sound categories | no | no | ### Resolution order **Each setting takes the first value it finds, in this order.** ``` Card sounds → Device → User → Global → Scheme ``` | Level | What it is | |-------|------------| | **Card sounds** | A card's own [`sounds`](../core/sounds) block, for that card's events only | | **Device** | Set in the Device scope for this browser | | **User** | Set in the User scope for your Home Assistant user | | **Global** | The helpers and the global per-event overrides | | **Scheme** | The active scheme's sound for the event | ### Admin: editing other users / devices **Home Assistant administrators can edit another user's or device's settings.** **Edit as admin** in each scope lists the users or devices; pick one to see and change its overrides. The change applies the next time that user or device plays a sound. --- ## What Events Are Covered **Every event that can play a sound, with the key that card `sounds` blocks and [`lcards.play_sound`](./ha-actions#lcards-play-sound) use.** ### Card Interactions | Event | Key | When | |-------|-----|------| | Card Tap | `card_tap` | A tap on an LCARdS card, or a click on a standard Home Assistant card | | Card Hold | `card_hold` | A hold action | | Card Double-Tap | `card_double_tap` | A double-tap action | | Card Hover (Desktop) | `card_hover` | The mouse pointer moving onto a card | | Toggle → On / Off | `toggle_on`, `toggle_off` | A toggle action turning an entity on or off | | Slider Grab / Release | `slider_drag_start`, `slider_drag_end` | Grabbing or letting go of a slider | | Slider Value Change | `slider_change` | Each step while a slider moves | | More Info Open | `more_info_open` | A more-info dialog opening | ### Home Assistant UI Navigation | Event | Key | When | |-------|-----|------| | Sidebar Menu Expand / Collapse | `menu_expand` | The sidebar menu button | | Page / View Navigation | `nav_page` | Moving between views and sidebar pages | | Dialog Open | `dialog_open` | Any Home Assistant dialog opening | | Dialog Close | `dialog_close` | Any Home Assistant dialog closing | | Dashboard Edit Start | `dashboard_edit_start` | Entering dashboard edit mode | | Dashboard Edit Save / Done | `dashboard_edit_save` | Leaving dashboard edit mode | ### Alerts & System | Event | Key | When | |-------|-----|------| | Red Alert | `alert_red` | The alert mode changes to `red_alert` | | Yellow Alert | `alert_yellow` | The alert mode changes to `yellow_alert` | | Blue Alert | `alert_blue` | The alert mode changes to `blue_alert` | | Gray Alert | `alert_gray` | The alert mode changes to `gray_alert` | | Black Alert | `alert_black` | The alert mode changes to `black_alert` | | Alert Cleared (Green Alert) | `alert_clear` | The alert mode returns to `green_alert` | | System Ready | `system_ready` | LCARdS has finished starting | | System Error | `error` | LCARdS fails to start | | Notification | `notification` | A Home Assistant notification appears | | Borg assimilation | `borg_assimilate` | The [Borg assimilation](/core/borg#sounds) starts (silent until you give it a sound) | | Borg deassimilation | `borg_deassimilate` | The Borg deassimilation starts (silent until you give it a sound) | --- ## Triggering from Automations **[`lcards.play_sound`](./ha-actions#lcards-play-sound) plays a sound from an automation**, for example a soft chime when a kiosk tablet wakes, without changing the alert mode or the screen. - With `event_type` it plays that event's sound as the browser has it set up (its overrides and scheme), and that event's category switch applies. - With `asset_key` it plays one exact sound: an asset key, a file URL such as `/local/sounds/chime.mp3` (a file in the `www` folder of your Home Assistant configuration) or a `media-source://` id. Only the master switch applies. - Like the other `lcards.*` actions, it can [target](./ha-actions#targeting) devices or users. ```yaml action: lcards.play_sound data: event_type: notification ``` --- ## Browser Audio Policy **Browsers block sound until you have clicked, tapped or pressed a key on the page.** For almost every LCARdS sound that is no trouble: your first tap is the interaction, and sounds play from then on. The **System Ready** sound is the exception: it plays as soon as LCARdS has started, before you have touched the page, so the browser blocks it unless your Home Assistant address may play sound on its own. The Sounds tab shows the same notice with a link here. :::: tabs === Chrome / Edge 1. Open **Settings > Privacy and security > Site settings > Additional content settings > Sound**. 2. Under **Allowed to play sound**, click **Add** and enter your Home Assistant address (for example `http://homeassistant.local:8123`). 3. Hard-refresh your dashboard: the startup sound now plays on page load. Or click the site icon at the left of the address bar on your Home Assistant page, open **Site settings** and set **Sound** to **Allow**. === Firefox 1. Open **Settings > Privacy & Security**, scroll to **Permissions**, and click **Settings...** next to **Autoplay**. 2. Enter your Home Assistant address, set it to **Allow Audio and Video** and click **Save Changes**. 3. Hard-refresh your dashboard. Or, when Firefox shows the autoplay-blocked icon in the address bar, click it and choose **Allow Audio and Video**. :::: ::: tip If you don't use the System Ready sound, no browser change is needed. ::: --- # Users & Devices **The Users & Devices tab of LCARdS Config shows who this browser is to LCARdS, and lets administrators see and tidy every user and device that has its own settings.** - Every browser gets a device record: a stable id and a display name. Device names are what [targeted actions](./ha-actions#targeting) and per-device settings use. - Everyone sees **This Session**. Home Assistant administrators also see **Users with Scoped Settings** and **Registered Devices**. - The settings themselves are changed in their own tabs (Sounds, Connectivity, Theme Studio > Token Overrides); this tab manages the records. --- ## This Session **Your logged-in user and this browser's device record.** Use it to name the browser, or to find its id for an action. - Click the pencil next to **Display Name** to rename this device; Enter saves. - A new device is named after its browser and system (`Chrome-Android`, `Safari-iPhone`) until you rename it. - A device can be named from its address: add `?lcards_device=`, for example `http://homeassistant.local:8123/?lcards_device=Kitchen%20Tablet`. The name applies on every load with it, over a name set before. Handy for kiosk bookmarks. - Inside Kiosk Satellite, a **Use kiosk name** button appears when the kiosk's name differs from the LCARdS name. The [voice skin](./kiosk-satellite/voice-skin#colours) finds its dashboard's colours by that name. - `window.lcards.targeting.getMyIds()` in the browser console returns this device's id and your user id. | Detail | Description | |-------|-------------| | **Logged-in User** | Your Home Assistant user's name | | **User ID** | Your Home Assistant user id, as `target_user_ids` takes it | | **Device ID** | A stable id kept in this browser's `localStorage` (`lcards_device_id`). It survives reloads and logins in the same browser profile; clearing the site's data gives a new one | | **Display Name** | The name for this browser. Editable by any user | | **Last Seen** | When this device last checked in with the integration | | **User Agent** | The browser and system string recorded for it | --- ## Users with Scoped Settings **Administrators only: every Home Assistant user with at least one setting of their own.** - Each row shows the user's name (from Home Assistant), their id and the stored keys. - **Clear all overrides for this user** deletes that user's own settings after a confirmation; they then get the device or global values. Device records and global settings are not touched. --- ## Registered Devices **Administrators only: every browser that has registered with the integration, with its name, id and last check-in.** - **Rename device** edits the display name in place. - **Remove device record** deletes the record and the settings stored for that device, after a confirmation. A browser that opens Home Assistant again registers again, with the same id. --- ## How scoped settings work **A setting that can differ per user or device takes the first value it finds: the device's, then the user's, then the global one.** ``` Device → User → Global → Built-in default (or the helper) ``` - **Device** settings apply to whoever is logged in on that browser. - **User** settings apply to one Home Assistant user on every device. - **Global** is the installation-wide value everyone shares. - Today these settings can be scoped: [sounds](./sounds#per-user-per-device-overrides) (master switch, volume, scheme and per-event sounds), the [connection overlay](./connectivity#scope-and-per-device-overrides), and theme token overrides (Theme Studio > Token Overrides). --- ## Related - [Home Assistant Actions: targeting](./ha-actions#targeting): send an `lcards.*` action to some devices or users only - [Sound Configuration](./sounds): per-user and per-device sound settings - [Connectivity](./connectivity): per-user and per-device connection overlay settings - [Scoped Settings Service](../architecture/subsystems/scoped-settings): developer reference for the storage behind this tab --- # The Fleet :::: tabs === Button #### **`lcards-button`** All standard LCARS buttons, plus advanced multi-segment controls. ![Button Card](/img/lcards-button.png) - Built-in preset library: lozenge, bullet, capped, outline, pill, text, and more - **Component mode**: embed SVG components (D-pad, Alert, custom shapes) with per-segment interactivity - Canvas-based **background animations**: stackable layers with zoom and pan - Rules Engine integration: styles hot-patched at runtime [Button Documentation](button/) === Elbow #### **`lcards-elbow`** Classic LCARS corner designs. ![Elbow Card](/img/lcards-elbow.png) - Built-in preset library: `header-left`, `header-right`, `footer-left`, `footer-right` and more - **Simple** and **segmented** (Picard-style double elbow) styles - Fully configurable LCARS arc geometry or diagonal-cut corners - Symbiont support: embed other Home Assistant cards inside the elbow area - Animated 'textures' available [Elbow Documentation](elbow/) === Slider #### **`lcards-slider`** Interactive sliders for display and control. ![Slider Card](/img/lcards-slider.gif) - Built-in presets: **pills** (segmented bar) and **gauge** (ruler with tick marks) - Horizontal and vertical orientations with independent fill and control inversion - Separate min/max for display range vs. control range - Domain auto-detection: interactive for controllable domains, display-only for sensors [Slider Documentation](slider-card/) === Select Menu #### **`lcards-select-menu`** Grid of option buttons built from `input_select`|`select` entities or custom options. ![Select Card](/img/lcards-select.gif) - Creates a grid of buttons from an `input_select`|`select` entity for an easy to use options selector - Fully customizable layout with CSS grid - Ability to re-order options, customize labels, and even add additional custom options to the list - Fully customizable actions with per-entry overrides [Select Menu Documentation](select-menu/) === Data Grid #### **`lcards-data-grid`** LCARS data grids with cascade animations. ![Data Grid Card](/img/lcards-data-grid.gif) - **Data mode**: real entity states, attributes, or template values - **Decorative mode**: cascading generated data for aesthetics - LCARS-style cascade animation with built-in speed presets - CSS Grid layout with full style cascading [Data Grid Documentation](data-grid/) === Chart #### **`lcards-chart`** LCARdS integrated charting via ApexCharts. ![Chart card: a 24-hour temperature history as an orange area with a gradient fill, a blue smoothed line from a data source, and a dashed comfort threshold](/img/cards/chart.webp) - 15+ chart types: line, area, bar, pie, scatter, heatmap, radar, and more - Entities, long-term statistics or data sources, with smoothing, min/max and rolling statistics - Threshold lines, gradient fills and theme colours that follow alert modes [Chart Documentation](chart/) === Alert Overlay #### **`lcards-alert-overlay`** Full-screen dashboard overlay reacting to alert state. - Activates automatically when `input_select.lcards_alert_mode` changes (for example from `lcards.red_alert`) - Full-screen backdrop with blur + tint layers - Configurable per-condition content card, position, and size - Content is interactive, with tap outside to dismiss [Alert Overlay Documentation](alert-overlay/) === MSD #### **`lcards-msd-card`** Create your own Master Systems Display with controls and routable lines. - Embed any Home Assistant card as a positioned **control overlay** - **Line overlays**: SVG lines with smart routing and avoid-obstacle algorithms - **Studio Editor**: visual configuration with live preview and drag-to-reposition - Animate lines independently with rules [MSD Documentation](msd/) === Astrometrics #### **`lcards-astrometrics-card`** 3D scenes in the style of the astrometrics lab and stellar cartography. ![Astrometrics card: a galaxy disc with bearing labels, the glowing galactic core, Federation and Borg space as see-through sectors, crossing beams and a small planet](/img/cards/astrometrics.webp) - Sector maps with lettered cells, galaxy discs with territories, planets with points on their surface - A sky dome with the sun and moon where they are now, from your Home Assistant location - Drag to orbit, zoom, tap a point to fly to it; named views - Draws only when something moves; every card shares one WebGL context [Astrometrics Documentation](astrometrics/) === Layout Card #### **`lcards-layout-card`** A grid of cards inside one card: build a sub-grid anywhere. ![Layout card: an LCARS frame of header and footer elbows around three buttons, a block of data cascade numbers and a vertical Picard-style slider](/img/cards/layout-card.webp) - CSS Grid with named areas: place each card by area, like the Layout View - **Layout Studio**: a full-screen visual editor to draw areas and place cards - Nest layout cards for deeper sub-grids - Child cards keep Home Assistant's own visibility conditions [Layout Card Documentation](layout-card/) :::: ## Common Card Features Features and concepts shared across the card system: | Topic | What it covers | |-------|---------------| | [Common Card Properties](common.md) | `id`, `tags`, `height`, `width`, `grid_options`, properties shared by all cards | | [Colours](../core/colours.md) | Colour formats, state-based colour system, resolution order | | [Actions](../core/actions.md) | `tap_action`, `hold_action`, `double_tap_action`, all action types and options | | [Text Fields](../core/text-fields.md) | Multi-field text system: placement, fonts, colour, templates | | [Templates](../core/templates/) | Dynamic content: JS, Jinja2, LCARdS token data source templates | | [Animations](../core/animations.md) | Per-card animations with multiple trigger types | | [Background Animations](../core/effects/background-animations.md) | Canvas-based animated backgrounds (grid, starfield, nebula, etc.) | | [Sound Effects](../core/sounds.md) | LCARS-style audio feedback for interactions and alerts | | [Rules Engine](../core/rules/) | Advanced conditional system for styling applied across cards | | [Data Sources](../core/datasources/) | Subscribes to Home Assistant Entity to provide history and processing pipelines for cards to consume | | [Themes](../core/themes/) | Built-in token-based theming for providing colour, sizing etc. | --- # Alert Overlay Card `custom:lcards-alert-overlay` **The alert overlay shows the alert symbol over the whole screen while an alert mode is raised, and hides it when the alert clears.** It follows the `input_select.lcards_alert_mode` helper, so one automation or button raises the alert on every dashboard that has the card. - Add one alert overlay to every dashboard that should show alerts. It takes no room on the dashboard; in edit mode it shows an info box so you can find it. - The overlay draws in a layer over the whole page, not in its grid cell, so where you put the card doesn't change where the alert shows. - Each condition (red, yellow, blue, black, gray) shows the symbol in its own colours by default. - The overlay covers the whole screen, so the live examples on these pages show it as the [Alert Studio](#alert-studio) does: on a mock screen with a stand-in dashboard behind it, one condition at a time. ::: tip Try it The card editor's **Open Alert Studio** button opens a studio with a mock screen that shows each condition as it will look, without raising an alert. See [Alert Studio](#alert-studio). ::: | Page | Covers | |------|--------| | [Position and Screen Effects](./overlay) | Where the symbol sits, its size, and the blur, tint and canvas effects behind it | | [Alert Band](./band) | `display: band`: a row of dashes across the screen that leaves the dashboard usable | | [Symbol and Content](./symbol) | Changing the symbol's text and colours, a message from a helper, or your own card | | [Per-Condition Settings](./conditions) | Different settings for red, yellow, blue, black and gray alert | | [Raising and Dismissing](./raising) | The `lcards.*` actions, tap to dismiss or reset, timers, and transition effects | --- ## Prerequisites **The card needs the `input_select.lcards_alert_mode` helper.** Create it from the LCARdS Config Panel, or by hand with the options `green_alert`, `red_alert`, `yellow_alert`, `blue_alert`, `black_alert` and `gray_alert` (see [Helpers](/configuration/persistent-helpers)). - The optional `input_select.lcards_alert_transition_style` helper adds a screen transition whenever the alert mode changes; see [Transition effects](./raising#transition-effects). It can also be created from the Config Panel. ## Quick start **The card works with no settings: each alert shows the LCARS alert symbol in that condition's colours, with its animation, over an 8px blur.** The symbol is sized to 60% of the screen's width and 50% of its height, so it fits wide, tall and phone screens alike. ```yaml live # Add this to every dashboard that should react to alert modes type: custom:lcards-alert-overlay ``` ## Placement **Put the card anywhere in the view; the end of the view keeps it out of the way.** When an alert is up, the card shows it in a layer attached to the page rather than in its card slot, so it always covers the full screen. ```yaml views: - cards: - type: custom:lcards-button # ... your other cards ... - type: custom:lcards-alert-overlay # the last card in the view dismiss_mode: reset ``` ## Alert Studio **The Alert Studio is where the alert overlay is set up: the card editor's Open Alert Studio button opens it.** The card editor itself has only that button, the Docs link and the YAML tab. - The settings are on the left (Config, Backdrop, Conditions, YAML); on the right a mock screen shows the condition picked in the toolbar above it, or on the Conditions tab. - The mock screen is laid out at your screen's size and scaled down, so sizes in %, px, `vw` and `vh` look as they will on the dashboard. It shows the screen effect layers, the symbol (or your content card) at its position and size, or the alert band. - Settings that don't apply are hidden: overlay position and size for a condition shown as a band, and the band settings when no condition uses one. ::: details More about the Alert Studio - **Only a preview:** the alert mode doesn't change and nothing shows on your dashboards. Click the backdrop (overlay) or the symbol (band) to try a dismiss, and **Replay** to show it again. - **The symbol:** on the Config tab, **Alert symbol** changes the symbol for every condition. On the Conditions tab each condition picks **Alert symbol** (as it is), **Customise the symbol** (the symbol's own button editor, saving only what you change) or **Your own card** (any card, edited in place with its own editor). See [Symbol and Content](./symbol). - **Guides:** the info guides (How the overlay works, How the band works, How condition overrides work) explain the settings with a diagram each. - **Saving:** Save keeps the changes; Cancel leaves the card as it was. ::: ## Limitations **One alert overlay is active per dashboard, and the card is not a normal LCARdS card.** - Only the first instance on the page becomes active. Any others have no visual presence, and in edit mode they show a "Duplicate · inactive" warning; remove them. The preview in the card editor is not a duplicate: it shows a plain info box. - While the dashboard is in edit mode the overlay stays hidden. An alert raised meanwhile shows when you leave edit mode, and its auto-dismiss countdown starts then. - The rules engine can't target the overlay: it has no card id or tags. An `lcards-*` content card inside it does support rules. - `band.phase` locks to the built-in symbol's bar sweep. With `band.emblem: false` or a custom `content` card there is nothing to lock to, and the band runs on its own. ## Card options **The keys set on the card apply to every condition; [`conditions`](./conditions) changes them for one.** - The card has none of the [common card options](/cards/common): no `height` or `width` for its grid cell, `id`, `tags`, `grid_options`, actions, text fields or animations. It sits in the grid as an empty element, and its `width` and `height` size the symbol on the screen. ```yaml live type: custom:lcards-alert-overlay dismiss_mode: reset # a tap clears the alert everywhere width: 50% layers: backdrop: preset: blur amount: 12px conditions: yellow_alert: display: band # a band across the screen; taps reach the dashboard ``` ::: details More about the card options - **From the card picker:** a card added from the picker starts with `dismiss_mode: dismiss`, `width: 50%`, `height: 33%`, `position: center` and an 8px blur, rather than the defaults below. - **Older configs:** a card-level `backdrop` (`blur`, `opacity`, `color`) from older versions is still read when `layers` is not set; see [Layers](./overlay#layers). ::: | Key | Type | Default | Description | |-----|------|---------|-------------| | `type` | string | required | `custom:lcards-alert-overlay` | | `dismiss_mode` | string | `dismiss` | What a dismiss does: `dismiss`, `reset`, `auto-dismiss`, `auto-reset`, or `none` (no tap closes it). See [Dismiss](./raising#dismiss) | | `auto_dismiss_seconds` | number | - | Seconds before an `auto-dismiss` or `auto-reset` hides the alert, at least 1 | | `display` | string | `overlay` | `overlay`: the symbol over a backdrop, the dashboard blocked until dismissed. `band`: see [Alert Band](./band) | | `band` | object | - | Band settings for `display: band`; see [Alert Band](./band) | | `position` | string | `center` | Where the symbol sits on the screen; see [Position](./overlay#position) | | `width` | string | `60%` | Symbol width (CSS length; % is of the screen) | | `height` | string | `50%` for the symbol, else `auto` | Symbol height (CSS length); see [Size](./overlay#size) | | `alert_button` | object | - | Changes to the built-in symbol for every condition; see [alert_button](./symbol#alert-button) | | `layers` | object | an 8px blur | Screen effects behind the symbol; see [Layers](./overlay#layers) | | `conditions` | object | - | Settings for one condition; see [Per-Condition Settings](./conditions) | > **Using LCARdS with browser_mod?** See [Using LCARdS with browser_mod](/configuration/browser-mod), including patterns for stacking browser_mod popups with LCARdS screen effects, combined targeting, and driving LCARdS effects from browser_mod JavaScript. --- # Alert Band `display: band` shows the alert the way the Titan.DS screens do: a row of short dashes in the condition colour across the whole screen, with the alert symbol in the middle. ## band **`display: band` shows the alert as a band across the screen instead of a backdrop, so the dashboard stays readable and usable while the alert is on.** Pair it with an alert-aware theme so the rest of the screen changes colour too. - Clicks reach the cards under the band. Clicking the symbol (or Enter or Space on it) dismisses the band, following `dismiss_mode` (with `none` the symbol closes nothing). - The symbol is the same alert button as the overlay's, so [`alert_button`](./symbol#alert-button) changes and a [content card](./symbol#content-cards) apply here too. - Backdrop [layers](./overlay#layers) are off in band mode unless you set them. ```yaml live type: custom:lcards-alert-overlay display: band dismiss_mode: reset band: position: 70% # band centre at 70% of the screen height height: 48px emblem_scale: 3 # the symbol three times the band height ``` ::: details More about the band - **On screen:** `top` and `bottom` keep the symbol 16px from the edge, and a percentage is held so the symbol (or the dashes at their tallest) stays on screen. - **Without the symbol:** with `emblem: false` there is nothing to click, so only auto-dismiss or the alert mode changing hides the band. - **A content card** sits in a box the shape of the alert symbol (about 1.36 wide for 1 high), `emblem_scale` times the band height. - **Colour:** the dashes take the condition's alert colour from the theme (`colors.alert.red` and so on). A `color` you set may be a theme token or a CSS variable, so it follows alert mode palette changes. ::: | Key | Type | Default | Description | |-----|------|---------|-------------| | `display` | string | `overlay` | `band` to show the band | | `band.position` | string | `center` | `top`, `center`, `bottom`, or a percentage of the screen height for the band's centre (`75%`) | | `band.height` | string | `clamp(24px, 4vh, 64px)` | Dash height (CSS length) | | `band.emblem` | boolean | `true` | The alert symbol (or the content card) in the middle | | `band.emblem_scale` | number | `4` | Symbol height as a multiple of the band height, 1 to 10 | | `band.color` | colour | the condition colour | Dash colour | ## Dashes **The dash keys set the width, spacing and corners of the dashes.** Dashes run outward from the symbol to both screen edges, so the spacing sets how many there are. ```yaml live type: custom:lcards-alert-overlay display: band band: dash_width: 12 dash_gap: 8 dash_radius: pill # rounded ends ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | `band.dash_width` | number | `8` | Dash width in px, at least 1 | | `band.dash_gap` | number | `12` | Space between dashes in px | | `band.dash_radius` | number or `pill` | `0` | Corner radius in px, at most half the dash width or height; `pill` rounds the ends fully | ## Animation **The band's animation runs a flash along the dashes, or pulses them all together, and can swell them as it passes.** The device's reduced motion setting turns it off. - `sweep` runs a flash outward from the symbol (or inward from the screen edges with `direction: inward`); `flash` pulses every dash together; `none` keeps the band still. - `speed` also sets the symbol's bar sweep, so the two keep step, unless `alert_button.speed` sets the symbol's own speed. ```yaml live type: custom:lcards-alert-overlay display: band band: animation: sweep direction: inward speed: 1.5 # 1.5 times as fast, the symbol's bars too grow: 1.6 # dashes swell as the sweep passes ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | `band.animation` | string | `sweep` | `sweep`, `flash` or `none` | | `band.direction` | string | `outward` | Sweep direction: `outward` from the symbol, or `inward` from the screen edges | | `band.speed` | number | `1` | Speed multiplier, 0.25 to 4 (`2` is twice as fast, `0.5` half speed) | | `band.grow` | number | `1` | Peak dash height as a multiple of the band height, 1 to 4: the dashes swell as the sweep passes, or all together with `flash`. `1` is no growth | ## band.phase **`phase` locks the band's animation to the symbol's bar sweep, so the two read as one movement.** The symbol's bars light from the outside in, reaching the middle at 150 degrees; at `180` an outward sweep starts as the symbol's finishes, so it runs from the core out to the edges like a warp core. - It needs the built-in symbol and the same speed for both: leave `alert_button.speed` unset. With `emblem: false` or a custom `content` card there is nothing to lock to, and the band runs on its own. ```yaml live # A warp-core band across the lower third; red alert takes the whole screen instead type: custom:lcards-alert-overlay display: band dismiss_mode: reset band: position: 70% dash_radius: pill grow: 1.6 phase: 180 speed: 0.75 conditions: red_alert: display: overlay ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | `band.phase` | number | - | Degrees after the symbol's bar sweep, 0 to 360. Unset: not locked. No effect with `animation: none` | ## Per-condition band **`display` and `band` can be set per condition, so one alert takes the whole screen while the others show a band.** A condition's `band` is merged over the card's, key by key. ```yaml live type: custom:lcards-alert-overlay display: band conditions: red_alert: display: overlay # red alert still takes over the screen yellow_alert: band: animation: flash ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | `conditions..display` | string | the card's `display` | `overlay` or `band` for this condition | | `conditions..band` | object | the card's `band` | Band keys for this condition, over the card's | --- # Per-Condition Settings `conditions` gives one alert condition its own settings: its own message, effects, size or display. ## Condition keys **Under `conditions`, each alert condition (`red_alert`, `yellow_alert`, `blue_alert`, `black_alert`, `gray_alert`) can override any of the card's settings for that alert.** All keys are optional: set only what you want to change. - A condition you leave out, or list with no keys, uses the card's settings and the built-in symbol in its own colours. - `dismiss_mode` is set on the card only; a condition can change only its `auto_dismiss_seconds`. ```yaml live type: custom:lcards-alert-overlay dismiss_mode: auto-reset auto_dismiss_seconds: 60 conditions: red_alert: auto_dismiss_seconds: 15 # red alerts time out faster position: center width: 500px alert_button: text: sub_text: content: CONDITION RED - ALL HANDS TO BATTLE STATIONS yellow_alert: display: band ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | `content` | object | - | A card to show instead of the symbol; overrides `alert_button` entirely. See [Content cards](./symbol#content-cards) | | `alert_button` | object | - | Changes to the symbol, merged over the card's `alert_button`. Ignored when `content` is set. See [alert_button](./symbol#alert-button) | | `layers` | object | the card's `layers` | Effect slots for this condition, over the card's; see [Layers per condition](#layers-per-condition) | | `display` | string | the card's `display` | `overlay` or `band` for this condition; see [Alert Band](./band#per-condition-band) | | `band` | object | the card's `band` | Band keys, merged over the card's `band` | | `position` | string | the card's `position` | Where the symbol sits; see [Position](./overlay#position) | | `width` | string | the card's `width` | Symbol or content width. SVG component cards (such as the built-in symbol) take their height from it | | `height` | string | the card's `height` | Height, for a content card that can't size itself from its width | | `auto_dismiss_seconds` | number | the card's value | Timeout for this condition, at least 1. Only used when the card's `dismiss_mode` is `auto-dismiss` or `auto-reset` | ## Layers per condition **A condition's `layers` changes only the slots it lists; the others come from the card's `layers`.** Set a slot to `null` to turn it off for that condition. - **Older configs:** a condition's own `backdrop` (`blur`, `opacity`, `color`, from older versions) sets that condition's `backdrop` and `color` slots, read as the card-level one is ([Layers](./overlay#layers)); its `canvas` still comes from the card. Slots in the condition's `layers` win over it, and the Alert Studio converts it to `layers` when you change a layer. ```yaml live type: custom:lcards-alert-overlay layers: backdrop: preset: blur amount: 8px canvas: preset: scanlines conditions: red_alert: layers: # a red tint on top of the card's blur color: preset: color-tint color: alpha(theme:colors.alert.red, 0.35) # no scanlines for red alert canvas: null ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | `layers.backdrop` | object or `null` | the card's | The [backdrop filter](./overlay#layers-backdrop) for this condition | | `layers.color` | object or `null` | the card's | The [colour layer](./overlay#layers-color) for this condition | | `layers.canvas` | object or `null` | the card's | The [canvas animation](./overlay#layers-canvas) for this condition | ## Putting it together **A full setup: a blur and dark tint for every condition, and red, yellow and black alert each with their own message, width and effects.** ```yaml live type: custom:lcards-alert-overlay dismiss_mode: reset position: center layers: backdrop: preset: blur amount: 8px color: preset: color-tint color: alpha(var(--primary-background-color), 0.5) conditions: # red: a heavier blur and a red tint red_alert: width: 500px layers: backdrop: preset: blur amount: 16px color: preset: color-tint color: alpha(theme:colors.alert.red, 0.35) content: type: custom:lcards-button component: alert preset: condition_red text: alert_text: content: ALERT sub_text: content: CONDITION RED - ALL HANDS TO BATTLE STATIONS # yellow: the card's blur, a yellow tint yellow_alert: width: 500px layers: color: preset: color-tint color: alpha(theme:colors.alert.yellow, 0.3) content: type: custom:lcards-button component: alert preset: condition_yellow text: alert_text: content: ALERT sub_text: content: CONDITION YELLOW # black: a heavy blur, nearly dark black_alert: width: 500px layers: backdrop: preset: blur amount: 20px color: preset: color-tint color: alpha(var(--primary-background-color), 0.7) content: type: custom:lcards-button component: alert preset: condition_black text: alert_text: content: ALERT sub_text: content: CONDITION BLACK - SILENT RUNNING ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | [Condition keys](#condition-keys) | | | `content`, `alert_button`, `layers`, `display`, `band`, `position`, `width`, `height`, `auto_dismiss_seconds` | --- # Position and Screen Effects Where the alert symbol sits on the screen, how big it is, and the effects drawn over the dashboard behind it. These settings apply to `display: overlay`; the [band](./band) has its own. ## Position **`position` places the symbol (or your content card) on the screen: in the middle, along an edge or in a corner.** A corner keeps the middle of the dashboard in view while the alert is up. - The backdrop still covers the whole screen wherever the symbol sits, and a tap anywhere outside the symbol's box (its `width` by `height`) dismisses the alert ([Dismiss](./raising#dismiss)). ```yaml live # A small notification in the top right corner type: custom:lcards-alert-overlay position: top-right width: 380px conditions: red_alert: content: type: custom:lcards-button preset: lozenge text: name: content: RED ALERT show: true style: card: color: background: default: var(--lcards-orange-dark) ``` | Value | Where | |-------|-------| | `center` | In the middle of the screen (the default) | | `top`, `top-center` | Centred, at the top | | `bottom`, `bottom-center` | Centred, at the bottom | | `left`, `left-center`, `center-left` | Centred top to bottom, at the left edge | | `right`, `right-center`, `center-right` | Centred top to bottom, at the right edge | | `top-left`, `top-right`, `bottom-left`, `bottom-right` | In that corner | | Key | Type | Default | Description | |-----|------|---------|-------------| | `position` | string | `center` | One of the values above. A condition can set its own | ## Size **`width` and `height` size the symbol, or your content card, on the screen.** Percentages are of the screen, so `60%` is 60% of the screen's width. - For the built-in symbol and other SVG component cards a width alone is enough: the height follows from the shape. - With neither set, the symbol gets 60% of the width and 50% of the height of the screen and scales to fit inside, so it suits wide, tall and phone screens alike. - Set a `height` for a custom content card that can't size itself from its width. ```yaml live type: custom:lcards-alert-overlay width: 500px # the height follows from the symbol's shape conditions: black_alert: width: 40% height: 30% ``` ::: details More about size - **The default height:** `50%` applies only to the built-in symbol (or a `content` card that is itself `component: alert`) when no `width` is set either. Set a `width` without a `height`, or use another content card, and the height is `auto`: the content sizes itself. - **Per condition:** `conditions..width` and `conditions..height` fall back to the card's values, then to these defaults. ::: | Key | Type | Default | Description | |-----|------|---------|-------------| | `width` | string | `60%` | Width as a CSS length (`400px`, `50%`, `50vw`) | | `height` | string | `50%` for the symbol with no `width`, else `auto` | Height as a CSS length. `auto`: the content sizes itself | ## layers **`layers` sets the screen effects drawn over the dashboard behind the symbol: a filter on the dashboard, an animated canvas over it, and a colour on top.** Without `layers` the overlay shows an 8px blur and nothing else. - There are three slots, each with its own presets: [`backdrop`](#layers-backdrop) filters the dashboard behind the overlay, [`color`](#layers-color) lays a colour over it, and [`canvas`](#layers-canvas) draws an animation between the two (the colour lies over it). - Set only the slots you want. Once `layers` is set, a slot you leave out stays off, so `layers` with only `color` has no blur. - `layers: null` turns every layer off: the symbol shows over the dashboard as it is. - A condition can change one slot and keep the others, or turn a slot off with `null`; see [Per-Condition Settings](./conditions#condition-keys). ```yaml live type: custom:lcards-alert-overlay dismiss_mode: reset layers: # blur the dashboard backdrop: preset: blur amount: 12px # dim it with a red tint color: preset: color-tint color: alpha(theme:colors.alert.red, 0.35) # TV static, under the tint canvas: preset: static opacity: 0.3 ``` ::: details More about layers - **Colours:** the colour settings (`color-tint`'s `color`, and `color` on the `static` and `pixelate` canvas presets) take any LCARdS colour: `rgb()`/`rgba()`, `var(--css-variable)`, theme tokens (`theme:palette.moonlight`), CSS colour names and computed expressions (`alpha(theme:colors.ui.primary, 0.4)`). For colours that follow the alert mode use `var(--lcards-*)` or `var(--lcars-*)` variables. - **Older configs:** a card-level `backdrop` with `blur`, `opacity` and `color` (from older versions) is still read when `layers` is not set: `blur` becomes a blur layer and `color` a `color-tint`, with `opacity` (default `0.6`) multiplied into the colour's alpha. The Alert Studio converts it to `layers` when you change a layer. - **The band:** in `display: band` the layers are off unless you set them; see [Alert Band](./band). - **Effects from actions:** the overlay only replaces the layers it sets and, when it closes, clears only its own. A screen effect started with [`lcards.trigger_effect`](/configuration/ha-actions#lcards-trigger-effect) on a layer the overlay leaves out keeps running, and so does one started on any layer after the overlay appeared. ::: | Key | Type | Default | Description | |-----|------|---------|-------------| | `layers` | object or `null` | - | The screen effects; `null` turns them all off | | `layers.backdrop` | object | an 8px blur when `layers` is not set | The [backdrop filter](#layers-backdrop) | | `layers.color` | object | - | The [colour layer](#layers-color) | | `layers.canvas` | object | - | The [canvas animation](#layers-canvas) | ### layers.backdrop **The backdrop slot filters the dashboard behind the overlay: blur it, take the colour out, or shift its hues.** It is a CSS `backdrop-filter`, so the dashboard shows through, changed. ```yaml live type: custom:lcards-alert-overlay layers: backdrop: preset: grayscale amount: 80% ``` | Preset | What it does | Setting | |--------|--------------|---------| | `blur` | Blurs the dashboard | `amount`, default `8px` | | `grayscale` | Takes out the colour | `amount`, default `100%` | | `saturate` | Makes colours stronger | `amount`, default `200%` | | `contrast` | Raises the contrast | `amount`, default `200%` | | `hue-rotate` | Shifts every hue round the colour wheel | `angle`, default `180deg` | | Key | Type | Default | Description | |-----|------|---------|-------------| | `preset` | string | required | One of the presets above | | `amount` | string | by preset | CSS value for `blur` (`4px` subtle, `20px` heavy), `grayscale`, `saturate` and `contrast` | | `angle` | string | `180deg` | `hue-rotate` only: the angle (`90deg`, `270deg`) | ### layers.color **The colour slot lays a colour over the dashboard, on top of the backdrop filter and the canvas: a flat tint, or a vignette that darkens the edges.** ```yaml live type: custom:lcards-alert-overlay layers: color: preset: vignette opacity: 0.8 ``` | Preset | What it does | |--------|--------------| | `color-tint` | A flat colour over the whole screen; use a colour with alpha so the dashboard shows through | | `vignette` | A dark fade from clear in the middle to dark at the edges | | Key | Type | Default | Description | |-----|------|---------|-------------| | `preset` | string | required | `color-tint` or `vignette` | | `color` | colour | `rgba(0,0,0,0.5)` | `color-tint` only: the tint, any colour (alpha sets how much shows through) | | `opacity` | number | `0.7` | `vignette` only: how dark the edges get, 0 to 1 | ### layers.canvas **The canvas slot draws an animation over the dashboard, between the backdrop filter and the colour layer: TV static, a mosaic, glitch bands or scanlines.** ```yaml live type: custom:lcards-alert-overlay layers: canvas: preset: scanlines lineHeight: 3 opacity: 0.3 scroll: 2 ``` | Preset | What it does | Settings | |--------|--------------|----------| | `static` | TV static noise | `opacity`, `scale`, `color`, `tintStrength` | | `pixelate` | Mosaic blocks | `pixelSize`, `opacity`, `variance`, `baseLight`, `color`, `tintStrength` | | `glitch` | Bands shifted sideways | `intensity`, `maxShift`, `bandHeight`, `opacity`, `fps` | | `scanlines` | CRT lines across the screen | `lineHeight`, `opacity`, `scroll` | | Key | Type | Default | Description | |-----|------|---------|-------------| | `preset` | string | required | One of the presets above | | `opacity` | number | `0.55` static, `0.75` pixelate, `0.85` glitch, `0.25` scanlines | How strong the effect is, 0 to 1 | | `scale` | number | `4` | `static`: grain size, 1 to 16; larger is chunkier | | `pixelSize` | number | `8` | `pixelate`: block size in px, 2 to 64 | | `variance` | number | `0.35` | `pixelate`: brightness difference between blocks, 0 to 1 (`0` is even) | | `baseLight` | number | `80` | `pixelate`: base grey level, 0 (black) to 255 (white) | | `color` | colour | `#ffffff` static, `#8c9aa6` pixelate | `static` and `pixelate`: the colour blended in, by `tintStrength` | | `tintStrength` | number | `0` | `static` and `pixelate`: how far to blend toward `color`, 0 to 1 (`0` is white noise or a grey mosaic) | | `intensity` | number | `0.08` | `glitch`: share of lines shifted each frame, 0.01 to 0.5 | | `maxShift` | number | `40` | `glitch`: largest sideways shift in px | | `bandHeight` | number | `4` | `glitch`: height of each band in px | | `fps` | number | `20` | `glitch`: frames per second, 1 to 60 | | `lineHeight` | number | `4` | `scanlines`: height of each line in px, 1 to 20 | | `scroll` | number | `0` | `scanlines`: scroll speed, 0 to 10 (`0` is still) | --- # Raising and Dismissing How an alert starts and ends: the actions that raise it, what a tap on the overlay does, timers that clear it, and the transition played when the alert mode changes. ## Triggering alert modes **The `lcards.*` alert actions raise and clear alerts from automations, scripts and dashboard buttons.** Without targeting they set `input_select.lcards_alert_mode`, so every dashboard with an alert overlay shows the alert. - `lcards.red_alert`, `lcards.yellow_alert`, `lcards.blue_alert`, `lcards.black_alert` and `lcards.gray_alert` raise that alert; `lcards.clear_alert` returns to `green_alert`; `lcards.set_alert_mode` takes the mode as `mode`. - With a targeting field the alert is local to the matching devices or users, and the global helper is not changed: the alert overlay on those devices shows it, the others don't. [Users & Devices](/configuration/users-devices) explains broadcast and targeted alerts in full. - You can also set the helper with Home Assistant's own `input_select.select_option` action. ```yaml live # A dashboard button that raises red alert type: custom:lcards-button preset: lozenge text: name: content: RED ALERT show: true style: card: color: background: default: var(--lcars-alert-red) tap_action: action: perform-action perform_action: lcards.red_alert ``` ```yaml # In an automation or script: every dashboard action: lcards.red_alert ``` ```yaml # Only on the kitchen tablet; the global helper is not changed action: lcards.red_alert data: target_device_names: - Kitchen tablet ``` ```yaml # The helper directly: red_alert, yellow_alert, blue_alert, black_alert, gray_alert or green_alert action: input_select.select_option target: entity_id: input_select.lcards_alert_mode data: option: red_alert ``` ::: details More about triggering - **From the browser console:** `window.lcards.setAlertMode('red_alert')` or `window.lcards.redAlert()` sets an alert, and `window.lcards.setAlertMode('green_alert')` or `window.lcards.greenAlert()` clears it. There are also `yellowAlert()`, `blueAlert()`, `grayAlert()` and `blackAlert()`. With the helper in place they write it, so every dashboard follows; without it the alert shows in this browser only. - **The same mode again:** setting the mode that is already active changes nothing, so a dismissed alert comes back only when the mode changes. - **More:** the [Alert Mode](/core/alert-mode) page covers what else an alert changes (theme colours, sounds), and [Actions](/configuration/ha-actions) lists every `lcards.*` action. ::: | Key | Type | Default | Description | |-----|------|---------|-------------| | `mode` | string | required | `lcards.set_alert_mode` only: `red_alert`, `yellow_alert`, `blue_alert`, `gray_alert`, `black_alert` or `green_alert` | | `target_device_ids` | list | all devices | Browser device ids (the `lcards_device_id` each browser stores) | | `target_device_names` | list | all devices | Device display names, set in the LCARdS Config Panel or with `?lcards_device=`. A name shared by several devices matches all of them | | `target_user_ids` | list | all users | Home Assistant user ids | | `target_user_names` | list | all users | Home Assistant user display names, any case | ## Dismiss **`dismiss_mode` sets what happens when someone taps outside the symbol: hide the alert on this screen, clear it everywhere, or nothing at all.** The auto modes do the same on a timer. - `dismiss` and `auto-dismiss` hide the overlay on this dashboard only: the alert mode stays active, other dashboards still show it, and it shows again when the mode changes. - `reset` and `auto-reset` also set `lcards_alert_mode` back to `green_alert`, clearing the alert everywhere. A targeted alert (on this device only) is cleared on this device. - With an auto mode the user can still tap to dismiss early. In `display: band` the tap is on the symbol. - `none` keeps the alert on screen until the alert mode changes (set from an automation, another dashboard or `lcards.clear_alert`). No tap closes it, and taps outside the symbol reach the dashboard underneath, as with `dismiss: false` on `lcards.show_portal_card`. ```yaml live # Hides after 30 seconds and clears the alert; red alerts after 15 type: custom:lcards-alert-overlay dismiss_mode: auto-reset auto_dismiss_seconds: 30 conditions: red_alert: auto_dismiss_seconds: 15 ``` ::: details More about dismiss - **The timer:** the countdown starts when the overlay shows (for an alert raised in edit mode, when you leave edit mode). A dismiss cancels it. If the alert changes to another condition while it runs, it starts again for that condition. - **Without a time:** an auto mode with no `auto_dismiss_seconds` starts no timer, and the alert stays until it is dismissed or the mode changes. - **Where to tap:** the whole screen outside the symbol's box (its `width` by `height`) dismisses, whether or not there are screen effects. A tap inside the box goes to the symbol or content card. ::: | Key | Type | Default | Description | |-----|------|---------|-------------| | `dismiss_mode` | string | `dismiss` | `dismiss`, `reset`, `auto-dismiss`, `auto-reset` or `none` (stays until the alert clears) | | `auto_dismiss_seconds` | number | - | Seconds before an auto mode hides the alert, at least 1. Needed for `auto-dismiss` and `auto-reset`; a condition can set its own | ## Transition effects **A transition effect plays over the whole screen while the new alert colours are applied, whenever the alert mode changes.** The `input_select.lcards_alert_transition_style` helper picks it. - The helper is optional. Without it, or with it set to `off`, the colours change at once with no effect. - Create it from the **LCARdS Config Panel** (Alert System section), or in Home Assistant with that entity id and the values below. Once it exists, change the effect at any time from the Config Panel, a dashboard dropdown or an automation. - The effect plays on the whole page on every alert mode change, whichever dashboard or device raised it; it is not part of any one alert overlay. ```yaml # Pick the effect from an automation action: input_select.select_option target: entity_id: input_select.lcards_alert_transition_style data: option: blur_fade ``` | Value | Effect | |-------|--------| | `off` | No transition: the colours change at once (the default) | | `blur_fade` | The view blurs and dims, the colours change, then it sharpens again | | `fade_only` | The view fades to near black, the colours change, then it fades back in | | `flash` | A full-screen flash in the alert colour fades in and out over the change | | `color_bleed` | The hues turn a full 360° and the brightness dips while the colours change | | `flicker` | The view flickers in uneven steps, changing colour part way through | | `static` | Pixelated noise, tinted to the alert colour, plays over the change | | `wipe` | A see-through panel in the alert colour wipes across the screen and back | | Key | Type | Default | Description | |-----|------|---------|-------------| | `input_select.lcards_alert_transition_style` | helper | `off` | One of the values above | --- # Symbol and Content What the alert shows in the middle: the built-in alert symbol, changed as little or as much as you like, or a card of your own. ## alert_button **`alert_button` changes the built-in alert symbol without replacing it: set only what you want to change, and it is merged over the symbol.** Use it for your own message, a different text colour or size, or a faster bar sweep. - Without a `content` card each condition shows the built-in symbol: an `lcards-button` with the `alert` component, its condition's preset for the colours, and the text `ALERT` over `CONDITION: RED` (and so on). - `alert_button` on the card changes the symbol for every condition; `conditions..alert_button` changes it for one condition, merged over the card's; `conditions..content` replaces the symbol entirely, and `alert_button` is ignored for that condition. - Any `lcards-button` key can be changed: text fields (`content`, `color`, `font_size`, ...), `style`, `animations`, `sounds` and the rest. `type`, `component` and `preset` stay fixed, so each condition keeps its own colours. ```text built-in symbol (the condition's preset and text) ← alert_button (every condition) ← conditions..alert_button (this condition) conditions..content (replaces all of it) ``` ```yaml live type: custom:lcards-alert-overlay alert_button: text: sub_text: content: ALL HANDS TO BATTLE STATIONS alert: color: shape: var(--lcars-orange) ``` ::: details More about alert_button - **Merging:** objects merge key by key, so a text field keeps the settings you don't change. A list (such as `animations`) in a condition's `alert_button` replaces the card's list rather than adding to it. - **In the Alert Studio:** the Config tab's **Alert symbol** section edits the card's `alert_button`, and each condition picks **Alert symbol** (as it is), **Customise the symbol** (its `alert_button`, in the symbol's own button editor) or **Your own card** (`content`). The studio saves only what you change. - **More keys:** the [alert component](/cards/button/components#alert) lists the symbol's own settings and text fields. ::: | Condition | Preset | Text | |-----------|--------|------| | `red_alert` | `condition_red` | `ALERT`, `CONDITION: RED` | | `yellow_alert` | `condition_yellow` | `ALERT`, `CONDITION: YELLOW` | | `blue_alert` | `condition_blue` | `ALERT`, `CONDITION: BLUE` | | `black_alert` | `condition_black` | `ALERT`, `CONDITION: BLACK` | | `gray_alert` | `condition_gray` | `ALERT`, `CONDITION: GRAY` | | Key | Type | Default | Description | |-----|------|---------|-------------| | `alert_button` | object | - | Changes to the symbol for every condition: any `lcards-button` key except `type`, `component` and `preset` | | `alert_button.text.alert_text` | object | `content: ALERT` | The top label: `content` and any text field setting (`color`, `font_size`, ...) | | `alert_button.text.sub_text` | object | `content: CONDITION: RED` and so on | The message: `content` (static text or a template) and any text field setting | | `alert_button.alert.color.shape` | colour | the condition colour | Fill of the shield | | `alert_button.alert.color.bars` | colour | the condition colour | Colour of the bars | | `alert_button.speed` | number | `1` | Bar sweep speed, 0.25 to 4 (`2` is twice as fast). In band mode it follows `band.speed` unless set | | `conditions..alert_button` | object | - | Changes for one condition, over the card's `alert_button`. Ignored when the condition has `content` | ### One message for every condition **Set the message once in the card's `alert_button`, and override it for a condition that needs its own.** Every condition shows the message in its own colours. ```yaml live type: custom:lcards-alert-overlay alert_button: text: sub_text: content: ALL HANDS TO BATTLE STATIONS font_size: 22 conditions: blue_alert: alert_button: text: sub_text: content: SECURITY LOCKDOWN IN PROGRESS ``` Blue alert shows its own message, still at size 22, because the condition's `sub_text` is merged over the card's. | Key | Type | Default | Description | |-----|------|---------|-------------| | [alert_button keys](#alert-button) | | | `text.sub_text`, `text.alert_text`, `alert`, `speed` | ### A message from a helper **Point the message at the `input_text.lcards_alert_message` helper, so an automation can set the words when it raises the alert.** Create the helper from the LCARdS Config Panel ([Helpers](/configuration/persistent-helpers)). ```yaml live type: custom:lcards-alert-overlay conditions: blue_alert: alert_button: text: sub_text: content: "{{ states('input_text.lcards_alert_message') }}" ``` Set the message in an automation or script before raising the alert: ```yaml action: input_text.set_value target: entity_id: input_text.lcards_alert_message data: value: SECURITY LOCKDOWN IN PROGRESS ``` A JavaScript template can fall back to the usual text when the message is empty: ```yaml live type: custom:lcards-alert-overlay conditions: blue_alert: alert_button: text: sub_text: content: '[[[ const msg = hass.states["input_text.lcards_alert_message"]?.state; return msg?.trim() || "CONDITION: BLUE"; ]]]' ``` ::: details More about messages - **When templates are read:** a Jinja template (`{{ }}` or `{% %}`) is worked out by Home Assistant once, when the alert shows. A JavaScript template (`[[[ ]]]`) or a token (`{entity.state}`) is worked out by the button itself, so it follows the helper while the alert is up. ::: | Key | Type | Default | Description | |-----|------|---------|-------------| | [alert_button keys](#alert-button) | | | `text.sub_text.content` takes static text or a template | ## Content cards **`conditions..content` shows a card of your own for that condition instead of the symbol.** Any card type works: it is created and mounted as it would be on a dashboard, and LCARdS cards keep their templates, entities, actions and animations. - The alert symbol as content (`component: alert`) is sized like the built-in one; any other card keeps its own height unless you set `height` ([Size](./overlay#size)). ```yaml live type: custom:lcards-alert-overlay conditions: red_alert: content: type: custom:lcards-button component: alert preset: condition_red text: alert_text: content: INTRUDER ALERT sub_text: content: SECURITY TEAM TO MAIN BRIDGE ``` | Key | Type | Default | Description | |-----|------|---------|-------------| | `conditions..content` | object | the built-in symbol | A full card config (`type` required) shown for this condition. Replaces the symbol and its `alert_button` | --- # Astrometrics `custom:lcards-astrometrics-card` ![Astrometrics card: a galaxy disc with bearing labels round its rim, the galactic core glowing yellow, Federation space as a blue see-through sector, Borg space as a green one, crossing beams and a small blue planet with its orbits](/img/cards/astrometrics.webp) **A 3D scene in the style of the astrometrics lab and stellar cartography: a lettered sector map, a galaxy disc with territories, a planet with an away team on it, or the sky over your home with the sun and moon where they are now.** Drag to orbit, scroll or pinch to zoom, and tap a point to fly to it. - **Objects** draw the scene (grids, planets, territories, routes, nebulas, ships), and **points** are the named places on it that labels, routes and the camera refer to by id. - The camera orbits a target, and named views let a tap fly it from the galaxy to a planet and back. - The scene draws only when something moves, so an idle card costs nothing, and every astrometrics card and WebGL background on a page shares one WebGL context. ::: tip Try it - The card editor opens the [Astrometrics Studio](./start#the-studio): a full-screen editor with the live scene, where you tap, drag and place points, edit every object in a form, capture camera views and start from a starter. - [Getting Started](./start) has a first card to copy and every starter with its picture. ::: ## How a scene is sized **One card holds one scene, and every position, size and distance in it is in scene units: your own, or real ones you name.** Most scenes are built to fit; a true-scale scene uses the real numbers and can reach from a galaxy down to a station. - **Scene units** are yours to pick: a disc of radius 100, planets 5 across. Nothing is to scale, and everything shows at once. This is the easy way, and most starters work like this. - **Named units** (`units: ly`, `pc`, `au`, `km` or `m` on the card) say what one unit is, so real numbers come out right: a galaxy 100,000 light years across, a planet at its real distance, a model at its real size (a model's `length` is in metres and is converted to the scene's units). - **A star system** (a `system` object placed at one of the scene's points) is a scene inside the scene, with units of its own: a galaxy in light years holds a solar system in km. As the camera flies close it switches to the system's units, so one card spans the whole range. - **Screen sizes** (line widths, dashes, label and marker sizes) are in px, the same at any zoom. Every other length (`radius`, `size`, `line_spacing`, positions) is in scene units. [Scale](./scale) has the details: units, star systems, the real Solar System and the scene clock. ## Where to start **Pick the starter closest to what you want and change it; it is quicker than an empty scene.** The Studio's Starters tab adds one with a few settings, and [Getting Started](./start#starters) shows them all with pictures. | You want | Start with | |---|---| | A galaxy map with territories | [Galaxy with territories](./starters#galaxy-with-territories) (scene units), [Federation map](./starters#federation-map) (scene units), [Star Trek galaxy](./starters#star-trek-galaxy) (ly) | | A sector map or tactical grid | [Sector map](./starters#sector-map) (scene units) | | Planets and orbits | [Solar system](./starters#solar-system) (scene units), [Solar system (real positions)](./starters#solar-system-real-positions) (km, the planets where they are on the scene clock's date) | | The sky over your home | [Sky dome: the sun and moon](./starters#sky-dome-the-sun-and-moon) (scene units; the sun and moon where they are now, from your Home Assistant location) | | A ship or starbase close up | [Starbase approach](./starters#starbase-approach), [Deep Space 9](./starters#deep-space-9), [Utopia Planitia yards](./starters#utopia-planitia-yards), [Borg encounter](./starters#borg-encounter) (scene units) | | From a galaxy down to a station | [Galaxy to station at true scale](./starters#galaxy-to-station-at-true-scale) (ly, with a solar system in km inside) | | Something of your own | The [quick start](./start#quick-start): a grid and a few points (scene units) | ## Pages | Page | Covers | |------|--------| | [Getting Started](./start) | A first card, the starters with pictures, and the card's own options | | [Starters](./starters) | Every ready-made scene and part as a live card with its YAML | | [Points](./points) | Named places: where they sit, labels, markers, actions, cards pinned to them | | [Objects](./objects) | Which object type to use for what, and the keys every object takes | | [Camera and Views](./camera) | Named views, controls, the on-card buttons, following a point, limits | | [Scene and Looks](./scene) | Units and motion, the diagram and realistic looks, stars, background, labels | | [Live Data](./data) | Points and settings that follow entities, templates, rules, a guided tour | | [Effects](./effects) | Nebulas, scan bands, moving dashes, animated fills, warp and dust | | [Scale](./scale) | Real units, star systems in their own units, the real Solar System and the scene clock | | [Your Own Models](./models) | Ships and stations from your own glTF files | --- # Camera and Views **The camera orbits a target, and named views let a tap fly it from one place in the scene to another.** Four numbers place it: `yaw` (the way it faces: `0` faces north), `tilt` (how high above the target), `distance` and `fov` (the field of view). - Bearings are degrees clockwise from north, as on a compass seen from above, and north is away from the camera in the default view: `yaw: 0` looks north, `yaw: 90` looks east. - Fly between views with a `tap_action` on a point or object (`action: fly-to`, see [Points: actions](./points#actions)), or from other cards and automations ([Live data: fly-to](./data#fly-to-from-other-cards-and-automations)). - In the [Astrometrics Studio](./start#the-studio)'s Camera tab, move the preview's camera and select **Capture view** to write a view where the camera is. ## camera.views **Named views of the scene, and the one the card opens on.** A view is a target and the numbers that place the camera round it; `camera.view` names the view shown first. - `target` is a point id or `[x, y, z]`. When the target is a point that moves, the camera [follows it](#following-a-point). - The view the card opens on faces north at a tilt of 35 when it leaves out `yaw` and `tilt`, and frames the whole scene when it leaves out `distance`. A view flown to later keeps the camera's current numbers for any key it leaves out. - With no views at all, the camera frames the whole scene from a bearing of 20 and a tilt of 35. - `projection: orthographic` removes the perspective, for a flat map; `distance` then sets the zoom. ```yaml live type: custom:lcards-astrometrics-card height: 340 camera: view: galaxy views: galaxy: target: core yaw: 20 tilt: 35 distance: 260 # straight down, without perspective map: target: core tilt: 90 distance: 300 projection: orthographic backdrop: stars: true points: - id: core xyz: [0, 0, 0] label: GALACTIC CORE style: title - id: to_map polar: [45, 300] marker: reticle label: MAP VIEW tap_action: action: fly-to view: map - id: to_galaxy polar: [45, 120] marker: reticle label: GALAXY VIEW tap_action: action: fly-to view: galaxy objects: - type: grid shape: disc radius: 100 pattern: polar line_spacing: 10 spoke_count: 36 ``` ::: details More about views - **Wide cards:** on a card wider than 2:1 the field of view narrows, so the view is never wider than on a 2:1 card; a very wide angle would stretch planets near the sides out of shape. A wide, short card therefore shows the scene closer: move `distance` back to fit more in. - **Distances in a system:** a view's `distance` is in its target's units, so a view of a station inside a [star system](./scale#star-systems) in km is a few km away. A view with an `[x, y, z]` target is in scene units. - **A guided tour:** `camera.view` can follow an entity instead of naming a view, so a slider or a select flies the camera from stop to stop. See [Live data: a guided tour](./data#a-guided-tour). - **In the Studio:** a captured view writes the target as a point's id when the camera looks at a point (after flying to it), else as coordinates. Each view flies, renames (actions that fly to it follow the new name), reorders and becomes the start view with **Start here**. ::: | Key | Type | Default | Description | |---|---|---|---| | `camera.view` | string / object | the first view | The view the card opens on. Or a [guided tour](./data#a-guided-tour): `entity` and its stops | | `camera.views` | object | - | Your views, by name | | `camera.views..target` | id / `[x, y, z]` | the scene's centre | What the camera looks at. A view flown to later keeps the current target when it leaves this out | | `camera.views..yaw` | number | `0` | The way the camera faces, degrees: `0` faces north, `90` east | | `camera.views..tilt` | number | `35` | The camera's height angle, degrees: `0` level with the target, `90` straight down. `-90` to `90` | | `camera.views..distance` | number | frames the scene | Distance from the target, in the target's units. With `projection: orthographic`, the zoom | | `camera.views..fov` | number | `40` | Vertical field of view, degrees, perspective only. Held between `5` and `150` | | `camera.views..projection` | string | `perspective` | `perspective`: far things look smaller. `orthographic`: no perspective, a flat map | | `camera.views..warp` | boolean | `camera.warp` | Stars and dust streak while the camera flies here ([warp](./effects#warp-and-dust)) | ## Controls **Drag to orbit, pan and zoom with a mouse, a touchpad, a touch screen or the keys.** These keys change what each gesture does, or turn the controls off. | To | Mouse | Touchpad | Touch screen | Keys (card focused) | |---|---|---|---|---| | Orbit round the target | Drag | Click and drag, or shift + two-finger swipe | Drag one finger | Shift + arrows | | Pan | Shift-drag, right-drag or middle-drag | Two-finger swipe | Two fingers | Arrows | | Zoom | Wheel, toward the pointer | Pinch, toward the pointer | Pinch | `+` / `-` | | Fly forward or back (camera and target together, so you travel through the scene; slower near a planet, model or cube, so you never fly into it) | | | | `W` / `S`, `Page Up` / `Page Down` | | Draw small models larger, or at their [real size](./objects/ships#real-size) again | | | | `V` | | Fly in toward a spot | Double-click blank space (shift: out) | Double-tap blank space | Double-tap blank space | | | Fly to a point and follow it | Click the point or its label | Tap the point or its label | Tap the point or its label | | | Fly in close to what stands at a point (a station, a ship, a planet) | Double-click the point or its label | Double-tap it | Double-tap it | | | Let go of a followed point | Click blank space | Tap blank space | Tap blank space | | | Back to the start view | | | | `Home` | - `drag: pan` swaps orbit and pan for a one-finger or left-button drag. With `limits.tilt` locked to one value (`[90, 90]`), a drag always pans, as on a map. - Pan moves along the screen by default, so a side view pans up and down and a top view pans across the map. `pan: ground` keeps the target at its height. - `controls: false` turns off dragging, zooming, double-tap and keys, and leaves the camera to fly-to actions, `auto_rotate` and the [on-card buttons](#camera-buttons). ```yaml live type: custom:lcards-astrometrics-card height: 300 camera: # a one-finger drag moves across the map drag: pan pan: ground # each zoom step is a smaller change zoom_step: 1.5 double_tap: none views: v: target: [0, 0, 0] yaw: 0 tilt: 55 distance: 220 objects: - type: grid shape: plane size: 200 line_spacing: 20 color: var(--lcars-blue) - type: ring radius: 40 color: var(--lcars-orange) ``` ::: details More about controls - **Touchpad or mouse wheel:** both send the same wheel events, so the card tells them apart by the events (a wheel moves in whole steps, a two-finger swipe in small ones and sideways too). A swipe pans, a mouse wheel zooms, and a pinch always zooms. If your mouse has a smooth wheel that pans instead, set `wheel: zoom`; `wheel: pan` makes every wheel event pan. - **Double-tap on a point:** on a point without a `tap_action` of its own, or with a `fly-to`, a double-tap flies in close: to a few times the size of the largest object standing at the point, or much closer than now when nothing stands there. A station a few km across seen from the far side of its planet is a double-tap away. - **Taps on points and objects** whose `tap_action` is another action run it on each tap; `double_tap` never changes that. - **The on-card buttons** do the same as the keys; press and hold keeps moving. ::: | Key | Type | Default | Description | |---|---|---|---| | `camera.controls` | boolean | `true` | Drag, zoom, double-tap and keys. `false`: the camera moves only by fly-to, `auto_rotate` and the buttons | | `camera.drag` | string | `orbit` | What a one-finger or left-button drag does: `orbit` (shift or the right button pans) or `pan` (shift or the right button orbits). A middle-button drag always pans | | `camera.pan` | string | `screen` | `screen`: pan along the screen. `ground`: across the ground plane, the target keeps its height | | `camera.wheel` | string | `auto` | `auto`: a mouse wheel zooms and a touchpad swipe pans. `zoom`: every wheel event zooms. `pan`: every wheel event pans | | `camera.zoom_to` | string | `cursor` | Where the wheel and pinch zoom toward: `cursor` (the spot under the pointer stays put) or `target` (straight in and out) | | `camera.zoom_step` | number | `2` | Distance factor of one zoom step (double-tap, zoom buttons, `+` and `-`). `2` halves the distance. More than `1` | | `camera.double_tap` | string | `zoom` | `zoom`: a double-tap flies in toward the spot, or close to a point. `none`: nothing | ## Following a point **After the camera flies to a point, it stays on the point while the point moves:** a ship on its orbit, a planet round its star, a phone placed from its entity. - Any fly-to that lands on a point starts it: a tap on the point, a `fly-to` action, a view whose `target` is the point, a fly-to from another card or an automation. - Orbit and zoom work round the point as usual, and the wheel and pinch zoom straight in on it rather than toward the pointer. A pan or a fly forward or back keeps following, offset from the point, so a planet on a fast [scene clock](./scale#the-scene-clock) does not race out of view. - A double-tap, a tap on blank space or a fly-to somewhere else lets go, and the point is no longer highlighted. ```yaml live type: custom:lcards-astrometrics-card height: 320 camera: follow: true views: v: target: [0, 0, 0] yaw: 20 tilt: 35 distance: 140 points: - id: sun xyz: [0, 0, 0] label: SUN style: major # tap the ship: the camera flies to it and rides along - id: ship polar: [45, 0] object: orbit marker: dot label: TAP TO FOLLOW objects: - type: glow at: sun size: 30 color: var(--lcars-yellow) - type: ring id: orbit radius: 45 spin: 15 width: 1 opacity: 0.4 ``` ::: details More about following - **Objects on a moving point:** a fly-to an object standing on a moving point (`at: `: a comet on its orbit, a ship model on a moving point) flies to the point and follows it the same way, in the card and in the Studio's preview. Dragging a point in the Studio lets go first. - **Points that stand still** are not affected. ::: | Key | Type | Default | Description | |---|---|---|---| | `camera.follow` | boolean | `true` | Keep a point at the centre while it moves, after a fly-to lands on it. `false`: the camera stays where it landed | ## camera.buttons **An LCARdS D-pad on the card that moves the camera, with a time slider under it.** It does what the keys do, so a touch screen without a keyboard can pan, zoom and fly forward too. - The arms pan, the centre flies back to the start view, the left corners zoom in (top) and out (bottom), and the right corners fly forward (top) and back (bottom). Press and hold keeps moving. - It takes the D-pad colours of your theme (the `components.dpad` theme tokens, as on a button with `component: dpad`), so it follows HA-LCARS and alert modes. - The buttons fade out after three seconds without input on the card and come back when the pointer moves over it, on a touch or a key (`hide: idle`). - `buttons: true` shows all of them in the bottom right. ```yaml live type: custom:lcards-astrometrics-card height: 360 camera: buttons: position: bottom-right size: 150 hide: never views: v: target: [0, 0, 0] yaw: 20 tilt: 35 distance: 150 backdrop: stars: true points: - id: sun xyz: [0, 0, 0] label: SUN style: major objects: - type: glow at: sun size: 30 color: var(--lcars-yellow) - type: ring radius: 50 spin: 10 dash: [6, 8] color: var(--lcars-blue) ``` ::: details More about the buttons - **The time slider** slows the scene's motion (orbits, spins, drift) down to a tenth, holds it, or speeds it up to four times, so a fast ship is easy to tap. It changes the view only; `time_scale` on the card sets the speed it starts at ([Scene and Looks](./scene#units-and-motion)). - **The date slider:** on a card with a [clock](./scale#the-scene-clock), the slider can set the scene date's rate instead: a year, a month or a day a second backward, paused, live, then an hour, a day, a month or a year a second forward, with the date above it and NOW to go back to today. The clock button beside it switches between the two sliders. - **The size button** shows under the pad while a model is drawn at its [real size](./objects/ships#real-size): REAL SIZE keeps models in proportion, VISIBLE SIZE draws each small one at least 40 px across (the `V` key does the same). It changes the view only. - **Off parts:** `pan`, `zoom`, `travel` or `reset: false` dims those parts of the pad and turns them off. ::: | Key | Type | Default | Description | |---|---|---|---| | `camera.buttons` | boolean / object | off | `true` for every button in the bottom right, or the keys below | | `camera.buttons.position` | string | `bottom-right` | Where they sit: `top-left`, `top-center`, `top-right`, `center-left`, `center`, `center-right`, `bottom-left`, `bottom-center` or `bottom-right` | | `camera.buttons.size` | number | `180` | How big the D-pad is, px across, `64` to `320` | | `camera.buttons.pan` | boolean | `true` | The arms pan. `false`: dimmed and off | | `camera.buttons.zoom` | boolean | `true` | The left corners zoom. `false`: dimmed and off | | `camera.buttons.travel` | boolean | `true` | The right corners fly forward and back, as `W` and `S`. `false`: dimmed and off | | `camera.buttons.reset` | boolean | `true` | The centre flies back to the start view. `false`: dimmed and off | | `camera.buttons.scale` | boolean | `true` | The model size button, shown while a model is at its real size. `false` hides it | | `camera.buttons.time` | boolean / string | `true` | The time slider. `speed`: the motion's speed. `date`: the scene clock's rate. `both`: either, with a switch. `true`: both on a card with a `clock`, else speed. `false` hides it | | `camera.buttons.hide` | string | `idle` | `idle`: fade out after three seconds without input. `never`: always shown. `toggle`: a small button folds them away and back | ## camera.limits **Where drag and zoom stop: how low and high the camera may tilt, how near and far it may go, and where the point it looks at may wander.** - A tilt range of one value (`[90, 90]`) locks the tilt, and a one-finger drag then pans, as on a map. - The point the camera looks at stays inside a sphere 1.5 times the size of the scene, so panning cannot lose it. Set your own sphere (`radius`, optional `center`) or box (`x`, `y`, `z` ranges; an axis left out is free), or `false` for none. - Limits are in scene units, also while the camera is inside a [star system](./scale#star-systems). ```yaml live type: custom:lcards-astrometrics-card height: 300 camera: # a flat map: straight down, panning stays over the grid limits: tilt: [90, 90] distance: [80, 400] target: x: [-100, 100] z: [-100, 100] views: map: target: [0, 0, 0] tilt: 90 distance: 260 objects: - type: grid shape: plane size: 200 line_spacing: 20 color: var(--lcars-blue) ``` | Key | Type | Default | Description | |---|---|---|---| | `camera.limits.tilt` | `[min, max]` | `[-90, 90]` | Lowest and highest tilt, degrees | | `camera.limits.distance` | `[min, max]` | `[1, 100000]` | Nearest and farthest distance, scene units. A scene at true scale widens it: down to half its smallest object, out to 20 times its size | | `camera.limits.yaw` | `[min, max]` | no limit | Yaw range, degrees | | `camera.limits.target` | object / `false` | a sphere 1.5 times the scene | Where the point the camera looks at may go. `false`: anywhere | | `camera.limits.target.radius` | number | - | A sphere this big, scene units | | `camera.limits.target.center` | `[x, y, z]` | the scene's centre | The sphere's centre | | `camera.limits.target.x` | `[min, max]` | free | A box: its x range. Also `y` and `z` | ## Flying and turning **How long a fly-to takes, how it eases, whether the stars streak on the way, and a camera that turns on its own.** - A fly-to over a long zoom moves evenly in log distance, so each factor of ten takes the same time ([Scale](./scale#one-scene-in-real-units)). - `camera.warp` streaks the stars and dust on every fly-to; a view's own `warp` wins. The card's `warp` key is different: it holds the scene at warp ([Effects: going to warp](./effects#going-to-warp)). - `auto_rotate` pauses while you drag. Under reduced motion it stops, and a fly-to jumps instead of flying, without streaks. ```yaml live type: custom:lcards-astrometrics-card height: 320 camera: auto_rotate: 4 fly_duration: 2500 ease: outQuad warp: true views: v: target: [0, 0, 0] yaw: 20 tilt: 30 distance: 200 backdrop: stars: count: 2500 points: - id: core xyz: [0, 0, 0] label: CORE style: major - id: outpost polar: [70, 120] marker: diamond label: TAP TO FLY objects: - type: grid shape: disc radius: 90 pattern: polar line_spacing: 15 spoke_count: 24 - type: glow at: core size: 40 ``` | Key | Type | Default | Description | |---|---|---|---| | `camera.fly_duration` | number | `1600` | How long a fly-to takes, ms | | `camera.ease` | string | `inOutCubic` | The fly-to's easing: an anime.js easing name such as `inOutCubic`, `outQuad` or `linear` | | `camera.warp` | boolean / object | `false` | Every fly-to streaks the stars and dust. Or `entity` (and `attribute`): fly-tos streak while it is on (`on`, `true` or a number above 0) | | `camera.auto_rotate` | number | `0` | Turn round the target, degrees per second; negative turns the other way. `0` is off | --- # Live Data Points take their text, colour and even their position from Home Assistant, and rules change points and objects as entities change. None of it rebuilds the scene: a label or a colour changes in place, a point moves on the next frame. ## A point's entity **`entity` on a point is that point's own entity: its label templates read it, its colour maps follow its state, and its actions act on it.** Use it for a point that stands for a device: a light, a switch, a phone. - Label [templates](#templates) read it as `entity` (`{entity.state}`, `{entity.attributes.friendly_name}`). - Colour [state maps](/core/colours) on the point and its text fields follow its state, with the card's `state_classification`. - `more-info` and `toggle` actions without an `entity` act on it, and a [position](#positions-from-entities) can come from its attributes. ```yaml live controls type: custom:lcards-astrometrics-card height: 280 camera: views: top: target: [0, 0, 0] tilt: 70 distance: 120 points: - id: lamp entity: switch.demo_switch xyz: [-20, 0, 0] marker: square style: major # follows the switch: tap to toggle it color: active: var(--lcars-orange) inactive: var(--lcars-blue) text: label: content: "{entity.attributes.friendly_name}" state: content: "{entity.state}" position: bottom-right font_size: 11 tap_action: action: toggle objects: - type: grid shape: plane size: 100 line_spacing: 10 ``` | Key | Type | Default | Description | |---|---|---|---| | `entity` | string | - | The point's entity: templates read it, state colour maps follow it, `more-info` and `toggle` act on it, positions can come from it | | `color` | colour / state map | by style | The point's colour, a state map by this entity: see [Markers](./points#markers) | ## Positions from entities **`xyz`, `polar`, `latlon` and `altaz` take numbers, or `entity` to read them from an entity's attributes: a phone on a globe, the sun on a sky dome.** The point moves when they change, and paths, rings and beams that use it follow. - The entity defaults to the point's own `entity`. - Each form reads attributes by default names: `latitude` and `longitude` (a person, a device tracker, a zone), `azimuth` and `elevation` (`sun.sun`), `x`, `y` and `z`, or `distance` and `bearing`. Change them with the form's own keys; `state` as a name reads the entity's state. - A point is hidden while one of its numbers is missing or not a number. ```yaml live type: custom:lcards-astrometrics-card height: 320 camera: views: v: target: [0, 10, 0] yaw: 160 tilt: 20 distance: 190 points: # the sun from sun.sun's azimuth and elevation, on the dome - id: sun altaz: entity: sun.sun object: sky marker: dot color: var(--lcars-yellow) label: SOL # home from zone.home's latitude and longitude, on the globe - id: home latlon: entity: zone.home object: earth marker: reticle label: HOME objects: - type: grid id: sky shape: dome radius: 80 line_spacing_deg: 15 - type: sphere id: earth at: [0, 20, 0] radius: 15 image: builtin:earth_blue_marble ``` ::: details More about positions from entities - **A probe from a sensor's attributes:** a point with `entity: sensor.probe_track` and `polar: { attributes: [range, heading] }` reads its distance from the sensor's `range` attribute and its bearing from `heading`. ::: | Key | Type | Default | Description | |---|---|---|---| | `latlon.entity` | string | the point's `entity` | The entity to read: a person, a device tracker, a zone | | `latlon.latitude` | string | `latitude` | The attribute holding the latitude | | `latlon.longitude` | string | `longitude` | The attribute holding the longitude | | `altaz.entity` | string | the point's `entity` | The entity to read, such as `sun.sun` | | `altaz.azimuth` | string | `azimuth` | The attribute holding the azimuth | | `altaz.altitude` | string | `elevation` | The attribute holding the altitude | | `xyz.entity` | string | the point's `entity` | The entity to read | | `xyz.attributes` | list | `[x, y, z]` | The three attributes holding x, y and z | | `polar.entity` | string | the point's `entity` | The entity to read | | `polar.attributes` | list | `[distance, bearing]` | The two attributes holding the distance and the bearing | ## Templates **Label `content` takes the four [template types](/core/templates/) as on every card: `{entity.state}` tokens, `[[[ JavaScript ]]]`, `{{ Jinja2 }}` (evaluated by Home Assistant) and `{ds:name}` [data sources](/core/datasources/).** Besides `entity`, `states`, `config`, `variables` and `theme`, label templates can read the sun and moon (`sky`) and the point's own config (`point`). - A template is evaluated again only when something it reads changes: its entities, a data source, or the sky. - The sky values update every minute, and work in all four types: `{sky.moon.illumination}`, `[[[ return Math.round(sky.sun.altitude) ]]]`, `{{ sky.moon.illumination }}`. - The angles have one decimal; for whole degrees, round in JavaScript: `[[[ return 'SOL ' + Math.round(sky.sun.altitude) + '°' ]]]`. ```yaml live type: custom:lcards-astrometrics-card height: 300 camera: views: sky: target: [0, 20, 0] yaw: 180 tilt: 20 distance: 190 points: - id: sun sky: sun object: dome marker: dot label: "SOL {sky.sun.altitude}°" color: var(--lcars-yellow) - id: moon sky: moon object: dome marker: moon_phase label: "LUNA {sky.moon.illumination}%" objects: - type: grid id: dome shape: dome radius: 80 line_spacing_deg: 15 ``` ::: details More about templates - **JavaScript templates** may read any state, so they run again on every change the card tracks. - **Template off:** `template: false` on a field shows its `content` as written. ::: | Name | Type | What it is | |---|---|---| | `sky.sun.azimuth` | number | The sun now, degrees to one decimal (from `sun.sun` when it exists) | | `sky.sun.altitude` | number | The sun's height above the horizon, degrees to one decimal | | `sky.moon.azimuth` | number | The moon now, degrees to one decimal (computed from the time and your location) | | `sky.moon.altitude` | number | The moon's height above the horizon, degrees to one decimal | | `sky.moon.illumination` | number | How much of the moon is lit, whole percent | | `sky.moon.waxing` | boolean | `true` while it grows | | `point` | object | The point's own config (`{point.id}`) | ## Settings from entities **Any number on a point or object can follow an entity instead of holding still: a shield bubble's opacity follows the shields, a glow's size follows the power.** Write the key as `entity` with an `input` range and an `output` range, the same words as `map_range` in [animations](/core/animations) and the rules' `map_range_cond`. - A light's brightness: `attribute: brightness_pct` gives 0 to 100 % (0 while it is off), as in the other cards; `brightness` is 0 to 255. - A light, a switch or a player followed by its state (no `attribute`) reads as the high end of `input` while it is active (on, playing, home) and the low end while it is not, so it opens or closes a setting fully; follow `brightness` for the steps in between, or give each state its own value ([Settings by state](#settings-by-state)). - A value outside `input` stays at the end of `output`, unless `clamp: false`. No value (unavailable, not a number, a light's brightness while it is off) gives `default`, else the key's own default. - Templates work too: `spin: "[[[ return states['input_number.lcards_test_power'].state / 10 ]]]"`, or `{{ }}` and `{entity.state}`. - An object's `opacity`, `radius`, `size` and `spin` ease to their new value without rebuilding anything; most other keys rebuild that one object or point, at most four times a second, and step. ```yaml live controls type: custom:lcards-astrometrics-card height: 300 camera: views: v: target: [0, 0, 0] yaw: 20 tilt: 20 distance: 160 objects: - type: sphere id: shields at: [-35, 0, 0] radius: 30 fill: color: var(--lcars-blue) # shields 0 to 100 % gives an opacity of 0 to 0.6 opacity: entity: input_number.lcards_test_shields output: [0, 0.6] - type: glow id: core at: [40, 0, 0] color: var(--lcars-orange) # power 0 to 100 % gives a glow 10 to 60 across, easing over 1 s; # 10 while the helper is unavailable size: entity: input_number.lcards_test_power input: [0, 100] output: [10, 60] default: 10 smooth: 1000 ``` ::: details More about settings from entities - **What else changes in place:** some types take more keys of their own that ease without a rebuild: a belt's `radius` (each side too), `thickness` and `count` (the band widens or thins round the same rocks); a comet's `nucleus.size`, `coma.size`, `tail.length` and `glow`; a nebula's `drift` (each side too: the clouds speed up or slow down from where they are) and `density`; a crystalline entity's `glow` and `opacity`. A colour of any object crossfades to its new value (see [Colours from entities](#colours-from-entities)). Any other key (a deformation's `amplitude`, a galaxy's `arms.count`, a point's `alt`) rebuilds that one object or point. - **A bound belt `count`** builds for the top of its `output` and draws fewer, so keep `output` no higher than you need. - **Pairs:** a setting that takes `[a, b]` (a belt's `[inner, outer]` radius and `[smallest, largest]` rock size, a grid's or image's `[w, d]` size, a ring's ellipse, a nebula's drift) can have either side follow an entity of its own: `radius: [{ entity: input_number.lcards_test_shields, output: [40, 70] }, 90]`. A whole `radius` bound to one entity gives one number (for a belt, the outer edge with the inner at 0.8 of it) and scales in place; a bound side rebuilds the object, except a belt's radius and a nebula's drift, which ease. In the Astrometrics Studio each box of a pair has its own link button. - **Whole numbers:** how-many settings (a belt's `count`, a galaxy's `arms.count` and `stars.count`, a nebula's `count`, a lightning object's `branches`, a wobble's `lobes`, a polar grid's `spoke_count`, `num_octaves`, `major.row_interval` and `major.col_interval`) take the mapped value rounded, so `count: { entity: input_number.lcards_test_power, output: [100, 500] }` gives 233 rocks at 33.3 %, and the object rebuilds only when the whole number changes. - **Not bound:** lists of three (`[x, y, z]`, `rotation`) do not follow entities, and a `seed` takes only a plain number (a new pattern would rebuild the object). - **On the card:** `time_scale`, `warp_factor`, `clock.rate` and `clock.date` follow entities the same way (`clock: { date: { entity: input_datetime.lcards_test_date } }` shows the planets on the date in a helper). Positions follow entities their own way: see [Positions from entities](#positions-from-entities). ::: | Key | Type | Default | Description | |---|---|---|---| | `entity` | string | required | The entity to follow | | `attribute` | string | - | Read this attribute instead of the state. `brightness_pct` reads a light's brightness as 0 to 100 % (0 while off; `brightness` itself is 0 to 255). Without one (and without [state keys](#settings-by-state)), an active entity (on, playing, home) reads as the high end of `input` and an inactive one as the low end | | `input` | `[low, high]` | the entity's `min` and `max`, else `[0, 100]` | The range of the entity's value. `min` and `max` are an `input_number`'s attributes | | `output` | `[low, high]` | - | The range of the setting the input maps to. Left out: the entity's number as it is | | `clamp` | boolean | `true` | `false`: a value outside `input` carries on past the ends of `output` | | `default` | number | the key's own default | The setting's value when no [state key](#settings-by-state) matches and the entity has no number: unavailable, or a light that is off (it has no `brightness`) | | `smooth` | number | `600` | How long a change eases, ms, for a key that changes in place. `0` steps | ### Settings by state **A number can take a value per state instead of a range: a glow wide while a player is playing, a shield bubble clear while the doors are open.** The keys are the [state colour](/core/colours) words, each with a number: `active`, `inactive`, `unavailable`, `zero`, `non_zero`, ranges (`above:80`, `below:20`, `between:20:80`) and any state of the entity (`playing`, `home`, `heat`). - The first key that matches wins, in the order the state colours use: the exact state (or the `attribute`'s value), `zero`, a range (`above`, `at_least`, `below`, `at_most`, `between`, `between_exclusive`; the narrowest wins), `non_zero`, then `active`, `inactive` or `unavailable`. - No key matching, a number is still mapped by `input` and `output` when the binding has them; else `default` applies. - The value eases like any other: `smooth` works the same way. ```yaml live controls type: custom:lcards-astrometrics-card height: 300 camera: views: v: target: [0, 0, 0] yaw: 20 tilt: 20 distance: 160 objects: - type: sphere id: bubble at: [-35, 0, 0] radius: 30 fill: color: var(--lcars-blue) # the toggle on: a clear bubble; off: a solid one opacity: entity: input_boolean.lcards_test_toggle active: 0.15 inactive: 0.6 - type: glow id: beacon at: [40, 0, 0] color: var(--lcars-orange) # a size per mode, 5 for any other state size: entity: input_select.lcards_test_mode alpha: 15 beta: 35 gamma: 60 default: 5 smooth: 800 ``` ::: details More about settings by state - **Active and inactive** follow the card's state classification, the same as the state colours: on, open, playing, home, heat and the other running states are active, anything else is inactive, and unavailable or unknown is `unavailable`. A card's `state_classification` changes them. - **With an attribute,** exact keys and ranges match the attribute's value (`attribute: brightness` with `below:50: 1`). - **In the Astrometrics Studio,** the panel of a number that follows an entity switches between **Range** (entity low and high, the setting's values there) and **By state**: the state list the other cards use for state colours, with a number per state (quick-add Default, Active, Inactive, Unavailable, Zero and Non zero, type any state of the entity, or add a range condition). Switching drops the other way's keys. A colour that follows an entity uses the same list with a colour per state. For a light the attribute list offers `brightness_pct`. - **Misspelt words** read as states: the checker warns about a key close to one of the binding words (`smoth: 800`). - **`on` and `off` as keys** need quotes (`"on": 1`): Home Assistant's YAML editor reads them bare as true and false. `active` and `inactive` cover them without quotes, and more states besides. ::: | Key | Type | Default | Description | |---|---|---|---| | `active` | number | - | The value while the entity is active (on, playing, home, open) | | `inactive` | number | - | The value while the entity is inactive (off, idle, not_home, closed) | | `unavailable` | number | - | The value while the entity is unavailable or unknown | | `zero` | number | - | The value when the entity's value is the number 0 | | `non_zero` | number | - | The value when the entity's value is any other number | | `above:N`, `at_least:N`, `below:N`, `at_most:N`, `between:A:B`, `between_exclusive:A:B` | number | - | The value when the entity's value is in that range | | `` | number | - | The value in that state (`playing`, `home`, `heat`) | | `default` | number | the key's own default | The value when nothing else gives one | ### Colours from entities **Any colour on an object can follow an entity or a template too: its `color`, a part's `color` (such as `edges.color` or `core.color`), each colour in a `colors` list, and the colours of a `fill.effect`.** Write it as a [state map](/core/colours) with the entity it reads, using the same state words as the other cards. - With no key matching, a value that is itself a colour is used, so `color: { entity: light.desk, attribute: rgb_color }` follows a light's colour. - A colour change crossfades that object to the new colour in place over a moment, with no rebuild: its motion carries on. - A point's colour already follows the point's own entity: see [A point's entity](#a-point-s-entity). ```yaml live controls type: custom:lcards-astrometrics-card height: 320 camera: views: v: target: [0, 0, 0] yaw: 20 tilt: 35 distance: 220 objects: - type: grid id: deck shape: plane size: 120 # the lines turn orange while the toggle is on color: entity: input_boolean.lcards_test_toggle active: var(--lcars-orange) inactive: var(--lcars-gray) # the frame turns red above 80 % power edges: color: entity: input_number.lcards_test_power "above:80": var(--lcars-red) default: var(--lcars-blue) - type: nebula id: cloud at: [0, 25, 0] radius: 50 # two clouds placed by hand take the colours in order: # the first stays blue, the second follows the mode clouds: - xyz: [-28, 0, 0] radius: 24 - xyz: [28, 0, 0] radius: 24 colors: - var(--lcars-blue) - entity: input_select.lcards_test_mode alpha: var(--lcars-violet) beta: var(--lcars-orange) default: var(--lcars-red) ``` ::: details More about colours from entities - **Templates:** `color: "[[[ return states['input_boolean.lcards_test_toggle'].state === 'on' ? 'var(--lcars-red)' : 'var(--lcars-blue)' ]]]"`, or `{{ }}`. The result is a colour (`[r, g, b]` works too). - **Nothing matching**, and no `default`: the colour the key has when it is left out. - **How often:** a colour change crossfades at most four times a second; under reduced motion it changes at once. A model, whose look comes from its file, is built again instead. ::: | Key | Type | Default | Description | |---|---|---|---| | `entity` | string | required | The entity to follow | | `attribute` | string | - | Match this attribute's value instead of the state | | `` | colour | - | The colour for that exact state or attribute value (`heat`, `alpha`) | | `active` | colour | - | The colour while the entity is on, with the card's `state_classification` | | `inactive` | colour | - | The colour while the entity is off | | `unavailable` | colour | - | The colour while the entity is unavailable or unknown | | `zero` | colour | - | The colour when the value is the number 0 | | `non_zero` | colour | - | The colour when the value is any other number | | `above:N` | colour | - | The colour when the value is above N | | `below:N` | colour | - | The colour when the value is below N | | `between:A:B` | colour | - | The colour when the value is between A and B | | `default` | colour | - | The colour when nothing else matches | ### A guided tour **`camera.view` can follow an entity: the camera flies to `views[n]` when the entity's value is `n` (counting from 0), or to the view an `input_select`'s option names.** Step the number from an automation, a script or buttons (`input_number.increment`), and the card flies from stop to stop. - A number is rounded and held to the list, so a value past the last stop stays on the last. - A stop can set the [scene clock](./scale#the-scene-clock) too: `view`, with `date` and `rate`. - Leave `views` out when the entity's state is the view's name. ```yaml live controls type: custom:lcards-astrometrics-card height: 320 camera: view: entity: input_number.lcards_test_stage views: - wide - planet - moon views: wide: target: [0, 0, 0] yaw: 20 tilt: 35 distance: 170 planet: target: planet yaw: 40 tilt: 20 distance: 60 moon: target: moon yaw: 200 tilt: 15 distance: 25 points: # each tap sets the stage, and the camera follows it - id: home xyz: [-50, 0, 0] marker: diamond label: STAGE 0 (TAP) tap_action: action: perform-action perform_action: input_number.set_value target: entity_id: input_number.lcards_test_stage data: value: 0 - id: planet xyz: [20, 0, 0] label: STAGE 1 (TAP) tap_action: action: perform-action perform_action: input_number.set_value target: entity_id: input_number.lcards_test_stage data: value: 1 - id: moon xyz: [45, 4, 10] label: STAGE 2 (TAP) tap_action: action: perform-action perform_action: input_number.set_value target: entity_id: input_number.lcards_test_stage data: value: 2 objects: - type: sphere at: planet radius: 12 fill: effect: preset: gas_giant - type: sphere at: moon radius: 3 color: var(--lcars-gray) - type: grid shape: disc radius: 70 pattern: polar line_spacing: 10 spoke_count: 12 opacity: 0.4 ``` | Key | Type | Default | Description | |---|---|---|---| | `camera.view.entity` | string | required | The entity whose value picks the view | | `camera.view.attribute` | string | - | Read this attribute instead of the state | | `camera.view.views` | list | - | The stops in order: a view name, or `view` with `date` and `rate` | | `camera.view.views[].view` | string | required | The named view to fly to | | `camera.view.views[].date` | string | - | Set the scene date there: `now` or an ISO date | | `camera.view.views[].rate` | number / string | - | Set the date's rate there: `live`, days per second, or with a unit (`1 h/s`, `30 d/s`, `1 y/s`) | ## Rules **Points and objects with an `id` are [rule](/core/rules/) targets, as MSD overlays are: a rule's `apply.overlays` patches them with their own keys.** Use it to recolour, relabel, hide or move points and objects while an entity is in some state. - When the rule stops matching, the point or object goes back to its config. - A patched point label is rebuilt on its own; the rest of the scene stays. An object whose patch changes only colours crossfades in place, and other keys build that object again, nothing else. - Ids are page-wide: two cards with a point `sol` both match a rule on `sol`. Use distinct ids, or tags, when a dashboard has several astrometrics or MSD cards. ```yaml live controls type: custom:lcards-astrometrics-card height: 300 camera: views: top: target: [0, 0, 0] tilt: 70 distance: 130 labels: styles: hostile: font_size: 16 font_weight: bold color: var(--lcars-alert-red) points: # tap to toggle the alert - id: alert_switch xyz: [-35, 0, 25] marker: square label: RED ALERT (TAP) tap_action: action: toggle entity: input_boolean.lcards_test_toggle - id: warbird xyz: [20, 0, -10] marker: triangle label: CONTACT - id: escort xyz: [-10, 0, -20] marker: dot tags: - patrol label: ESCORT objects: - type: ring id: neutral_zone radius: 45 color: var(--lcars-blue) rules: - id: red_alert_contacts when: entity: input_boolean.lcards_test_toggle state: "on" apply: overlays: # a point warbird: style: hostile label: HOSTILE CONTACT # every point or object tagged patrol "tag:patrol": color: var(--lcars-alert-red) # an object neutral_zone: visible: false ``` ::: details More about rules - **Selectors:** an id, `tag:` (points and objects take `tags`), `type:astrometrics-point` or `type:astrometrics-object`, `pattern:`, `all`. - **Point keys a rule can patch:** `label`, `text`, `style`, `color`, `marker`, `priority`, `overlap`, `visible`, `opacity`, the distance keys (`fade`, `min_distance`, `max_distance`), `tap_action`, `card` and the placement forms (a rule can move a point). - **Object keys:** any of their keys. `visible` and the distance keys change it without a rebuild. - **MSD-style patches:** `style: { color: var(--lcars-red) }` patches the colour. A plain string `style` is the label style. ::: | Key | Type | Default | Description | |---|---|---|---| | `rules` | list | - | The card's [rules](/core/rules/) | | `apply.overlays` | object | - | Patches by selector: a point or object id, `tag:`, `type:astrometrics-point`, `type:astrometrics-object`, `pattern:` or `all` | | `tags` | list | - | On a point or object: names for `tag:` selectors | ## Fly-to from other cards and automations **Give the astrometrics card an `id`, then any LCARdS card can fly its camera with a `fly-to` action naming it in `card`, with a `view` or a `point`.** From an automation, the [`lcards.fly_to`](/configuration/ha-actions#lcards-fly-to) action does the same on every open dashboard (or only the devices and users you target). - The camera of every open card with that id flies, in the same browser. - The two examples below work together: the button flies the camera of the card above it. ```yaml live # the card to fly: its id is galaxy type: custom:lcards-astrometrics-card id: galaxy height: 280 camera: views: wide: target: [0, 0, 0] yaw: 20 tilt: 40 distance: 170 backdrop: stars: count: 2000 points: - id: earth polar: [45, 120] marker: dot label: EARTH objects: - type: grid shape: disc radius: 70 pattern: polar line_spacing: 10 spoke_count: 12 ``` ```yaml live type: custom:lcards-button preset: lozenge text: name: content: EARTH show: true style: card: color: background: default: var(--lcars-orange) tap_action: action: fly-to card: galaxy # the astrometrics card's id point: earth # or view: duration: 2500 # optional, ms warp: true # optional: streak the stars on the way (false: never) ``` ::: details More about flying from outside - **Browser console:** `window.lcards.cards.astrometrics` has `getAll()`, `get(id)` and `flyTo(id, view or { point }, { duration, warp })`. - **The scene date:** `set-clock` takes `card` the same way: see [Scene actions](./points#scene-actions). ::: | Key | Type | Default | Description | |---|---|---|---| | `id` | string | - | On the astrometrics card: the name other cards and automations use | | `card` | string | required | On the action: the astrometrics card's `id` | | `point` | string | - | A point id to fly to. Wins over `view` | | `view` | string | - | A named view (`camera.views`) to fly to | | `duration` | number | `camera.fly_duration` | How long the flight takes, ms | | `warp` | boolean | the view's `warp`, else `camera.warp` | `true` streaks the stars on the way, `false` never | --- # Effects The [background animation](/core/effects/background-animations) presets, rebuilt as parts of the 3D scene: they sit in space and move with the camera instead of being a flat layer behind it. Every effect is still unless you give it a speed, so a scene with nothing moving draws nothing; under reduced motion (the system setting) they all hold still. ## Nebula **`type: nebula` puts clouds of gas in the scene, in the look of the [nebula](/core/effects/background-animations/preset-reference#nebula) preset with `volumetric: true`.** Use it for a nebula on a star map, a gas cloud round a station, or a storm to fly into. - Each cloud is a few soft puffs facing the camera at slightly different depths, so as you turn the camera the clouds shift against each other and against the grids. - A cloud fades as you fly into it, and a planet hides the clouds behind it. - Every key of the object is in the [nebula](./objects/space#nebula) table; the sections below show what the volume, shapes, dust and presets do. ```yaml live type: custom:lcards-astrometrics-card height: 340 camera: views: v: target: [0, 0, 0] yaw: 20 tilt: 25 distance: 300 backdrop: stars: count: 2000 objects: - type: grid shape: disc radius: 100 pattern: polar line_spacing: 10 spoke_count: 36 - type: nebula size: [220, 50, 220] count: 8 seed: 5 drift: 3 colors: [var(--lcars-violet), var(--lcars-blue), var(--lcars-red)] ``` ::: details More about nebulae - **Never tappable:** clouds never catch a tap, so they never get in the way of points behind them. A label for a cloud is a [point](./points) at the same place. - **The seed:** `count` clouds are placed by `seed` inside the region; the same seed always places the same clouds, and picks each cloud's colour from `colors`. - **Entities:** `drift` (and with `render: volume`, `density`) can [follow an entity](./data#settings-from-entities); it eases to each new value. ::: | Key | Type | Default | Description | |---|---|---|---| | `radius` | number | `100` | The clouds fill a ball this big round `at`, scene units | | `size` | number / `[w, h, d]` | - | Or a box, scene units (one number for a cube). Wins over `radius` | | `count` | number | `4` | How many clouds the seed places, 1 to 10 | | `seed` | number | `1` | The same seed always places the same clouds | | `colors` | colour / list | `var(--lcars-violet)` | One colour, or a list the seed picks from per cloud | | `drift` | number / `[x, y]` | `0` | How fast the gas churns, scene units per second. `[x, y]` gives a direction. `0` is still | | [Nebula keys](./objects/space#nebula) | | | `clouds`, `color`, `min_radius`, `max_radius`, `brightness`, `turbulence`, `noise_scale`, `blend` and the rest | ### Gas you can fly into **`render: volume` draws the same clouds (the same seed, colours and brightness) as one body of gas filling the region, instead of puffs.** Fly into it and there is gas all round you, which puffs facing the camera cannot give. - The gas fades out toward the edges of the region, so its box or ball never shows. - A planet, model or other solid object inside the gas hides the gas behind it, and the gas in front of it still shows. - `turbulence` erodes the clouds into wisps and holes (0 gives smooth blobs), and `density` makes the gas thicker or thinner. ```yaml live type: custom:lcards-astrometrics-card height: 340 camera: view: outside views: outside: target: [0, 0, 0] yaw: 20 tilt: 20 distance: 300 inside: target: [40, 0, 10] yaw: 200 tilt: 6 distance: 30 backdrop: stars: count: 2000 points: # tap the labels to fly in and out - id: fly_in xyz: [40, 0, 10] label: FLY INSIDE tap_action: action: fly-to view: inside - id: fly_out xyz: [-90, 0, 0] label: BACK OUT tap_action: action: fly-to view: outside objects: - type: grid shape: disc radius: 100 pattern: polar line_spacing: 10 spoke_count: 36 - type: sphere at: [30, 0, -20] radius: 14 fill: color: var(--lcars-orange) - type: nebula render: volume size: [220, 60, 220] count: 7 seed: 5 drift: 2 colors: [var(--lcars-violet), var(--lcars-blue)] ``` ::: details More about volume gas - **Bigger clouds:** with `render: volume`, the clouds' default sizes are 0.25 and 0.55 of the region (`min_radius`, `max_radius`), so the gas fills it. - **Resolution:** a volume is drawn at half the screen's resolution, which soft gas does not show. - **Volume only:** `shape`, `dust`, `density` and `lightning` work only with `render: volume`. ::: | Key | Type | Default | Description | |---|---|---|---| | `render` | string | `puffs` | `puffs`: soft puffs facing the camera. `volume`: one body of gas you can fly into | | `density` | number | `1` | `render: volume`: how thick the gas is (`2` is twice as thick) | | `turbulence` | number | `0.5` | How ragged the edges are, `0` to `1` | ### Shapes, dust and colour **With `render: volume`, `shape` gives the gas a form, after the real nebulae: a hollow shell, an hourglass, long filaments, a cavity.** The clouds still give the clumps and the colours inside the form, so `count`, `seed` and `colors` keep working; turn the form with `rotation`. - `stretch` draws each seeded cloud out (0 round to 1 long and flat), each turned its own way. The same seed with or without `stretch` places the same clouds. - `core.color` colours the gas deep inside a cloud (in a shape: near its middle), running out to the cloud colours at the edges, as in the Hubble pictures. - Dust is dark gas that hides the gas behind it: see [Dust lanes](#dust-lanes). ```yaml live type: custom:lcards-astrometrics-card height: 360 camera: views: v: target: [0, 0, 0] yaw: 0 tilt: 10 distance: 420 backdrop: stars: count: 2000 objects: # the Ring nebula - type: nebula render: volume shape: shell at: [-150, 60, 0] radius: 55 count: 8 colors: [var(--lcars-ice), var(--lcars-violet)] # the Butterfly - type: nebula render: volume shape: bipolar at: [-50, 60, 0] radius: 55 count: 8 colors: [var(--lcars-orange), var(--lcars-red)] core: color: var(--lcards-moonlight) # the Veil - type: nebula render: volume shape: filaments at: [50, 60, 0] radius: 55 count: 8 stretch: 0.5 colors: [var(--lcars-red), var(--lcars-ice)] # a blister, as in Orion - type: nebula render: volume shape: cavity at: [150, 60, 0] radius: 55 count: 8 colors: [var(--lcars-red), var(--lcars-orange)] core: color: var(--lcars-ice) # stretched clouds with dust across them - type: nebula render: volume at: [0, -70, 0] size: [300, 60, 80] count: 8 stretch: 0.7 dust: count: 3 colors: [var(--lcars-violet), var(--lcars-blue)] core: color: var(--lcars-ice) ``` ::: details More about the shapes - **`clouds`** (the default): the clouds themselves. - **`shell`:** a thin hollow sphere, a ring with a dark middle from any side (the Ring nebula). - **`bipolar`:** an hourglass along the object's y axis, two hollow lobes joined at a narrow waist, the gas streaked outward (the Butterfly, the Hourglass). - **`filaments`:** long thin strands running along the object's x axis (the Veil). - **`cavity`:** a thick cup round a hollow that opens on the object's +z side: a bright bowl seen from there, a crescent from the side (a blister, as in Orion). - **`layers`:** a floor and a ceiling of gas across a box with a gap between: see [the Badlands](#the-badlands-layers-columns-and-lightning). - **`wake`:** a bright ribbon waving along the object's x axis and a sheet of gas trailing it: see [the Nexus](#the-nexus-a-ribbon-and-its-wake). - **`whirlpool`:** a flat disc of gas wound into spiral arms round the object's y axis: see [Whirlpools](#whirlpools-a-wormhole-s-mouth). - **Hand-placed clouds** take `size` and `rotation` instead of `stretch`: see [Dust lanes](#dust-lanes). ::: | Key | Type | Default | Description | |---|---|---|---| | `shape` | string | `clouds` | `render: volume`: the form of the gas: `clouds`, `shell`, `bipolar`, `filaments`, `cavity`, `layers`, `wake` or `whirlpool` | | `stretch` | number | `0` | How drawn out each seeded cloud is, `0` (round) to `1` (long and flat) | | `core.color` | colour | - | A colour deep in the gas, running out to the cloud colours at the edges. Left out: the cloud colours throughout | ### Dust lanes **Dust is dark gas in a volume nebula that hides the gas behind it: lay a few dark clouds across the gas with `dust.count`, or place one by hand with `dust: true`.** A lane placed by hand through a bright cloud reads most clearly. - With `blend: add` (the default) the dust darkens only this nebula's own gas, so the stars behind still show through; with `blend: normal` it hides what is behind the nebula too. - Dust clouds the seed lays have a seed of their own, so adding dust moves no gas cloud. - `clouds` places clouds by hand, instead of `count` and the seed: up to 10 gas clouds and 4 dust clouds. ```yaml live type: custom:lcards-astrometrics-card height: 300 camera: views: v: target: [0, 0, 0] yaw: 0 tilt: 0 distance: 400 backdrop: stars: count: 2000 objects: - type: nebula render: volume radius: 130 colors: [var(--lcars-orange)] clouds: # a bright cloud - xyz: [0, 0, 0] radius: 100 opacity: 0.9 # a long dark lane across it - xyz: [0, 0, 40] size: [200, 20, 30] rotation: [0, 0, 20] dust: true ``` | Key | Type | Default | Description | |---|---|---|---| | `dust.count` | number | `0` | Dark dust clouds the seed lays across the gas clouds, 0 to 4 | | `dust.amount` | number | `0.8` | How dark the dust is, `0` to `1` | | `dust.color` | colour | black | The dust's colour | | `clouds` | list | - | Clouds placed by hand, instead of `count` and the seed | | `clouds[].xyz` | `[x, y, z]` | `[0, 0, 0]` | Where the cloud sits, scene units from the object | | `clouds[].radius` | number | halfway between `min_radius` and `max_radius` | Cloud radius, scene units | | `clouds[].size` | `[w, h, d]` | - | Or an ellipsoid, scene units. Replaces `radius` | | `clouds[].rotation` | `[x, y, z]` | - | Turns the ellipsoid, degrees, as an object's `rotation` | | `clouds[].color` | colour | the next of `colors` | This cloud's colour. Without it, the clouds take `colors` in order | | `clouds[].opacity` | number | the middle of `brightness` | Opacity, `0` to `1` | | `clouds[].dust` | boolean | `false` | `render: volume`: a dark dust cloud (`dust.amount`, `dust.color`) instead of glowing gas | ### The Badlands: layers, columns and lightning **The Badlands, the plasma storms of Deep Space Nine and Voyager, start from a preset: `preset: badlands` (Deep Space Nine) or `preset: badlands_voyager` (Voyager).** Fly the camera into the gap between the sheets. - `badlands`: liquid fire in yellow, orange and red, an orange band glowing between the sheets, fire columns thick and thin. - `badlands_voyager`: peach and mauve layers, held pink lightning columns, strikes that light the gas. - Every key you set wins over the preset's; in `band`, `columns` and `lightning` key by key, so `columns: { count: 3 }` keeps the preset's kind and colour. ```yaml live type: custom:lcards-astrometrics-card height: 360 camera: views: v: target: [0, 0, 0] yaw: 30 tilt: 3 distance: 110 backdrop: stars: count: 2000 objects: - type: nebula preset: badlands ``` ```yaml live type: custom:lcards-astrometrics-card height: 360 camera: views: v: target: [0, 0, 0] yaw: 200 tilt: 3 distance: 160 backdrop: stars: count: 2000 objects: - type: nebula preset: badlands_voyager ``` ::: details More about the Badlands - **What the presets are:** both are `render: volume` with `shape: layers` in a `size: [500, 140, 500]` box (Voyager's 160 high): a floor and a ceiling of gas with their surfaces rolled into ridges, `colors` running from each sheet's surface into its depth. - **Deep Space Nine's** sets `veins: 0.8`, a narrower `gap` of `0.4`, a brighter band and eight fire columns from `1` to `3` times the usual width. - **Voyager's** sets seven lightning columns, a butter-coloured band and strikes in the gas. - **Your own box:** the preset's box is 500 across; with a `size` (or `radius`) of your own, its `drift` scales with it, so the gas churns as fast for its size. A drift you set stays as you wrote it. - **Turning parts off:** `band: false` or `lightning: false` drops that part of the preset; `true` keeps the preset's settings. - **Lightning anywhere:** `lightning` works on any volume nebula, not only `layers`, and a [lightning object](./objects/lines#lightning) striking inside any volume nebula lights its gas too. The strikes take the nebula's `seed` unless you give them one. - **Reduced motion:** the columns stand still and no strike shows. ::: | Key | Type | Default | Description | |---|---|---|---| | `preset` | string | - | `badlands`, `badlands_voyager` (or `nexus`, [below](#the-nexus-a-ribbon-and-its-wake)): a named nebula to start from | | `gap` | number | `0.56` | `shape: layers`: how much of the height is open between the sheets, `0` (they touch) to `0.9` | | `veins` | number | `0` | `shape: layers`: bright fine veins in the sheets' surfaces with darker gas between (liquid fire), `0` to `1` | | `band` | boolean / object | `false` | `shape: layers`: light glowing in the gap, brightest in a thin sheet at its middle | | `band.brightness` | number | `1` | How bright, `0` to `3` | | `band.width` | number | `0.08` | How far the glow reaches from the middle, a fraction of half the height | | `band.color` | colour | `var(--lcards-moonlight)` | The band's colour | | `columns` | object | - | `shape: layers`: columns from the floor to the ceiling: see [Columns](#columns) | | `lightning` | boolean / object | `false` | Strikes inside the gas that light it: `true`, or the [lightning object's](./objects/lines#lightning) `rate`, `flash`, `color`, `glow`, `width`, `jaggedness`, `branches`, `brightness` and `seed` | ### Columns **`columns` stands fire, vortices or held lightning from the floor to the ceiling of a `layers` nebula, spread over the region.** A field of vortices, with the funnels joined into columns, is a storm of its own. - `fire` is rising flame, wide at the foot with a splash ring on the floor; its white-hot heart takes `columns.color` and its edge the sheets' surface colour. - `vortex` is a twisting funnel, narrow at its middle (`waist`) and dark at its rim. - `lightning` is a held, crawling bolt that lights the gas round it. ```yaml live type: custom:lcards-astrometrics-card height: 360 camera: views: v: target: [0, 0, 0] yaw: 200 tilt: 4 distance: 150 backdrop: stars: count: 2000 objects: - type: nebula render: volume shape: layers size: [500, 160, 500] count: 6 seed: 8 drift: [3, 0] colors: [var(--lcars-violet-creme), var(--lcars-violet), var(--lcars-blue)] band: brightness: 0.8 color: var(--lcars-violet-creme) columns: count: 6 kind: vortex waist: 0.4 width: 1.5 color: var(--lcars-violet-creme) ``` | Key | Type | Default | Description | |---|---|---|---| | `columns.kind` | string | `fire` | `fire`, `vortex` or `lightning` | | `columns.count` | number | `4` | How many, 1 to 10, spread over the region | | `columns.width` | number / `[min, max]` | `1` | `fire` and `vortex`: how thick, times the usual. A pair gives each column its own width between them, so thick columns and thin strands stand together | | `columns.waist` | number | `0.2` | `vortex`: how wide the middle is against the ends, `0.05` (two funnels meeting at a point) to `1` (one straight column) | | `columns.speed` | number | `1` | `lightning`: how fast the bolts crawl and flicker. `0.5` is half as fast, `0` still | | `columns.color` | colour | `var(--lcards-moonlight)` | The fire's white-hot heart, the vortex, or the bolt | | `columns.glow.color` | colour | the column colour | `lightning`: the glow round the bolts | ### The Nexus: a ribbon and its wake **The Nexus, the ribbon of energy in Star Trek Generations, starts from `preset: nexus`: a white-hot ribbon waving across a long box, a wake of pink and red gas streaming out behind it, and small discharges crawling off it and lighting the gas.** - The preset is `render: volume` with `shape: wake` in a `size: [2000, 500, 500]` box: the ribbon waves along the object's x axis near the bottom of the region and the gas trails up from it, `colors` running from the ribbon out, white-hot right at it. - Every key you set wins over the preset's; in `ribbon`, `wake` and `lightning` key by key. ```yaml live type: custom:lcards-astrometrics-card height: 360 camera: views: v: target: [0, -60, 0] yaw: 8 tilt: 6 distance: 1500 backdrop: stars: count: 3000 objects: - type: nebula preset: nexus ``` ::: details More about the Nexus - **Your own box:** with a `size` (or `radius`) of your own, the ribbon's `speed` scales with its length, so the waves run as fast for its size. A speed you set stays as you wrote it. - **Discharges:** `lightning.mode: crawl` (the preset's) puts short bolts and small loops on the ribbon that flicker and jump along it, in place of strikes. It works only with `shape: wake`. - **The glow's colour** defaults to the first of `colors`. - **Reduced motion:** the ribbon holds still, and the discharges stand still and dim. ::: | Key | Type | Default | Description | |---|---|---|---| | `ribbon` | boolean / object | `true` | `shape: wake`: the bright line and the curve it follows. `false`: the gas only | | `ribbon.waves` | number | `2.5` | How many waves along it, end to end | | `ribbon.amplitude` | number | `0.2` | How far it waves, a fraction of half the region's height (a little less in depth), up to `0.5` | | `ribbon.speed` | number | `0` (the preset: `40`) | How fast the waves run along it, scene units a second; the wake streams out from it as fast. Negative runs the other way | | `ribbon.width` | number | `6` (the preset: `4`) | The line's width, px | | `ribbon.color` | colour | `var(--lcards-moonlight)` | The line's colour, and the gas right at it | | `ribbon.glow` | boolean / object | `true` | The glow round the line and in the gas near it | | `ribbon.glow.color` | colour | the first of `colors` | The glow's colour | | `ribbon.glow.width` | number | `8` | How wide the outer glow is, times the line's width | | `wake.side` | string | `up` | Which way the gas trails: `up`, or `down` (the ribbon near the top). Turn the object with `rotation` to trail it another way | | `wake.lean` | number | `0` | How far the gas leans along the ribbon as it goes out, `-1` to `1`: a fan trailing to one side, seen from afar | | `lightning.mode` | string | `strike` (the preset: `crawl`) | `crawl`: discharges crawling off the ribbon. `strike`: bolts in the gas | | `lightning.count` | number | `6` | `crawl`: how many at once, 1 to 40 | | `lightning.reach` | number | `0.35` | `crawl`: how far they stand off the ribbon, a fraction of half the height | | `lightning.speed` | number | `1` | `crawl`: how fast they flicker, reshape and jump | ### A travelling Nexus **To send the Nexus travelling, put it `at:` a moving point with `face: motion`.** Facing turns the object's +z along the travel, so `rotation: [-90, 0, 0]` turns the wake (its +y) to trail behind. ```yaml live type: custom:lcards-astrometrics-card height: 360 camera: views: v: target: [0, 0, 0] yaw: 0 tilt: 35 distance: 7000 backdrop: stars: count: 3000 points: - id: nexus polar: [2500, 0] object: track label: NEXUS objects: # the point rides this spinning ring - type: ring id: track radius: 2500 spin: 3 width: 0.5 opacity: 0.15 - type: nebula preset: nexus at: nexus size: [1500, 400, 400] face: motion rotation: [-90, 0, 0] ``` | Key | Type | Default | Description | |---|---|---|---| | [Keys every object takes](./objects#keys-every-object-takes) | | | `at`, `face` and `rotation`; see [Facing the way it goes](./objects#facing-the-way-it-goes) | ### Whirlpools: a wormhole's mouth **`shape: whirlpool` winds the gas into a flat swirling disc with spiral arms, brightest at its middle: the mouth of the Bajoran wormhole, a maelstrom, an accretion disc.** The arms are clouds of gas you can fly into, not a flat picture, and `spin` turns them. - The disc lies round the object's y axis and swells a little at its middle; `thickness` sets how thin it is. Tilt it with `rotation`. - `colors` run from the middle out (up to four), and `core.color` lights the very middle. - `arms.count` and `arms.pitch` are the [galaxy's](./objects/space#galaxy) words: how many arms, and how tightly they wind. - `radius` and `opacity` follow an entity smoothly, so a wormhole can bloom open: put a [well](./objects/surfaces#opening-and-closing) under it for the throat. ```yaml live type: custom:lcards-astrometrics-card height: 360 camera: views: v: target: [0, 0, 0] yaw: 15 tilt: 25 distance: 140 objects: - type: nebula render: volume shape: whirlpool radius: 50 arms: count: 3 pitch: 20 colors: [var(--lcards-moonlight), var(--lcars-violet), var(--lcards-blue-medium), var(--lcards-blue-dark)] core: color: var(--lcards-orange-lightest) spin: 20 ``` ::: details More about whirlpools - **The wisps follow the arms:** the gas's own noise is wound along the same spiral, so its clumps stretch into streaks round the disc. - **Dust** lies in the disc too: `dust.count` puts dark lanes among the arms. - **Cost:** a whirlpool is gas you can fly into, about as heavy as the Badlands: fine on tablets and computers. ::: | Key | Type | Default | Description | |---|---|---|---| | `shape` | string | `clouds` | `whirlpool` | | `arms.count` | number | `3` | How many spiral arms, `1` to `8` | | `arms.pitch` | number | `20` | How tightly the arms wind, degrees (`5` to `60`; smaller winds them tighter) | | `thickness` | number | `0.12` | The disc's thickness as a fraction of the radius, `0.01` to `0.5` | ## Scan bands **`scan` on a `grid`, `sphere`, `volume` or `model` sends a bright band across its lines, as the background grid's `scan_period` does.** Use it for a sensor sweep across a map, a planet being scanned, or a ship's hologram. - A sphere sweeps from pole to pole, a dome from the top to its rim, a cylinder top to bottom, and a plane runs south to north. - A polar disc rings out from its centre like a sensor ping, and a volume sweeps down its walls. - On a [model](./objects/ships#model) the band runs along its longest side, in the hologram look. ```yaml live type: custom:lcards-astrometrics-card height: 320 camera: views: v: target: [0, 10, 0] yaw: 20 tilt: 25 distance: 260 objects: # a ping ringing out from the centre - type: grid shape: disc radius: 100 pattern: polar line_spacing: 10 spoke_count: 36 scan: period: 6 color: var(--lcars-yellow) # pole to pole - type: sphere at: [-50, 25, 0] radius: 22 color: var(--lcars-blue) scan: period: 5 # down the walls - type: volume shape: sector radius: [55, 95] angle: [100, 170] height: [0, 30] color: var(--lcars-green) scan: period: 4 ``` | Key | Type | Default | Description | |---|---|---|---| | `scan.period` | number | `0` | Seconds per sweep. `0`: none. Stops under reduced motion | | `scan.color` | colour | `var(--lcards-moonlight)` | The band's colour | ## Moving dashes and pulses **A dashed line can move its dashes along it, and any line can send bright pulses along it, as the [flow](/core/effects/background-animations/preset-reference#flow) preset's streaks do.** Use it for traffic on a route, power along a conduit, or a ring that turns. - `dash` with `pattern` and `speed` moves the dashes on a `ring`, `path` or `trail`, `speed` px per second (negative runs backwards). Dashes keep their px size at any distance, so they move at the same speed on screen near or far. - `pulse` works on a `ring`, `path`, `trail` and `beam`. Pulses add light, so on a coloured line they burn toward white. - With `dash.speed` set, the pulses move at that speed too; else at `pulse.speed`. ```yaml live type: custom:lcards-astrometrics-card height: 340 camera: views: v: target: [0, 0, 0] yaw: 20 tilt: 40 distance: 320 points: - id: hub xyz: [0, 0, 0] marker: diamond label: HUB style: major - id: alpha polar: [70, 30] marker: dot label: ALPHA - id: beta polar: [60, 150] marker: dot label: BETA - id: gamma polar: [80, 260] marker: dot label: GAMMA objects: - type: grid shape: disc radius: 100 pattern: polar line_spacing: 20 spoke_count: 12 opacity: 0.5 # pulses with the defaults - type: path from: hub to: alpha arc: 10 color: var(--lcars-orange) pulse: true # moving dashes - type: path from: hub to: beta arc: 10 color: var(--lcars-orange) dash: pattern: [8, 6] speed: 30 # longer, rarer yellow pulses - type: path from: hub to: gamma arc: 10 width: 2 color: var(--lcars-blue) pulse: length: 24 gap: 120 color: var(--lcars-yellow) # a ring whose dashes turn - type: ring radius: 100 width: 2 dash: pattern: [12, 8] speed: 20 ``` | Key | Type | Default | Description | |---|---|---|---| | `dash.pattern` | list | solid | Dashes as `[on, off]` in px (more pairs repeat) | | `dash.speed` | number | `0` | Move the dashes (and pulses) along the line, px per second; negative runs backwards | | `pulse` | boolean / object | off | Bright pulses moving along the line: `true`, or their settings | | [Line keys](./objects/lines#line-keys) | | | `pulse.length` (`14`), `pulse.gap` (`90`), `pulse.width`, `pulse.color` (`var(--lcards-moonlight)`) and `pulse.speed` (`80`) | ## Animated surface fills **`fill.effect` paints an animated pattern on a `sphere`'s body or under a `grid`'s lines: a star's surface, a gas giant's bands, an ocean, a density map.** The types are the [plasma](/core/effects/background-animations/preset-reference#plasma), [fluid](/core/effects/background-animations/preset-reference#fluid) and [contour-field](/core/effects/background-animations/preset-reference#contour-field) presets, plus `bands` (belts round the latitude, a gas giant) and `swirl` (gas spiralling in, [below](#swirls)). - The pattern is drawn in 3D, so it has no seam round a sphere and no pinch at its poles, and it turns with `spin`. - On a sphere it is painted over `fill.color` in place of `image`, and the body still hides what is behind it. - `preset` starts from a [planet type](#planet-types); the keys you set win over it. ```yaml live type: custom:lcards-astrometrics-card height: 320 camera: views: v: target: [0, 10, 0] yaw: 15 tilt: 30 distance: 230 objects: # contour bands under a grid's lines - type: grid shape: plane size: [220, 140] line_spacing: 20 opacity: 0.6 fill: effect: type: contour colors: [var(--lcars-blue), var(--lcars-green), var(--lcars-yellow), var(--lcars-orange)] num_bands: 6 fill_level: 0.3 opacity: 0.5 # a star's surface - type: sphere at: [-60, 30, 0] radius: 24 line_spacing_deg: 30 opacity: 0.4 fill: effect: type: plasma color_a: var(--lcars-orange) color_b: var(--lcars-yellow) speed: 2 - type: sphere at: [10, 30, -10] radius: 20 opacity: 0.3 spin: 4 fill: effect: type: contour colors: [var(--lcars-orange), var(--lcars-yellow), var(--lcars-red)] num_bands: 8 # an ocean - type: sphere at: [70, 25, 10] radius: 18 color: var(--lcars-blue) fill: effect: type: fluid color: var(--lcars-blue) ``` ::: details More about fills - **Detail:** `base_frequency` is features per scene unit, about 3 across the object's radius by default; `num_octaves` adds layers of finer detail. - **Motion:** with `speed` above 0 the pattern flows through the object; under reduced motion it holds still. - **Entities:** the fill's numbers and colours can follow entities, as on any object: see [Live data](./data#settings-from-entities). ::: | Key | Type | Default | Description | |---|---|---|---| | `fill.effect.preset` | string | - | A [planet type](#planet-types) to start from | | `fill.effect.type` | string | the preset's, else `plasma` | `plasma` (two-colour bands), `fluid` (a one-colour wash), `contour` (stepped topographic bands), `bands` (belts round the latitude) or `swirl` (gas spiralling in) | | `fill.effect.color_a` | colour | `var(--lcars-blue)` | `plasma`: the first colour | | `fill.effect.color_b` | colour | `var(--lcars-orange)` | `plasma`: the second colour | | `fill.effect.color` | colour | `var(--lcars-blue)` | `fluid`: the wash colour; its alpha is how strong the wash is | | `fill.effect.colors` | colour / list | blue to orange | `contour`: stops from low to high. `bands`: the belt colours, repeated from the south pole to the north. `swirl`: stops from the middle out to the rim | | `fill.effect.num_bands` | number | `5` | `contour`: how many bands. `bands`: how many belts pole to pole. `2` to `64` | | `fill.effect.fill_level` | number | `0` | `contour`: flood the lowest bands, `0` to `0.95` | | `fill.effect.fill_color` | colour | see-through | `contour`: the colour over the flooded bands | | `fill.effect.blend_colors` | boolean | `true` | `contour` and `bands`: colours fade between bands. `false`: hard edges | | `fill.effect.turbulence` | number | `0.3` | `bands`: how much the belt edges swirl, `0` (straight) to `1` (stormy). `swirl`: how much the gas clumps and how ragged its edge is | | `fill.effect.base_frequency` | number | about 3 across the radius | Detail: features per scene unit. Lower is larger features | | `fill.effect.num_octaves` | number | `2` contour, `3` plasma, `4` the others | Layers of finer detail, `1` (smooth) to `8` (rough) | | `fill.effect.speed` | number | `0` | How fast the pattern flows through the object, scene units per second. `swirl`: how fast the gas turns at the rim | | `fill.effect.opacity` | number | `1` | The fill's opacity, `0` to `1` | ### Swirls **`type: swirl` is gas spiralling in round the object's y axis: a whirlpool, an accretion disc, a wormhole's mouth.** On a `well` grid the gas pours down the funnel; on a `disc` it lies flat. - It turns faster toward the middle and is streaked along the spiral, with dark lanes of thinner gas between the streaks, a rippled heart and a ragged outer edge that trails off in wisps (`turbulence`). - `colors` run from the heart out to the rim, and `speed` is how fast it turns at the rim. - Set `line_width: 0` and `edges: false` on the grid to show the gas alone. ```yaml live type: custom:lcards-astrometrics-card height: 340 camera: views: v: target: [0, -2, 0] yaw: 20 tilt: 40 distance: 34 objects: - type: grid shape: well well: throat: 0.07 radius: 15 depth: 5 line_width: 0 edges: false fill: effect: type: swirl colors: [var(--lcards-moonlight), var(--lcards-orange-lightest), var(--lcars-violet), var(--lcards-blue-medium), var(--lcars-violet), var(--lcards-blue-dark)] speed: 3 turbulence: 0.8 num_octaves: 5 - type: glow at: [0, 3, 0] size: 10 color: var(--lcards-orange-lightest) ``` ::: details More about swirls - **A whole wormhole:** the [Bajoran wormhole starter](./starters#bajoran-wormhole) builds a mouth from a swirl, with a shaft of light, sparkling stars and wisps of gas. ::: | Key | Type | Default | Description | |---|---|---|---| | [Fill keys](#animated-surface-fills) | | | `type: swirl` with `colors`, `speed`, `turbulence` and the detail keys | ### Planet types **`preset` starts a fill from a planet type: its type, colours (from the LCARdS palette, so they follow the theme) and detail.** Anything you set on top wins, so `preset: gas_giant` with `num_bands: 9` is a gas giant with fewer belts. ```yaml live type: custom:lcards-astrometrics-card height: 340 camera: views: v: target: [0, 0, 0] yaw: 0 tilt: 10 distance: 130 objects: - type: sphere at: [-48, 14, 0] radius: 10 line_width: 0.5 spin: 8 fill: effect: preset: gas_giant - type: sphere at: [-16, 14, 0] radius: 10 line_width: 0.5 spin: 8 fill: effect: preset: ringed_giant - type: sphere at: [16, 14, 0] radius: 10 line_width: 0.5 spin: 8 fill: effect: preset: ice_giant - type: sphere at: [48, 14, 0] radius: 10 line_width: 0.5 spin: 8 fill: effect: preset: storm_giant - type: sphere at: [-48, -14, 0] radius: 10 line_width: 0.5 spin: 8 fill: effect: preset: clouds - type: sphere at: [-16, -14, 0] radius: 10 line_width: 0.5 spin: 8 fill: effect: preset: lava - type: sphere at: [16, -14, 0] radius: 10 line_width: 0.5 spin: 8 fill: effect: preset: ice - type: sphere at: [48, -14, 0] radius: 10 line_width: 0.5 spin: 8 fill: effect: preset: terran ``` | `preset` | Looks like | Built on | |---|---|---| | `gas_giant` | Jupiter: orange and cream belts, stormy edges | `bands` | | `ringed_giant` | Saturn: pale gold belts, calm | `bands` | | `ice_giant` | Uranus: pale blue, faint belts | `bands` | | `storm_giant` | Neptune: deep blue belts, streaked | `bands` | | `clouds` | Venus from space: a cream cloud deck, slowly churning | `bands` | | `lava` | Dark crust with glowing cracks | `contour` | | `ice` | White and pale blue ice | `contour` | | `rocky` | Grey highlands and plains | `contour` | | `terran` | Oceans, land and ice caps | `contour` | ## Warp and dust **A fly-to with `warp` streaks the stars past the camera, and `backdrop.dust` fills the space round the camera with faint particles that show depth on every move.** The streaks grow with the camera's speed and shrink back to stars as it lands. - Turn warp on for every fly-to with `camera.warp: true`, for one view with `warp: true` in that view (a point's or object's `view` takes it too), or for one action with `warp: true` on its `fly-to` (or the [`lcards.fly_to`](/configuration/ha-actions#lcards-fly-to) action); `false` there turns it off. - The streaks follow how fast the camera moves for its distance from what it looks at, so a hop between planets streaks as a jump across the galaxy does. - The dust stays put as the camera moves, unlike the stars at infinity, and streaks in a warp too. It has no edge: particles fade out at `radius` from the camera and new ones fade in ahead as it travels, and coming back to a place shows the same dust. ```yaml live type: custom:lcards-astrometrics-card height: 340 camera: view: far fly_duration: 2400 views: far: target: [0, 0, 0] yaw: 20 tilt: 20 distance: 600 near: target: [40, 5, 30] yaw: 30 tilt: 10 distance: 25 warp: true buttons: true backdrop: stars: count: 4000 max_radius: 1.4 spectrum: true dust: count: 1500 points: # tap the label to warp in - id: core xyz: [0, 0, 0] label: GALACTIC CORE style: title tap_action: action: fly-to view: near objects: - type: grid shape: disc radius: 100 pattern: polar line_spacing: 10 spoke_count: 36 opacity: 0.6 # tap the glow to fly back out - type: glow at: core size: 50 color: var(--lcars-yellow) tap_action: action: fly-to view: far ``` ::: details More about warp and dust - **Following a toggle:** `camera.warp` with an `entity` makes fly-tos streak while it is on (`on`, `true`, `yes`, `engaged`, `open`, `home`, or a number above 0), such as an `input_boolean`. - **Spectrum:** `backdrop.stars.spectrum: true` splits each streak into colour, as a Doppler shift of the star's own colour: violet toward the tail (nearer the direction of flight) and red toward the head. White stars show the whole rainbow; a blue star streaks green to violet, its tail fading as it shifts past violet, and a red star the other way. `spectrum.direction: reverse` puts violet at the head instead. - **Denser dust:** a smaller `radius` is denser and shows depth on smaller moves. - **Reduced motion:** nothing streaks. ::: | Key | Type | Default | Description | |---|---|---|---| | `camera.warp` | boolean / object | `false` | Every fly-to streaks the stars and dust; a view's own `warp` wins | | `camera.warp.entity` | string | - | Fly-tos streak while this entity is on | | `camera.warp.attribute` | string | - | Read this attribute instead of the state | | `camera.views..warp` | boolean | `camera.warp` | Streak on the way to this view | | `backdrop.stars.streak` | number | `1` | How long the streaks are, a multiple of the usual length. `0`: never | | `backdrop.stars.spectrum` | boolean / object | off | Split each streak into colour | | `backdrop.stars.spectrum.direction` | string | `doppler` | `doppler`: violet toward the tail. `reverse`: violet toward the head | | `backdrop.dust` | boolean / object | off | Depth dust round the camera: `true`, or the keys below | | `backdrop.dust.count` | number | `800` | How many particles (about half are within reach of the camera at any time) | | `backdrop.dust.radius` | number | 1.5 times the scene's radius | How far round the camera the dust reaches, scene units | | `backdrop.dust.min_radius` | number | `0.4` | Smallest particle radius, px | | `backdrop.dust.max_radius` | number | `1` | Largest particle radius, px | | `backdrop.dust.brightness` | `[min, max]` | `[0.35, 1]` | Each particle's brightness is picked between these | | `backdrop.dust.color` | colour | `var(--lcards-moonlight)` | Particle colour | | `backdrop.dust.colors` | list | - | Several colours, picked per particle. Wins over `color` | | `backdrop.dust.opacity` | number | `1` | Fades the whole dust layer, `0` to `1` | | `backdrop.dust.seed` | number | `7` | The same seed places the same dust | | `backdrop.dust.spectrum` | boolean / object | off | Split the dust's streaks into colour, as on the stars | ### Going to warp **`warp` on the card sends the ship to warp where it is: the scene's own backdrop stars and dust streak along the view, and the [warp starfield](/core/effects/background-animations/preset-reference#warp-starfield) streams past behind the scene.** `false` drops out of warp again; both `warp` and `warp_factor` can follow entities, so a toggle and a slider make an ENGAGE button and a warp factor control. - `warp` reads `on`, `true`, `yes`, `engaged`, `open`, `home` or a number above 0 as engaged. - Going to warp takes about two seconds, dropping out a little less; a change of warp factor eases too. - `camera.warp` is different: it streaks the stars only while a fly-to moves the camera. ```yaml live controls type: custom:lcards-astrometrics-card height: 320 camera: views: v: target: [0, 0, 0] yaw: 0 tilt: 10 distance: 120 backdrop: stars: count: 3000 spectrum: true dust: count: 1500 # at warp while the toggle is on: tap ENGAGE warp: entity: input_boolean.demo_toggle # the warp factor from a slider, 1 to 9.9 warp_factor: entity: input_number.lcards_test_power output: [1, 9.9] points: - id: engage xyz: [0, 0, 0] marker: square style: major label: ENGAGE (TAP) tap_action: action: toggle entity: input_boolean.demo_toggle ``` ::: details More about going to warp - **With spectrum:** with `backdrop.stars.spectrum`, the backdrop streaks are in colour. - **Reduced motion:** nothing streams. ::: | Key | Type | Default | Description | |---|---|---|---| | `warp` | boolean / object | `false` | Go to warp. `false` drops out | | `warp.entity` | string | - | At warp while this entity is on | | `warp.attribute` | string | - | Read this attribute instead of the state | | `warp_factor` | number | `6` | How long the streaks grow and how fast they stream, `1` to `9.9`. Can [follow an entity](./data#settings-from-entities) | ## Cost **A still effect costs nothing between frames, because a still scene draws nothing; an effect that moves costs a little on every frame.** Most scenes stay well inside the time a smooth frame allows. - A volume nebula costs more than puffs, and a little more again seen from inside the gas. A `shape`, `stretch`, `core.color` or dust adds a little on top. - The Badlands are the costliest effect, most of all from inside with columns and `veins`; their lightning adds little. - The Nexus costs little more than a plain volume nebula. - The nebula and fill shaders load in a small extra download the first time a card uses one. --- # Your Own Models **Any ship, station or other object can come from a glTF file of your own (`.glb` or `.gltf`), drawn by the [model](./objects/ships#model) object.** LCARdS also ships a few [built-in models](./objects/ships#built-in-models): the Constitution-class and Galaxy-class starships, Deep Space 9, Earth Spacedock and a Utopia Planitia drydock. In short: 1. Get a `.glb` file (see [where models come from](#where-models-come-from)). 2. Copy it into `/config/www/lcards/models/` (the [My models folder](#the-my-models-folder)). 3. In the [Astrometrics Studio](./start#the-studio), add a model object, set **Src** to **Browse Home Assistant media**, and pick it under **LCARdS**, **My models**. 4. Set its `size`, and `rotation` if it faces the wrong way ([make it fit](#make-it-fit)). ## Where models come from **Download one from a community site, or make your own in a 3D tool that exports glTF.** - **Community sites** such as Sketchfab have many fan-made ship and station models, some free to download. Pick **GLB** when the site offers it; a **glTF** download is a folder (a `.gltf` file with a `.bin` file and textures) that works too, kept together. - **Your own** models can be made in Blender or any 3D tool that exports glTF. - **Check the license before you use a model.** Fan-made models of ships from films and series are fan art of designs their studios own, and some uploads are taken from games without permission even when the page shows an open license. LCARdS does not ship, link to or download third-party models; what you load on your own dashboard is your call. ## The My models folder **LCARdS keeps your models in `/config/www/lcards/models/` and shows that folder in the Home Assistant media browser as LCARdS, My models.** - `/config/www/lcards/` is the LCARdS user folder; `models/` in it is for your models (other kinds of files may get folders beside it later). - LCARdS creates the folder when it starts. **Updating LCARdS never touches it**: updates replace `custom_components/lcards/`, not `www/`. It is in your Home Assistant backups like the rest of `/config`. - Copy files in with the File editor or Studio Code Server add-on, a Samba share, or any way you reach `/config`. Subfolders are fine (`ships/odyssey.glb`). Keep a `.gltf` and its `.bin` and texture files together in one folder. ::: details More about the folder - **Not private:** like everything in `/config/www`, the files can be fetched without logging in (on `/lcards-user/...` and on `/local/lcards/...`) by anyone who can reach your Home Assistant and knows their names. Keep only models there. - **What it lists:** the media browser lists `.glb` and `.gltf` files only. - **No uploads:** uploading through the media browser does not work here. Home Assistant's own media folder only takes audio, video and images, which is why LCARdS has its own. ::: ## Pick it **In the Studio, a model's Src (and every image field: a planet's texture, an image object) has three sources.** | Source | What it sets | For | |---|---|---| | **Asset library** | `builtin:` | The models (or images) LCARdS ships | | **Custom path** | `/local/...` or an `https://` URL | A file anywhere in `/config/www` (it is `/local/...`), or on a web server that allows it | | **Browse Home Assistant media** | `media-source://...` | My models (and, for images, your Home Assistant media) | - A file from another web server only loads if that server allows it (CORS); download the file instead when in doubt. A page that offers a download does not count: the link has to be the file itself. - The same in YAML is below. The files are your own, so this example is not live: ```yaml objects: # from My models, as the media browser picks it - type: model id: odyssey src: media-source://lcards/my_models/odyssey.glb size: 60 # any file in /config/www - type: model id: runabout src: /local/models/runabout.glb size: 8 ``` ## Make it fit **A model from elsewhere comes in its maker's units, facing their way, with their part names.** These keys size it, turn it and read its units. - `size` scales the model so its largest extent fits, whatever units the file uses. To keep models in proportion instead, leave `size` out in a scene with `units`: each is drawn at its [real size](./objects/ships#real-size). - LCARdS models face +z (bow forward). A model that comes in sideways or nose-up needs a quarter turn, such as `rotation: [0, 90, 0]` or `[-90, 0, 0]`. - glTF files are in metres unless their maker got it wrong: if a model comes out a hundred times too large, try `file_units: cm`; at an odd scale, give its `length` instead. ```yaml live type: custom:lcards-astrometrics-card height: 320 units: km camera: views: v: target: [0, 0, 0] yaw: 150 tilt: 20 distance: 1.6 backdrop: stars: count: 1500 objects: # no size: drawn at its real length, 0.64 km - type: model src: builtin:galaxy_class at: [-0.35, 0, 0] # turned a quarter round, its own colours - type: model src: builtin:constitution_class_refit at: [0.35, 0, 0] rotation: [0, 90, 0] material: original ``` ::: details More about fitting - **Labels on its parts:** `part:` on a point puts it on a named part (a node in the file). Names in downloaded files are often like `Object_12`; in the Studio's Points tab the part list fills in from the file once it has loaded, so you can try them. See [points on a model](./objects/ships#points-on-a-model). ::: | Key | Type | Default | Description | |---|---|---|---| | `size` | number | real size | Its largest extent, scene units. Left out: its real size in a scene with `units`, else 50 scene units | | `length` | number | - | Its real length in metres, for a file not at its true scale: drawn that long at its real size, whatever the file measures | | `file_units` | string | `m` | The units the file was made in, for its real size: `m`, `cm`, `mm`, `km`, `ft` or `in` | | `rotation` | `[x, y, z]` | `[0, 0, 0]` | Turn it, degrees | | `material` | string | `hologram` | `hologram` works on any model: glow, rim, scanlines, edges. `original` shows the file's own colours and textures, lit | | `face` | string | - | `motion`: on a moving point, the model turns to face where it is going. Or a point id to face. See [Facing the way it goes](./objects#facing-the-way-it-goes) | ## Make it light **The model is drawn on every frame the scene moves, and downloaded with the dashboard, so a smaller file is better on every device.** The built-in models have 10,000 to 20,000 triangles each, in files of 220 to 410 KB; models made for games or renders can have 100,000 or more, and tens of MB of textures. - **Any size loads**, but every device that shows the dashboard downloads the whole file and holds it in memory: a 100 MB model is slow to appear on a phone and may not load on a small tablet. - **Compress and simplify** with [glTF Transform](https://gltf-transform.dev/) (needs Node.js), as below. Blender's Decimate modifier also reduces triangles before export. - **Draco** compression is not supported (the loader is not shipped); `meshopt` below writes a file the card reads. - A hologram ignores textures, so a model you only show as a hologram can be exported without them. ```sh npx @gltf-transform/cli inspect ship.glb # triangles, textures, sizes npx @gltf-transform/cli simplify ship.glb ship-small.glb --ratio 0.25 npx @gltf-transform/cli resize ship-small.glb ship-small.glb --width 1024 --height 1024 npx @gltf-transform/cli meshopt ship-small.glb ship-small.glb ``` ::: details More about heavy models - **Feature edges** are off by default on a model over 250,000 triangles: working them out takes seconds on a model that dense (2.5 million triangles froze the page for 11 seconds), and they would be noise anyway. `edges: true` draws them. ::: ## When it does not show **A dim stand-in box shows while the file loads, and stays if it fails.** The browser console (filter on `Astrometrics`) says why: - **not found / could not resolve:** the path or the picked file is gone; pick it again. - **slow to appear, or the tab runs out of memory:** the file is too big for that device; see [make it light](#make-it-light). - **Draco-compressed:** convert it with `meshopt` as above. - **blocked (CORS):** the file is on a server that does not allow it; copy it into My models. - **has no part:** the name is not in the file; the message lists the names it has. --- # Lines and Light Lines through the scene and lights in it: routes, beams, trails behind moving points, lightning and glows. The keys every object takes (`id`, `at`, `rotation`, `opacity`, `visible` ...) are on the [Objects](../objects#keys-every-object-takes) page. ## path **A line through a list of points, or from one point to another.** Use it for a route between places, a supply line, or an outline drawn in the scene. - List the places in `points` (point ids or `[x, y, z]`), or give just `from` and `to`. A path through point ids moves when those points move. - `arc` bends each leg upward into a curve, so a route between two places on a map reads as a flight path rather than a straight line. - A path with `at` is a shape drawn round that point: each `[x, y, z]` is measured from `at`, so the shape moves and turns with it. ```yaml live type: custom:lcards-astrometrics-card height: 300 camera: views: v: target: [0, 0, 0] yaw: 20 tilt: 40 distance: 170 points: - id: star xyz: [0, 0, 0] marker: reticle label: STAR - id: outpost polar: [60, 250] marker: dot label: OUTPOST - id: relay polar: [55, 60] marker: dot label: RELAY objects: - type: ring at: star radius: 30 color: var(--lcars-blue) # a route from the outpost past the star to the relay - type: path points: [outpost, star, relay] arc: 15 width: 2 colors: [var(--lcars-orange), var(--lcars-yellow)] glow: true # a pipe drawn round the star, with pulses running along it - type: path at: star points: - [-40, -25, 0] - [0, -32, 0] - [40, -25, 0] arc: 6 width: 8 line_look: tube pulse: true color: var(--lcars-blue) ``` ::: details More about path - **Ids and offsets together:** with `at`, a point id in `points` still means that point, wherever it is; only the `[x, y, z]` entries are measured from `at`. - **The track of the sun or moon:** `sky: sun` (or `moon`) with `object: ` draws today's track across the sky on that dome, split where it goes under the horizon. `points`, `from` and `to` are not used then. - **Looks:** a path is part of the diagram look; the realistic [look](../scene#looks-diagram-and-realistic) hides it unless the path sets `look: all`. ::: | Key | Type | Default | Description | |---|---|---|---| | `points` | list | - | The places the line passes through, in order: point ids or `[x, y, z]`. With `at`, each `[x, y, z]` is an offset from `at` | | `from` | id / `[x, y, z]` | - | Start, instead of `points` | | `to` | id / `[x, y, z]` | - | End, instead of `points` | | `arc` | number | `0` | Lift each leg into a curve this high at its middle, scene units. `0` is straight | | `sky` | string | - | `sun` or `moon`: draw today's track of that body on the dome in `object` | | `object` | string | - | With `sky`: the id of the dome grid to draw on | | `alt` | number | `0` | With `sky`: height above the dome, scene units | | `color` | colour | `var(--lcars-orange)` | Line colour | | [Line keys](#line-keys) | | | `width`, `dash`, `colors`, `glow`, `line_look`, `blend` and `pulse` | ### Line keys **How a line is drawn: its width, dashes, colours, glow and pulses.** The same keys work on a `path`, a [ring](./surfaces#ring) and (all but `glow` and `line_look`) a [trail](#trail). - Widths, dashes and pulses are measured in screen pixels, so a line keeps its thickness however close the camera is. - `pulse` sends bright dashes along the line, like data moving down a conduit. Moving dashes and pulses are explained with more examples on the [Effects](../effects#moving-dashes-and-pulses) page. ```yaml live type: custom:lcards-astrometrics-card height: 260 camera: views: v: target: [0, 0, 0] yaw: 0 tilt: 50 distance: 150 objects: # dashed - type: path from: [-60, 0, -30] to: [60, 0, -30] width: 2 dash: [8, 6] color: var(--lcars-blue) # a colour fade with a glow under it - type: path from: [-60, 0, 0] to: [60, 0, 0] width: 3 colors: [var(--lcars-orange), var(--lcars-yellow)] glow: true # a lit pipe with pulses - type: path from: [-60, 0, 30] to: [60, 0, 30] width: 10 line_look: tube color: var(--lcars-blue) pulse: color: var(--lcars-yellow) ``` | Key | Type | Default | Description | |---|---|---|---| | `width` | number | `1.5` | Line width, px | | `dash` | list / object | solid | Dashes as `[on, off]` in px (more pairs repeat). Or `pattern: [on, off]` with `speed` (px per second; negative runs backwards) to move them | | `color` | colour | per type | Line colour | | `colors` | `[from, to]` | - | Fade from the first colour to the second along the line. Wins over `color` | | `glow` | boolean / number | off | A soft halo under the line: `true` is 4 times the line's width, or give the factor (at least 1) | | `line_look` | string | `flat` | `flat`: one brightness. `tube`: shaded like a lit pipe (dark edges, a bright stripe); reads best from about 6 px wide | | `blend` | string | `normal` | `add`: light adds up where lines cross, so they glow | | `pulse` | boolean / object | off | Bright pulses moving along the line. `true`, or the keys below | | `pulse.length` | number | `14` | Pulse length, px | | `pulse.gap` | number | `90` | Space between pulses, px | | `pulse.width` | number | line width + 1 | Pulse width, px | | `pulse.color` | colour | `var(--lcards-moonlight)` | Pulse colour. Pulses add light, so they look whiter than this on a bright line | | `pulse.speed` | number | `80` | px per second, when `dash.speed` is not set | Moving dashes and pulses stop under reduced motion. ## beam **A glowing straight line between two places: a tractor beam, a phaser, a transporter lock.** It is drawn as a wide, soft haze round a thin bright core, so it reads as light rather than a drawn line. - `from` and `to` take point ids or `[x, y, z]`. A beam between points follows them when they move. - `width` sets the haze; the bright core stays thin whatever the width. ```yaml live type: custom:lcards-astrometrics-card height: 280 camera: views: v: target: [0, 0, 0] yaw: 25 tilt: 20 distance: 140 backdrop: stars: count: 1500 points: - id: station xyz: [-45, 0, 0] marker: reticle label: STATION - id: ship xyz: [45, 10, 0] marker: dot label: SHIP objects: - type: beam from: station to: ship width: 14 color: var(--lcars-blue) pulse: true ``` | Key | Type | Default | Description | |---|---|---|---| | `from` | id / `[x, y, z]` | - | One end | | `to` | id / `[x, y, z]` | - | The other end | | `width` | number | `12` | Width of the haze, px. The core stays thin | | `color` | colour | `theme:colors.ui.secondary` | Beam colour | | `pulse` | boolean / object | off | Pulses moving along the beam, as on a [line](#line-keys) | ## trail **A line behind a moving point, showing where it has been: a ship's wake, the last stretch of a planet's orbit.** - The point must move: ride a spinning ring, stand on a model part during an animation, or be placed from an entity's state. A point that stands still leaves no trail. - The trail starts empty when the card opens and grows as the point moves, up to `length` seconds of travel. - The tail fades to black, which is the background in space. Over a bright planet, set `fade_tail: false`. ```yaml live type: custom:lcards-astrometrics-card height: 320 camera: views: v: target: [0, 0, 0] yaw: 20 tilt: 35 distance: 120 points: - id: sun xyz: [0, 0, 0] - id: ship polar: [40, 0] object: orbit marker: dot label: SHIP style: minor - id: probe polar: [22, 180] object: inner marker: dot label: PROBE style: tiny objects: - type: glow at: sun size: 30 color: var(--lcars-yellow) # the points ride these two spinning rings - type: ring id: orbit radius: 40 spin: 20 width: 0.5 opacity: 0.2 rotation: [12, 0, 0] - type: ring id: inner radius: 22 spin: -45 width: 0.5 opacity: 0.2 - type: trail point: ship length: 6 width: 3 - type: trail point: probe length: 3 width: 2 color: var(--lcars-blue) ``` ::: details More about trail - **Drawn where the point stands:** a moon on a ring round a planet that is itself on an orbit leaves its trail round the planet, riding along with it, not the looping track it makes through the scene. - **Entities:** a point placed from an entity leaves a line through the positions it reported since the card opened. - **Reduced motion:** a point on a ring holds still, so its trail stops growing. A point that jumps with an entity still leaves its line. ::: | Key | Type | Default | Description | |---|---|---|---| | `point` | string | required | The id of the point to follow | | `length` | number | `10` | How far back the trail reaches, in seconds of the point's travel | | `fade_tail` | boolean | `true` | Fade from the colour at the point to black at the tail. `false`: one colour all along | | `color` | colour | `var(--lcars-orange)` | Colour at the point | | `width`, `dash`, `blend`, `pulse` | | | As the [line keys](#line-keys) | ## lightning **Jagged, forked bolts of lightning: quick strikes at random places, or columns that stay lit.** Put it inside a volume nebula and each bolt lights the gas round it, as in a storm. - `mode: strike` (the default) flashes a bolt now and then somewhere in the region, mostly from high to low. - `mode: column` holds `count` bolts from the region's floor to its ceiling, crawling and flickering. - The region is a ball (`radius`) or a box (`size`) round the object's place (`at`). - Under reduced motion no strikes show, and columns stand still and dim. ```yaml live type: custom:lcards-astrometrics-card height: 360 camera: views: v: target: [0, 0, 0] yaw: 30 tilt: 6 distance: 300 backdrop: stars: count: 2000 objects: - type: nebula render: volume size: [400, 220, 400] count: 10 colors: [var(--lcars-orange), var(--lcars-red)] seed: 5 density: 1.6 max_radius: 160 - type: lightning size: [260, 170, 260] rate: 2 color: var(--lcars-space-white) glow: color: var(--lcars-lavender) branches: 4 seed: 4 ``` ::: details More about lightning - **A strike** is a quick rise, a fade and a weaker second stroke, then a pause of about `1 / rate` seconds (the pauses vary). - **Lighting the gas:** a bolt lights any [volume nebula](../effects#gas-you-can-fly-into) it falls in, in its own colour, without linking the two. `lights: false` turns that off. - **Lightning on a nebula itself:** a volume nebula can also have strikes of its own (`lightning:` on the nebula, see [the Badlands](../effects#the-badlands-layers-columns-and-lightning)), or discharges crawling along its ribbon (`mode: crawl`, see [the Nexus](../effects#the-nexus-a-ribbon-and-its-wake)). ::: | Key | Type | Default | Description | |---|---|---|---| | `mode` | string | `strike` | `strike`: bolts that flash and go. `column`: bolts held from floor to ceiling | | `radius` | number | `50` | The region as a ball round `at`, scene units | | `size` | number / `[w, h, d]` | - | The region as a box, scene units. Wins over `radius` | | `rate` | number | `0.5` | `strike`: about how many strikes a second. `0`: none. Can [follow an entity](../data#settings-from-entities) | | `flash` | number | `150` | `strike`: how long a strike shows, ms | | `count` | number | `1` | `column`: how many columns (1 to 10), spread over the region | | `speed` | number | `1` | `column`: how fast the bolts crawl and flicker. `0.5` is half as fast, `0` still. Can follow an entity | | `color` | colour | `var(--lcards-moonlight)` | The bolt's bright core | | `glow` | boolean / object | `true` | The soft glow round the bolt. `false` for none, or `color` and `width` (times the bolt's width, default 6) | | `width` | number | `2` | The bolt's width, px. Branches are about half as wide | | `jaggedness` | number | `0.5` strike, `0.25` column | How far the bolt zigzags, from `0` (straight) to `1` | | `branches` | number | `3` strike, `1` column | Forks off the bolt; each may fork once more | | `brightness` | number | `1` | How strongly a bolt lights the gas, `0` to `2`. Can follow an entity | | `lights` | boolean | `true` | Light the gas of a volume nebula the bolt is in | | `seed` | number | `1` | Where the strikes fall and how the bolts are shaped; the same seed gives the same storm | ## glow **A soft round light that always faces the camera: a star, a galactic core, a beacon.** It is a light, not a solid: it brightens what is behind it and has no edge. - Place it with `at` (a point id or `[x, y, z]`); `size` is its diameter in scene units. - `falloff` shapes it: a low value is a wide, even haze, a high value a small bright core with a faint halo. ```yaml live type: custom:lcards-astrometrics-card height: 260 camera: views: v: target: [0, 0, 0] yaw: 0 tilt: 15 distance: 160 backdrop: stars: count: 1500 objects: # a wide, even haze - type: glow at: [-45, 0, 0] size: 60 falloff: 0.5 color: var(--lcars-orange) # the default - type: glow at: [0, 0, 0] size: 60 color: var(--lcars-yellow) # a tight bright core - type: glow at: [45, 0, 0] size: 60 falloff: 6 color: var(--lcars-blue) ``` | Key | Type | Default | Description | |---|---|---|---| | `size` | number | `60` | Diameter, scene units | | `color` | colour | `var(--lcards-moonlight)` | Colour of the light | | `opacity` | number | `0.9` | Strength, `0` to `1` | | `falloff` | number | `2` | How fast it fades from the middle: higher is a tighter, brighter core. At least `0.25` | | `blend` | string | `add` | `add`: light adds up with what is behind. `normal`: drawn over it | --- # Ships and Stations Ships, stations and other made things: 3D models (the built-in ships and starbases, or your own glTF files) and the Borg cube. The keys every object takes (`id`, `at`, `rotation`, `opacity`, `visible` ...) are on the [Objects](../objects#keys-every-object-takes) page. ## model **A 3D model from a glTF file (`.glb` or `.gltf`): a starship, a station, or anything else made as a model.** It is drawn as a hologram by default: a glow with a bright rim, scanlines and its feature edges. - `material: original` shows the file's own materials instead, lit. - Leave out `size` to draw the model at its [real size](#real-size); give `size` to scale it to fit. - Your own file goes in `/config/www/` and is `/local/...` in `src`. Where to put it, how to pick it and how to keep it light are on [Your own models](../models). ```yaml live type: custom:lcards-astrometrics-card height: 340 camera: views: v: target: [0, 0, 0] yaw: 150 tilt: 20 distance: 130 backdrop: stars: count: 1500 objects: # a hologram with a scan band and its animation looping - type: model id: refit src: builtin:constitution_class_refit at: [-30, 0, 0] size: 55 scan: period: 5 animation: all # the file's own materials, lit - type: model id: galaxy src: builtin:galaxy_class at: [30, 0, 0] size: 55 material: original ``` ::: details More about model - **While it loads:** a stand-in box shows until the file is in. - **Compression:** files compressed with meshopt load. Draco-compressed files do not load; the browser console says why. - **Big models:** feature edges are left off on a model over 250,000 triangles, because working them out freezes the page for seconds. `edges: true` draws them anyway. See [make it light](../models#make-it-light). - **Labels behind it:** a model hides labels and cards behind it by its real shape, not by a bounding sphere. See [Points on a model](#points-on-a-model). ::: | Key | Type | Default | Description | |---|---|---|---| | `src` | string | required | The file. `builtin:` is a model shipped with LCARdS (see [built-in models](#built-in-models)); your own is `/local/...` | | `size` | number | real size | Its largest extent, scene units: the file is scaled and centred to fit. Left out: its [real size](#real-size) | | `length` | number | - | Its real length in metres (its largest extent), for a file not made at its true scale. See [real size](#real-size) | | `file_units` | string | `m` | The units the file was made in, for its real size: `m`, `cm`, `mm`, `km`, `ft` or `in` | | `material` | string | `hologram` | `hologram`: a glow with a bright rim and scanlines. `original`: the file's own materials, lit | | `color` | colour | `var(--lcars-blue)` | The hologram's body colour | | `rim.color` | colour | `var(--lcards-moonlight)` | The hologram's rim colour | | `opacity` | number | `0.85` | The hologram's brightness, `0` to `1` | | `scanlines` | number | `0.5` | Scanline strength, `0` (none) to `1` | | `solid` | boolean | `true` | `true`: the hologram hides its own far side. `false`: see-through | | `blend` | string | `add` | The hologram's blending: `add` or `normal` | | `scan.period` | number | `0` | A bright band sweeping along the model, seconds per sweep. `0`: none. Stops under reduced motion | | `scan.color` | colour | `var(--lcards-moonlight)` | The scan band's colour | | `edges` | boolean / object | on for a hologram | Feature edges as lines. Off with `material: original`, and on a model over 250,000 triangles | | `edges.angle` | number | `30` | Draw an edge where faces meet at more than this angle, degrees | | `edges.width` | number | `1` | Edge width, px. Above `1` the edges are thick lines that keep their width on any screen; `1` draws thin hairlines, the cheapest on detailed models | | `edges.color` | colour | the rim colour | Edge colour | | `animation` | string / list | - | Clips to loop: `all`, a clip name or a list of names. Both built-in ships have one clip, `bussards` | | `occlude` | boolean | `true` | Hide labels and cards behind it | ### Points on a model **A point with `object:` set to a model's id stands on that model: a label on the bridge, a marker on a nacelle.** The point moves and turns with the model. - `xyz` is then in the file's own coordinates, so changing `size` never moves the points. - `part:` puts a point on a named part of the file (a node), so it follows that part when an animation moves it. With `part`, `xyz` is an offset from the part. - Labels on the far side of the model hide behind it: drag to turn the ship below until the port nacelle is behind the hull, and its label goes. ```yaml live type: custom:lcards-astrometrics-card height: 380 camera: view: three views: three: target: [0, -6, 0] yaw: 145 tilt: 22 distance: 105 backdrop: stars: count: 1500 points: - id: bridge object: ship part: bridge label: BRIDGE marker: dot style: major - id: deflector object: ship part: deflector label: DEFLECTOR marker: dot - id: port object: ship part: nacelle_port label: PORT NACELLE marker: dot - id: starboard object: ship part: nacelle_starboard label: STARBOARD NACELLE marker: dot objects: - type: grid shape: disc radius: 70 pattern: polar line_spacing: 10 spoke_count: 24 at: [0, -25, 0] - type: model id: ship src: builtin:constitution_class_refit size: 70 scan: period: 5 animation: all ``` ::: details More about points on a model - **In the Astrometrics Studio:** **Pick on preview** places a point on the model's surface, and the part list fills in from the file. - **How models hide labels:** by their real shape, from a small depth image of the scene that is taken only when the camera or the model moves. - **More placement forms** for points are on the [Points](../points#placement-forms) page. ::: | Key | Type | Default | Description | |---|---|---|---| | `object` | string | - | On the point: the id of the model it stands on | | `xyz` | `[x, y, z]` | - | On the point: where it sits, in the file's own coordinates (with `part`: an offset from the part) | | `part` | string | - | On the point: the name of a part (node) of the model; the point follows it. A model's parts are listed under [built-in models](#built-in-models) | ### Real size **A model without `size`, in a scene with `units`, is drawn at its real size.** Ships and stations then sit in proportion to each other and to the planets. - The scene needs `units` (or the model must be in a [star system](../scale#star-systems) that has them). Without `units`, a model without `size` is drawn 50 scene units across. - The file is read in `file_units`: metres by default, as glTF files and the built-in models are. - For a file not made at its true scale, give its real `length` in metres and it is drawn that long, whatever the file measures. `size` wins over both; set it to draw a model larger on purpose. ```yaml live type: custom:lcards-astrometrics-card height: 340 units: km camera: views: v: target: [0, 0, 0] yaw: 30 tilt: 20 distance: 2.6 backdrop: stars: count: 1500 points: - id: ds9 xyz: [0, 0, 0] - id: ship xyz: [0.9, 0.2, 0.6] label: NCC-1701-A style: minor objects: # Deep Space 9, 1.45 km across - type: model id: station src: builtin:deep_space_nine at: ds9 material: original # the refit Constitution-class ship, 0.305 km long - type: model id: ship src: builtin:constitution_class_refit at: ship ``` ::: details More about real size - **In proportion:** the Constitution-class ship is 0.305 km long beside Deep Space 9's 1.45 km, round a planet 12,742 km across. - **Downloaded models:** many are not made at their true scale. A Star Trek Online Odyssey-class ship from Sketchfab measures 53 units long, so read as metres it would be drawn 53 m long. Give it its real `length` in metres (the Odyssey is 1,061 m). - **Any units:** `length` stays right in any scene units, where a `size` would need changing with them. - **Your own files,** with a file made in feet and one at an odd scale: ```yaml objects: # a download made in feet - type: model id: runabout src: /local/models/runabout.glb at: [1, 0, -1] file_units: ft # a download at an odd scale: its real length in metres - type: model id: odyssey src: /local/models/odyssey.glb at: [-3, 0, 2] length: 1061 ``` - **In the Astrometrics Studio:** the model's form shows what its file measures and how it is drawn. A file read at its own measurements says to set **Length (m)** when it is not at its true scale. **Show** flies the preview to the model, **Fit to view** sets a size about a fifth of the preview's view, **File size** sets its largest extent as the size (for a file made in the scene's units) and **Real size** clears `size`. - **New models:** a new model in a scene with units starts at its real size, and the preview flies to it once its file is in (and again when you pick another file), so a real-size ship is never a lost speck. ::: | Key | Type | Default | Description | |---|---|---|---| | `units` | string | - | On the card: what one scene unit is (`m`, `km`, `au`, `ly` or `pc`). See [Scale](../scale#units) | | `size` | number | - | Wins over the real size: its largest extent, scene units | | `length` | number | - | Its real length in metres. Wins over `file_units` | | `file_units` | string | `m` | The units the file was made in: `m`, `cm`, `mm`, `km`, `ft` or `in` | ### Visible size **At its real size a ship is a speck in a view of a whole star system. `model_scale: visible` on the card draws it large enough to see.** - Each model is drawn at least 40 px across, scaled about its centre, and at its real size again once you are close enough for that to be larger. - Only real-size models grow: a model with its own `size` is left as it is. Points on a model grow with it. - You can switch it on screen with the size button under the [camera buttons](../camera#camera-buttons), the `V` key, a `set-model-scale` action or the Astrometrics Studio's toolbar. That is not saved. ```yaml live type: custom:lcards-astrometrics-card height: 340 units: km model_scale: visible camera: views: v: target: [15, 0, 5] yaw: 20 tilt: 30 distance: 90 backdrop: stars: count: 1500 points: - id: ds9 xyz: [0, 0, 0] label: DEEP SPACE 9 style: minor - id: ship xyz: [30, 0, 10] label: NCC-1701-A style: minor objects: - type: model id: station src: builtin:deep_space_nine at: ds9 material: original - type: model id: ship src: builtin:constitution_class_refit at: ship ``` | Key | Type | Default | Description | |---|---|---|---| | `model_scale` | string | `real` | On the card: how real-size models start. `real`: in proportion, however small. `visible`: at least 40 px across | | `camera.buttons.scale` | boolean | `true` | The size button beside the camera buttons, shown only when a model is drawn at its real size. `false` hides it | | `model_scale` (action) | string | `toggle` | On a `set-model-scale` action: `real`, `visible` or `toggle`. See [actions](../points#actions) | ### Built-in models **Ships and stations shipped with LCARdS: fan art made in code (no third-party model), recreating the designs seen on screen.** Use one in `src` as `builtin:`. - All of them are in metres, with Y up, so they come in at their [real size](#real-size). - `material: original` shows their own colours and lit windows. - Both ships use one set of part names, so a scene that labels `bridge` or `nacelle_port` works with either. - Rings, rims and round hulls put their part point on the front face (+z), so a label sits on the structure rather than in the middle of the station. ```yaml live type: custom:lcards-astrometrics-card height: 420 camera: view: station views: station: target: [0, 0, 0] yaw: 30 tilt: 10 distance: 170 backdrop: stars: count: 1500 points: - id: ops object: ds9 part: ops label: OPS marker: dot style: major - id: promenade object: ds9 part: promenade label: PROMENADE marker: dot - id: pylon object: ds9 part: upper_pylon_1 label: UPPER PYLON 1 marker: dot objects: - type: model id: ds9 src: builtin:deep_space_nine size: 90 material: original ``` ::: details More about the built-in models - **Parts on the front face:** the rings, rims and round hulls with their point on the front face are `habitat_ring`, `docking_ring`, `cap`, `promenade`, `underdish`, `neck` and `hull`. - **Your own files:** for the My models folder, picking a file, sizing and turning it, and keeping a big model light, see [Your own models](../models). ::: | `src` | What it is | Parts (`part:`) | |---|---|---| | `builtin:constitution_class_refit` | The refit Constitution-class starship of the films (USS Enterprise NCC-1701-A): 305 m long, 144.5 m across the saucer, the bow toward +z. One animation clip, `bussards` (the collectors pulse). | `saucer`, `bridge`, `sensor_dome`, `impulse`, `impulse_exhaust`, `neck`, `torpedo_launcher`, `secondary_hull`, `deflector`, `shuttle_bay`, `pylon_port`, `pylon_starboard`, `nacelle_port`, `nacelle_starboard`, `bussard_port`, `bussard_starboard`, `grille_port`, `grille_starboard`, `windows` | | `builtin:galaxy_class` | The Galaxy-class starship of The Next Generation (USS Enterprise NCC-1701-D): 642.5 m long, about 470 m across the saucer, the bow toward +z. One animation clip, `bussards`. | the same names as the Constitution, without `sensor_dome` | | `builtin:deep_space_nine` | Deep Space 9 (Terok Nor), the Cardassian station of Deep Space Nine: 1452 m across, the docking pylons 969 m tip to tip. | `ops`, `upper_core`, `promenade`, `lower_core` (its bottom tip), `sail_towers`, `spokes` (three thin ones, between the bridges), `habitat_ring`, `docking_ring`, `crossover_bridges` (three), `docking_ports`, `windows`, `upper_pylon_1` to `upper_pylon_3` and `lower_pylon_1` to `lower_pylon_3` (their tips) | | `builtin:earth_spacedock` | Earth Spacedock, from Star Trek III: The Search for Spock onward: 3800 m across and about 5480 m tall. | `antennas` (the top), `cap`, `space_doors` (the front door), `underdish`, `neck`, `hull`, `stem`, `base` (the sphere), `towers` (their tips, the bottom), `panels`, `windows` | | `builtin:utopia_planitia_drydock` | A drydock of the Utopia Planitia Fleet Yards over Mars, sized for a Galaxy-class ship: about 760 m long, the bow end toward +z. Place several for the yards. | `frame` (ribs and rails), `deck`, `keel`, `lights`, `berth` (where a ship sits), `bow`, `stern` | ## cube **A Borg cube, the same one as the [Borg screen effect](/core/borg) draws, or a plain shaded box.** It has machinery carved into every face, a rail lattice over it, green light from the recesses and glow spots pulsing deep inside. - It sits in the scene like any object: it turns with `rotation` and `spin`, other objects pass into its recesses, and labels behind it hide. - For the cube's green halo, put a `glow` at the same point. - For many cubes or a slow tablet, use `detail: false`. ```yaml live type: custom:lcards-astrometrics-card height: 380 camera: views: v: target: [8, 0, 0] yaw: 35 tilt: 20 distance: 75 backdrop: stars: count: 1500 points: - id: cube xyz: [0, 0, 0] - id: name at: cube offset: [0, 18, 0] label: BORG CUBE style: major objects: # the Borg cube with a glow behind it for its halo - type: glow at: cube size: 60 color: var(--lcards-green-medium) opacity: 0.5 - type: cube at: cube size: 20 spin: 5 # a plain box - type: cube shape: box at: [30, -5, 0] size: [8, 4, 12] ``` ::: details More about the cube - **Reduced motion:** the glow spots pulse on the scene clock, so they hold still under reduced motion. - **Cost:** the carved cube costs about as much as the screen effect's cube for the pixels it covers. One cube filling the card is fine on a laptop. ::: | Key | Type | Default | Description | |---|---|---|---| | `shape` | string | `borg` | `borg`: the Borg cube. `box`: a shaded box with its edges | | `size` | number / `[x, y, z]` | `20` | Scene units: one number for a cube, or `[x, y, z]` for a box | | `color` | colour | `var(--lcards-green-medium)` (borg), `var(--lcards-gray-medium)` (box) | `borg`: the light from inside and the hull's tint. `box`: the box | | `glow.color` | colour | `var(--lcards-green-lightest)` | `borg`: the glow spots | | `detail` | boolean | `true` | `borg`: `true` carves the machinery into the faces; `false` draws flat faces with the lattice, for slow graphics hardware | | `seed` | number | `1` | `borg`: where the glow spots sit. A different number moves them | | `edges` | boolean / object | `true` | `box`: draw its edges | | `edges.color` | colour | `theme:colors.ui.secondary` | `box`: the edge colour | | `opacity` | number | `1` | `box`: how see-through it is, `0` to `1`. A Borg cube ignores it | | `occlude` | boolean | `true` | Hide labels and cards behind it | --- # Space Phenomena Things space is full of: gas clouds, asteroid belts and single rocks, comets, galaxies and the Crystalline Entity. The keys every object takes (`id`, `at`, `rotation`, `spin`, `opacity` ...) are on the [Objects](../objects#keys-every-object-takes) page. In the diagram [look](../scene#looks-diagram-and-realistic), a belt, an asteroid, a comet, a galaxy, the Crystalline Entity and a volume nebula are drawn as wireframes. ## nebula **Clouds of gas in the scene, in the look of the nebula background preset.** Use it for a nebula on a star map, a gas cloud round a station, or a storm to fly into. - The clouds are soft puffs that face the camera at slightly different depths, so they shift against each other as the camera turns, and fade as you fly into them. - `render: volume` draws the same clouds as one body of gas you can fly into. Only a volume nebula takes `shape`, `dust`, `density` and `lightning`. - A preset starts you from a named nebula: `badlands` and `badlands_voyager` (the plasma storms of Deep Space Nine and Voyager) or `nexus` (the ribbon from Star Trek Generations). Every key you set wins over the preset's. - The [Effects](../effects#nebula) page has the full guide with more examples: shapes, dust lanes, the Badlands and the Nexus. ```yaml live type: custom:lcards-astrometrics-card height: 320 camera: views: v: target: [0, 0, 0] yaw: 20 tilt: 20 distance: 260 backdrop: stars: count: 2000 objects: # puffs (the default) - type: nebula at: [-75, 0, 0] radius: 70 count: 6 seed: 5 drift: 3 min_radius: 20 max_radius: 40 colors: [var(--lcars-violet), var(--lcars-ice)] # the same kind of clouds as gas you can fly into - type: nebula render: volume at: [75, 0, 0] radius: 70 count: 6 seed: 5 drift: 3 colors: [var(--lcars-orange), var(--lcars-red)] ``` ::: details More about nebulae - **How `count` and `seed` place the clouds:** the seed deals the clouds one after another, each with a colour from `colors`, a spot anywhere in the region (`size` box or `radius` ball), a radius between `min_radius` and `max_radius` and a brightness. Raising `count` adds the next cloud from the same deal and leaves the earlier ones where they were. Overlapping clouds add up, so gas where clouds meet is denser, and a new cloud that lands away from the others reads as a separate nebula. A different `seed` deals a different set; `clouds` places them by hand. - **Never tappable:** clouds never catch a tap, so they never get in the way of points behind them. To label a cloud, put a [point](../points) at the same place. - **Hand-placed clouds:** each entry in `clouds` takes `xyz` (scene units from the object), `radius`, `color`, `opacity`, `size: [width, height, depth]` with `rotation: [x, y, z]` for an ellipsoid, and `dust: true` for a dark dust cloud (volume only). See [Shapes, dust and colour](../effects#shapes-dust-and-colour). - **Presets and your own box:** a preset's box is 500 across (the Nexus: 2000 long). With a `size` of your own, the preset's `drift` and ribbon speed scale with it, so the gas moves as fast for its size; a drift or speed you set stays as written. - **Entities:** `drift` and `density` can [follow an entity](../data#settings-from-entities); they ease to each new value. - **Reduced motion:** the gas holds still. ::: | Key | Type | Default | Description | |---|---|---|---| | `radius` | number | `100` | The clouds fill a ball this big round `at`, scene units | | `size` | number / `[w, h, d]` | - | Or a box, scene units (one number for a cube). Wins over `radius` | | `count` | number | `4` | How many clouds the seed places, 1 to 10 | | `seed` | number | `1` | The same seed always places the same clouds | | `clouds` | list | - | Clouds placed by hand (up to 10 gas and 4 dust clouds), instead of `count` and the seed | | `color` | colour | `var(--lcars-violet)` | Cloud colour when `colors` is not set (a `preset` sets `colors`) | | `colors` | colour / list | `var(--lcars-violet)` | One colour, or a list the seed picks from per cloud. Wins over `color` | | `min_radius` | number | 0.15 of the region | Smallest cloud radius, scene units. 0.25 with `render: volume` | | `max_radius` | number | 0.4 of the region | Largest cloud radius, scene units. 0.55 with `render: volume` | | `brightness` | `[min, max]` | `[0.3, 0.8]` | Each cloud's opacity is picked between these. A cloud's own `opacity` wins | | `turbulence` | number | `0.5` | How ragged the edges are, `0` to `1` | | `noise_scale` | number | about 1.5 cells a cloud | Detail of the gas per scene unit: lower is larger, smoother wisps | | `drift` | number / `[x, y]` | `0` | How fast the gas churns, scene units per second. `[x, y]` gives a direction. `0` is still | | `stretch` | number | `0` | How drawn out each seeded cloud is, `0` (round) to `1` (long and flat), each turned its own way | | `core.color` | colour | - | A colour deep in the gas, running out to the cloud colours at the edges | | `blend` | string | `add` | `add`: light adds up. `normal`: drawn over what is behind | | `render` | string | `puffs` | `puffs`, or `volume`: [gas you can fly into](../effects#gas-you-can-fly-into) | | `density` | number | `1` | `render: volume`: how thick the gas is (`2` is twice as thick) | | `shape` | string | `clouds` | `render: volume`: the form of the gas: `clouds`, `shell`, `bipolar`, `filaments`, `cavity`, `layers` or `wake`. See [Shapes, dust and colour](../effects#shapes-dust-and-colour) | | `dust.count` | number | `0` | `render: volume`: dark dust clouds the seed lays across the gas, 0 to 4 | | `dust.amount` | number | `0.8` | How dark the dust is, `0` to `1` | | `dust.color` | colour | black | The dust's colour | | `preset` | string | - | `badlands`, `badlands_voyager` or `nexus`. See [the Badlands](../effects#the-badlands-layers-columns-and-lightning) and [the Nexus](../effects#the-nexus-a-ribbon-and-its-wake) | | `gap`, `veins`, `band`, `columns` | | | `shape: layers`: see [the Badlands](../effects#the-badlands-layers-columns-and-lightning) | | `ribbon`, `wake` | | | `shape: wake`: see [the Nexus](../effects#the-nexus-a-ribbon-and-its-wake) | | `lightning` | boolean / object | `false` | `render: volume`: strikes in the gas that light it, with the [lightning object's](./lines#lightning) keys | ## belt **An asteroid belt: a band of low-poly rocks round its centre.** Use it round a star or a planet, or as a field of rocks to fly through. - `at` is the centre: a point id or `[x, y, z]`. A point id makes the belt follow a star or planet when it moves. - The belt is lit from its centre, as by its star: the side of each rock facing the centre is bright, the far side dark. - The rocks are one draw, so thousands of them are fine. `rotation` tilts the belt and `spin` turns it as one piece. ```yaml live type: custom:lcards-astrometrics-card height: 320 camera: views: v: target: [0, 0, 0] yaw: 20 tilt: 22 distance: 150 points: - id: sun xyz: [0, 0, 0] label: SOL style: minor objects: - type: glow at: sun size: 40 color: var(--lcars-yellow) - type: sphere at: sun radius: 6 fill: color: var(--lcars-yellow) color: var(--lcars-orange) line_spacing_deg: 30 - type: belt at: sun radius: [45, 62] count: 1500 size: [0.3, 1.8] period: 40 colors: - var(--lcards-gray-light) - var(--lcards-gray-medium) - var(--lcards-yellow-dark) ``` Close up, the rocks are rough and faceted: ```yaml live type: custom:lcards-astrometrics-card height: 300 camera: views: v: target: [50, 0, 0] yaw: 250 tilt: 10 distance: 16 objects: - type: glow size: 30 color: var(--lcars-yellow) - type: belt radius: [44, 56] thickness: 4 count: 1500 size: [0.2, 1.6] tumble: 20 color: var(--lcars-khaki) ``` ::: details More about belts - **Orbits:** with `period`, the rocks at the inner edge go round once in that many seconds, and the outer rocks take longer, as real orbits do. - **Entities:** `radius` (each edge too), `thickness` and `count` can [follow an entity](../data#settings-from-entities). They change in place and ease: the band widens, thins or fills round the same rocks. - **From far away:** when even the largest rocks would be under about 1.5 px, the rocks are drawn as dots of the same size and shade (cheaper, and it looks the same). Zoom in and they are rocks again. - **Reduced motion:** `period` and `tumble` hold still. ::: | Key | Type | Default | Description | |---|---|---|---| | `radius` | number / `[inner, outer]` | `[80, 100]` | The band's inner and outer radius, scene units. One number is the outer radius, and the inner is 0.8 of it | | `thickness` | number | 0.15 of the band's width | How far the rocks spread above and below the plane, scene units | | `count` | number | `600` | How many rocks, at most 5000 | | `size` | number / `[smallest, largest]` | `[0.4, 1.6]` | Rock size, scene units: many small ones and a few large. One number is the largest, and the smallest is a quarter of it | | `seed` | number | `1` | A different number gives a different belt; the same config always gives the same one | | `period` | number | `0` | Seconds for the inner edge to go round once. `0` is still | | `tumble` | number | `30` | How fast each rock turns on its own axis, degrees per second (each a little faster or slower). `0` is still | | `color` | colour | `var(--lcards-gray-light)` | The rocks' colour, varied a little per rock | | `colors` | list | - | Several rock colours: each rock takes one, picked by the seed. Wins over `color` | ## asteroid **One rock for a close look: a single asteroid, a moonlet, a rock by a station.** For many rocks round a centre, use a [belt](#belt). - Set `light` to its star (a point id or `[x, y, z]`). The side facing it is lit and the far side dark, with a hard edge between them. - `tumble` turns it on its own axis; `spin`, `face` and `rotation` turn it as they turn any object. ```yaml live type: custom:lcards-astrometrics-card height: 320 camera: views: v: target: [0, 0, 0] yaw: 30 tilt: 12 distance: 30 points: - id: sun xyz: [-70, 20, 40] - id: rock_label xyz: [0, 9, 0] label: 433 EROS style: minor objects: - type: glow at: sun size: 14 color: var(--lcars-yellow) - type: asteroid id: eros size: 16 seed: 4 tumble: 12 light: sun ``` ::: details More about asteroids - **The shape:** the rock has broad lumps, craters and fine roughness, stretched its own way, with flat faces that catch the light. - **From far away:** when it would be under about 1.5 px, it is drawn as a dot, as bright as its lit part seen from where you are. - **Reduced motion:** `tumble` holds still. ::: | Key | Type | Default | Description | |---|---|---|---| | `size` | number | `4` | Largest extent, scene units | | `seed` | number | `1` | A different number gives a different rock; the same config always gives the same one | | `tumble` | number | `10` | How fast it turns on its own axis (picked by the seed), degrees per second. `0` is still | | `light` | id / `[x, y, z]` | the frame's origin | Where the light comes from: a point id (a star that moves too) or `[x, y, z]`. Left out, the scene's origin, or the star of the [system](../scale#the-system-object) it is in | | `color` | colour | `var(--lcards-gray-light)` | The rock's colour on its lit side | | `occlude` | boolean | `true` | Hide labels and cards behind it | ## comet **A comet: a small dark nucleus, a glowing coma round it and two tails that always point away from its star.** Use it on an orbit through a star system, or as a single visitor in a close-up. - Set `light` to the star (a point id or `[x, y, z]`). The tails point away from it and the nucleus is lit from it. - There are two tails: a straight, bluish ion tail and a broader dust tail that bends back along the comet's path as it moves. - `activity.mode: distance` makes the comet grow and brighten near its star and fade away from it. - `face`, `spin` and `rotation` turn the nucleus, never the tails. On an orbit centred off its star, this comet swings in, grows its tails and brightens, then fades as it swings out: ```yaml live type: custom:lcards-astrometrics-card height: 360 camera: views: v: target: [30, 0, 0] yaw: 0 tilt: 55 distance: 330 points: - id: sun xyz: [0, 0, 0] label: STAR style: minor - id: comet_at polar: [100, 300] object: orbit objects: - type: glow at: sun size: 40 color: var(--lcars-yellow) - type: ring id: orbit at: [75, 0, 0] radius: 100 spin: 10 width: 1 color: theme:colors.ui.secondary opacity: 0.4 - type: comet at: comet_at light: sun tail: length: 90 coma: size: 8 activity: mode: distance range: [25, 175] ``` ::: details More about comets - **Activity by distance:** with `activity.mode: distance`, the coma, the tails and the glow are scaled every frame: full at the near end of `range` and closer, falling with the square of the distance, and gone at the far end. - **Entities:** `nucleus.size`, `coma.size`, `tail.length` and `glow` can [follow an entity](../data#settings-from-entities); they change in place. - **Motion:** the tails stream with the scene clock. Under reduced motion they hold still, and so does the nucleus's tumble. ::: | Key | Type | Default | Description | |---|---|---|---| | `light` | id / `[x, y, z]` | the frame's origin | The star: a point id or `[x, y, z]`. Left out, as for an [asteroid](#asteroid) | | `color` | colour | `var(--lcards-moonlight)` | The coma and the dust tail, unless they set their own | | `nucleus.size` | number | `2` | The nucleus's largest extent, scene units | | `nucleus.color` | colour | `var(--lcards-gray-medium-dark)` | The nucleus's colour | | `nucleus.tumble` | number | `10` | How fast the nucleus turns, degrees per second. `0` is still | | `coma.size` | number | `10` | The diameter of the glowing cloud round the nucleus, scene units | | `coma.color` | colour | `color` | The coma's colour | | `tail.length` | number | `60` | How far the tails reach away from the star, scene units. The dust tail fades sooner | | `ion_tail` | boolean / object | `true` | The straight ion tail. `false` turns it off | | `ion_tail.color` | colour | `var(--lcards-blue-medium)` | The ion tail's colour | | `dust_tail` | boolean / object | `true` | The broad dust tail. `false` turns it off | | `dust_tail.color` | colour | `color` | The dust tail's colour | | `glow` | number | `1` | Opacity of the coma and the tails, `0` to `1`. The nucleus stays | | `activity.mode` | string | `fixed` | `fixed`: as set. `distance`: grows and brightens near its star | | `activity.range` | `[near, far]` | `[50, 300]` | With `mode: distance`: full at `near` and closer, gone at `far`, scene units (the system's, in a system) | | `seed` | number | `1` | A different number gives a different nucleus and tails | ## galaxy **A spiral galaxy in 3D, made of seeded stars. By default it is the Milky Way.** Use it as the map behind a galaxy-scale scene, with your points on it. - Everything scales with `radius`: 50,000 by default, which is light years with `units: ly`. - The Sun's place is 0.52 of the radius toward bearing 180 (`polar: [26000, 180]` at the default size), where a scene puts its Sol point. - `arms.count` (1 to 8) makes a generic spiral of equal arms instead of the Milky Way. - Every star is at its own place, so the galaxy shows parallax as you fly through it. ```yaml live type: custom:lcards-astrometrics-card height: 360 units: ly camera: views: v: target: [0, 0, 0] yaw: 20 tilt: 40 distance: 120000 points: - id: sol polar: [26000, 180] marker: dot label: SOL objects: - type: galaxy stars: count: 30000 ``` ::: details More about the galaxy - **What it is made of:** the stars are points of light at any distance, as the backdrop's, along a central bar, a bulge, spiral arms and a thin disc. A soft glow runs along the arms and at the core, with darker dust lanes on the arms' inner edges. - **The Milky Way:** the default has the bar, the two major arms (Scutum-Centaurus and Perseus) from its ends, the two minor arms (Sagittarius and Norma) between them, and the Orion spur where the Sun is. - **The bar:** the arms start at the ends of the bar and turn with it when you change `bar.angle`. - **From far away:** fewer of the stars draw. ::: | Key | Type | Default | Description | |---|---|---|---| | `radius` | number | 50,000 light years | The disc's radius: `50000` in plain scene units or `ly`, converted for other named [units](../scale#units) | | `thickness` | number | `0.02` | The disc's thickness as a fraction of the radius, up to `0.5` | | `arms.count` | number | - | A spiral of this many equal arms, 1 to 8. Leave it out for the Milky Way | | `arms.pitch` | number | `12` | How tightly the arms wind, degrees, 4 to 45. Larger opens them | | `arms.color` | colour | `var(--lcars-blue)` | The colour the arm stars lean toward, and the arms' glow | | `bar.length` | number | `0.32` | The bar's half-length as a fraction of the radius, up to `0.8`. `0` is no bar | | `bar.angle` | number | `153` | The bearing of the bar's near end, degrees: 27 degrees off the line to the Sun, as in the Milky Way | | `stars.count` | number | `40000` | How many stars, at most 100,000 | | `stars.color` | colour | `var(--lcards-moonlight)` | The stars' base colour | | `seed` | number | `3` | A different number gives a different scatter of stars | | `core.color` | colour | `var(--lcars-yellow)` | The bulge and bar stars and the core's glow | | `glow` | number | `0.6` | Opacity of the glow along the arms and at the core, `0` to `1`. `0` is none | | `dust.amount` | number | `0.5` | Opacity of the dust lanes, `0` to `1`. `0` is none | | `dust.color` | colour | the background colour | The dust lanes' colour | ## crystalline **The Crystalline Entity (Star Trek: The Next Generation, "Datalore" and "Silicon Avatar"), made in code.** Use it beside a ship or a planet for an encounter scene. - `size` is its height along the spine (the object's y axis). It fits inside a spindle `size` tall and 0.8 of that across. - It needs no light: it is lit from inside by its core. It is see-through, so it hides no labels. - `spin` turns it slowly about its spine; `face` and `rotation` turn it as they turn any object. The example puts the Constitution-class ship beside it at its real size (305 m, in a scene in [`units: km`](../scale#units)), and a beam from the entity's core to the ship: ```yaml live type: custom:lcards-astrometrics-card height: 380 units: km camera: views: v: target: [-0.8, 0, 0] yaw: 0 tilt: 5 distance: 5 points: - id: entity_at xyz: [0, 0, 0] - id: ship_at xyz: [-2.1, -0.1, 0.3] label: USS ENTERPRISE style: minor objects: - type: crystalline id: entity at: entity_at spin: 2 - type: model id: ship src: builtin:constitution_class_refit at: ship_at - type: beam from: entity_at to: ship_at width: 10 color: var(--lcards-moonlight) pulse: true ``` ::: details More about the Crystalline Entity - **The shape:** a glowing faceted spine along the object's y axis, a starburst core at its middle with crystal spikes round it, and branches in tiers round the spine that fork again and again, bending a little at each joint and ending in Y-shaped tips and thorns. - **The crystal:** glassy and see-through, lit from inside by the core, with bright edges. The same `seed` always gives the same entity. - **Its size:** no canon size exists. The production design was two or three Enterprise-D lengths (642 m each), and on screen it dwarfs the ship, so the default is 3 km. - **From far away:** when it would be under about 10 px tall, it is drawn as a dot in the core colour. Nearer, the finer forks draw only once it is large enough on screen to show them. - **Entities:** `glow` and `opacity` can [follow an entity](../data#settings-from-entities) in place, and a new `color` crossfades in as every object's does. - **Reduced motion:** the core's pulse and the spin hold still. ::: | Key | Type | Default | Description | |---|---|---|---| | `size` | number | 3 km | Height along the spine: `3` with `units: km`, converted for other named units, `3000` in plain scene units | | `seed` | number | `7` | A different number gives a different branching | | `branches` | number | `4` | How many times the branches fork, 1 to 5. Each level is smaller; the last are thorns | | `color` | colour | `var(--lcards-blue-medium)` | The crystal's colour; its edges lean toward the core colour. `var(--lcars-african-violet)` gives the lavender of the show | | `glow` | number | `0.7` | How brightly the core shines and how far its light reaches, `0` to `1`. `0`: a dim core and only the edges lit. `1`: a large bright core lighting the inner branches | | `opacity` | number | `1` | `0` to `1` | | `blend` | string | `add` | `add`: overlapping crystal glows. `normal`: drawn over what is behind it | | `core.color` | colour | `var(--lcards-moonlight)` | The starburst's rays and the light along the spine | | `core.period` | number | `6` | Seconds per slow pulse of the core. `0` holds it steady | --- # Grids, Spheres and Volumes Surfaces and regions: wireframe grids of every shape, planets and globes, see-through territories, rings, and your own pictures on the plane. The keys every object takes (`id`, `at`, `rotation`, `spin`, `opacity`, `visible` ...) are on the [Objects](../objects#keys-every-object-takes) page. ## grid **A see-through wireframe surface: a flat map, a galaxy disc, a sky dome, a tube or a funnel.** `shape` picks the surface, and each shape has its own size keys. - On the curved shapes (`dome`, `sphere`, `cylinder` and `well`), `line_spacing_deg` is easier than `line_spacing`: it puts rings and meridians every N degrees, and always fits a whole number round, so there is no seam. - A disc with `radius: [inner, outer]` has a hole in the middle. - Any shape can be [deformed](#deformed-grids), and a plane can be a lettered [sector map](#sector-maps). A funnel is a [well](#wells-and-wormholes). ```yaml live type: custom:lcards-astrometrics-card height: 320 camera: views: v: target: [0, 20, 0] yaw: 30 tilt: 25 distance: 230 objects: # a polar disc with bearing labels round its rim - type: grid shape: disc radius: 60 at: [-70, 0, 0] pattern: polar line_spacing: 10 spoke_count: 24 ring_labels: step: 45 style: tiny # a dome, lines every 15 degrees - type: grid shape: dome radius: 45 at: [50, 0, 0] line_spacing_deg: 15 color: var(--lcars-blue) # a cylinder - type: grid shape: cylinder radius: 15 height: 60 at: [0, 30, -70] line_spacing_deg: 30 color: var(--lcars-orange) ``` ::: details More about grid - **The same names as the background grid:** `pattern`, `line_spacing`, `line_width`, `color`, `major`, `spoke_count`, `hex_radius`, `dot_radius` and `back_opacity` mean what they mean on the [background grid](/core/effects/background-animations/preset-reference#grid), measured in scene units instead of px (widths stay in px). - **Edges:** `edges` outlines the open edges: the rim of a disc, dome or well, the ends of a cylinder, the frame of a plane. A grid sphere has no open edge. - **Polar lines on a curved shape:** with `pattern: polar`, `spoke_count` sets how many meridians go round; without it, there is one every `line_spacing_deg`. - **A solid planet** is a [sphere](#sphere): a grid with `shape: sphere` is a see-through wireframe ball. - **Fills and scan bands:** `fill.effect` paints an [animated fill](../effects#animated-surface-fills) under the lines, and `scan` sends a [scan band](../effects#scan-bands) across them. ::: | Key | Type | Default | Description | |---|---|---|---| | `shape` | string | `plane` | `plane`, `disc`, `dome` (a half sphere), `sphere`, `cylinder` or `well` (a funnel) | | `size` | number / `[w, d]` | `200` | `plane`: width and depth, scene units. One number is a square | | `radius` | number / `[inner, outer]` | `100` | Every shape but `plane`: the radius (a well's rim), scene units. A disc also takes `[inner, outer]` for a hole | | `height` | number | the radius | `cylinder`: its height, scene units | | `depth` | number | the radius | `well`: how far down it goes from the rim, scene units | | `well` | object | trumpet | `well`: the funnel's profile, see [Wells and wormholes](#wells-and-wormholes) | | `pattern` | string | `both`; `polar` on a disc | `both` (rows and columns), `horizontal`, `vertical`, `diagonal`, `hexagonal`, `dots` or `polar` (rings and spokes) | | `line_spacing` | number | plane `10`, disc radius / 10, curved 15 degrees of arc | Distance between lines, scene units | | `line_spacing_deg` | number | `15` on curved shapes | Curved shapes: rings and meridians every N degrees. Disc: a spoke every N degrees (wins over `spoke_count`) | | `spoke_count` | number | disc `36`, plane `12`, curved one every `line_spacing_deg` | `pattern: polar`: spokes round the centre (meridians on a curved shape) | | `hex_radius` | number | `line_spacing` | `pattern: hexagonal`: hexagon size, scene units | | `dot_radius` | number | 8% of `line_spacing` | `pattern: dots`: dot radius, scene units | | `line_width` | number | `1` | Line width, px | | `color` | colour | `theme:colors.ui.tertiary` | Line colour | | `major.row_interval` | number | `0` | A brighter, wider line every N rows (rings on a disc). `0`: none | | `major.col_interval` | number | `0` | The same every N columns (spokes on a disc) | | `major.line_width` | number | 1.5 x `line_width`, at least `1.5` | Major line width, px | | `major.color` | colour | `color`, brighter | Major line colour | | `back_opacity` | number | plane and disc `1`, curved `0.25` | Opacity of the far side seen through the surface, `0` to `1`. `0` hides it | | `fill.color` | colour | none | A colour behind the lines | | `fill.effect` | object | - | An [animated fill](../effects#animated-surface-fills) under the lines | | `edges` | boolean / object | `true` | Outline the open edges. `false` for none, or the keys below | | `edges.width` | number | `major.line_width` | Edge width, px | | `edges.color` | colour | `major.color`, else `color` | Edge colour | | `ring_labels.step` | number | `10` | Every shape but `plane`: a bearing label every N degrees round it, in the object's level plane (the rim of a disc, dome or well, a sphere's equator, the middle of a cylinder) | | `ring_labels.radius` | number | 1.06 x `radius` | How far out the labels sit, scene units | | `ring_labels.start` | number | `0` | The first bearing labelled, degrees | | `ring_labels.alt` | number | `0` | Height of the labels above the plane, scene units | | `ring_labels.style` | string | `minor` | Label style (built in or from `labels.styles`) | | `ring_labels.color` | colour | - | Label colour | | `ring_labels.text` | object | - | Text keys for every label, under `text.default` (font, size, background ...) | | `blend` | string | `normal` | `add`: light adds up where lines cross, so they glow | | `scan` | object | off | A [scan band](../effects#scan-bands) sweeping across the lines: `scan.period` (seconds per sweep) and `scan.color` | | `deform` | list | - | Warps of the surface, see [Deformed grids](#deformed-grids) | | `axis_labels`, `cells` | object, list | - | `plane`: a lettered map, see [Sector maps](#sector-maps) | ### Wells and wormholes **`shape: well` is a funnel down from its rim: a gravity well, a cone, a bowl or a wormhole.** The rim sits at the object's position and the funnel goes down `depth` from there. - `well.shape` picks a named profile and `well.throat` sets how narrow it gets. For any other profile, list its widths from the rim down in `well.profile`. - `edges` draws the rim and, when the bottom is open, the bottom opening too. ```yaml live type: custom:lcards-astrometrics-card height: 320 camera: views: v: target: [0, -40, 0] yaw: 20 tilt: 25 distance: 260 objects: # a disc with a hole, and a gravity well hanging from it - type: grid shape: disc radius: [50, 60] at: [-65, 0, 0] pattern: polar spoke_count: 24 line_spacing: 5 - type: grid shape: well radius: 50 depth: 60 at: [-65, 0, 0] line_spacing_deg: 15 # a wormhole: two trumpets throat to throat - type: grid shape: well well: shape: wormhole throat: 0.25 radius: 40 depth: 110 at: [65, 0, 0] line_spacing_deg: 20 color: var(--lcars-blue) ``` ::: details More about wells - **Any profile:** a profile can narrow several times, and values above `1` bulge past the rim. `[0.1, 0.7, 1, 0.85, 0.45, 0.1]` is a rounded lobe with a neck at each end; the [Bajoran wormhole starter](../starters#bajoran-wormhole) chains three. - **Even rings:** the rings are spaced evenly along the surface, however steep it gets. - **The named shapes never bulge:** they stay inside the rim all the way down. ::: | Key | Type | Default | Description | |---|---|---|---| | `radius` | number | `100` | The rim's radius, scene units | | `depth` | number | the radius | How far down it goes, scene units | | `well.shape` | string | `trumpet` | `trumpet` (a gravity well: flat at the rim, plunging to the throat), `cone`, `bowl` (round at the bottom) or `wormhole` (two trumpets throat to throat, the throat halfway down) | | `well.throat` | number | `0.15` | The throat's width as a fraction of the rim, `0.02` to `1` | | `well.profile` | list | - | Any profile: widths as fractions of the rim, from the rim down, evenly spaced along the depth (2 to 32 values). A smooth curve passes through each. `[1, 0.2, 1]` is an hourglass. Replaces `well.shape` | #### Opening and closing **`well.to` is a second shape and `well.morph` how far the well has changed into it, from `0` to `1`: a wormhole that opens and closes.** Bind `well.morph` to an entity and the funnel eases between the two shapes in place, without being rebuilt. - A needle, `well.to` with `profile: [0.02, 0.02]`, closes the well: the funnel draws into its centre, which stays put. - `depth` follows an entity in place too, so a well can sink or flatten as it opens. - A `deform` (a twist, a wobble) follows the new shape as it changes. ```yaml live controls type: custom:lcards-astrometrics-card height: 320 camera: views: v: target: [0, -30, 0] yaw: 20 tilt: 20 distance: 180 objects: - type: grid shape: well radius: 50 # deeper as power rises depth: entity: input_number.lcards_test_power input: [0, 100] output: [20, 70] smooth: 800 well: shape: trumpet throat: 0.1 # closed: a needle to: profile: [0.02, 0.02] # power 100 % is open, 0 closed morph: entity: input_number.lcards_test_power input: [0, 100] output: [1, 0] smooth: 800 deform: - type: twist angle: 60 anchor: top color: var(--lcars-blue) ``` ::: details More about morphing wells - **Both shapes have the same rings:** the rim, the throat and every ring between them move to their place in the other shape, so a trumpet can morph into a bowl or a cone as well as close. - **The swirl fill** of a `fill.effect` follows the new depth (it thins out down the throat). ::: | Key | Type | Default | Description | |---|---|---|---| | `well.to` | object | - | The shape it morphs toward | | `well.to.shape` | string | the well's shape | `trumpet`, `cone`, `bowl` or `wormhole` | | `well.to.throat` | number | the well's throat | Its throat's width as a fraction of the rim, `0.02` to `1` | | `well.to.profile` | list | - | Its profile: widths as fractions of the rim from the rim down. Replaces `well.to.shape` | | `well.morph` | number | `0` | How far the well has changed into `well.to`, `0` to `1`. Eases in place when it follows an entity | | `depth` | number | the radius | Eases in place when it follows an entity | #### Two mouths, one wormhole **Two wells [facing](../objects#facing-a-point) each other make one wormhole: a mouth at each end, and a line from throat to throat as the throat stretched thin between them.** Each end of the line is a point standing on its well at `[0, -depth, 0]`, the bottom of the well's axis. ```yaml live type: custom:lcards-astrometrics-card height: 320 camera: views: v: target: [0, 0, 0] yaw: 0 tilt: 25 distance: 340 points: - id: alpha xyz: [-110, 0, 0] - id: gamma xyz: [110, 0, 0] # the bottom of each well - id: alpha_throat object: mouth_alpha xyz: [0, -50, 0] - id: gamma_throat object: mouth_gamma xyz: [0, -50, 0] objects: - type: grid id: mouth_alpha shape: well well: throat: 0.1 radius: 40 depth: 50 at: alpha face: gamma line_spacing_deg: 20 color: var(--lcars-blue) - type: grid id: mouth_gamma shape: well well: throat: 0.1 radius: 40 depth: 50 at: gamma face: alpha line_spacing_deg: 20 color: var(--lcars-blue) # the throat between them - type: path points: [alpha_throat, gamma_throat] dash: pattern: [6, 4] speed: 30 color: var(--lcars-yellow) width: 2 ``` ::: details Lining a mouth up with an arched path - **Where an arch points:** an arched path (`arc`) leaves each end rising. It climbs about 3.14 times its `arc` over the distance between the ends. - **Aiming the mouth:** to line a mouth up with it, face a point that much above the far end. For an `arc` of 4000, that is a point `aim` with `at: gamma` and `offset: [0, 12566, 0]`. The [Star Trek galaxy starter](../starters#star-trek-galaxy)'s Bajoran wormhole is built this way. ::: ### Deformed grids **`deform` warps a grid's surface: a wobbling jelly, a tornado, a whirlpool, rolling hills.** It is a list of deformations applied in order, on any grid shape and on a [sphere](#sphere). - On a cylinder, sphere, dome or well a deformation works round the axis; on a plane or disc it moves the surface up and down. - `wobble` sends bulges round (ripples across a flat grid), `bend` bends the axis (a flat sheet curls), `twist` turns the far end more than the near one (a whirlpool on a flat grid), and `noise` adds smooth lumps. - A deformation stands still until you give it a `period` (seconds per cycle) or, for `noise`, a `drift`. - The lines are painted on the surface and stretch with it. Edges, cell fills and points standing on the grid (`object: `) move with it too. ```yaml live type: custom:lcards-astrometrics-card height: 340 camera: views: v: target: [0, 30, 0] yaw: 15 tilt: 15 distance: 300 objects: # jelly: a wobbling cylinder - id: jelly type: grid shape: cylinder radius: 25 height: 70 at: [-85, 35, 0] line_spacing_deg: 20 color: var(--lcars-orange) deform: - type: wobble amplitude: 0.15 lobes: 3 waves: 1 period: 4 # a tornado: a twisted well whose bend turns round - id: tornado type: grid shape: well well: profile: [1, 0.35, 0.15, 0.08] radius: 40 depth: 110 at: [0, 110, 0] line_spacing_deg: 20 color: var(--lcars-blue) deform: - type: twist angle: 120 anchor: top - type: bend amplitude: 0.5 motion: circle period: 7 anchor: top # a whirlpool: a twisted disc with ripples - id: whirlpool type: grid shape: disc radius: 45 at: [85, 0, 0] pattern: polar spoke_count: 18 line_spacing: 6 deform: - type: twist angle: 150 - type: wobble amplitude: 0.06 lobes: 0 waves: 3 period: 2.5 ``` ::: details More about deformed grids - **Sizes:** amplitudes are fractions of the grid's size: its radius, or half a plane's longer side. - **Picking in the Studio:** picking a point on a deformed grid gives its place on the undeformed grid. - **Reduced motion:** moving deformations run on the scene clock and hold still under reduced motion. - **Cost:** a deformed grid is drawn with finer patches than a plain one and is moved on the processor each frame while it moves; drifting `noise` costs the most. ::: | Key | Type | Default | Description | |---|---|---|---| | `type` | string | required | `wobble`, `bend`, `twist` or `noise` | | `amplitude` | number | wobble `0.08`, bend `0.25`, noise `0.05` | How far the surface moves, a fraction of the grid's size | | `period` | number | `0` | `wobble`, `bend`, `twist`: seconds per cycle (a bulge travels round once, a sway goes to and fro, the bend turns once, the twist swings). `0`: a still shape | | `lobes` | number | `3` | `wobble`: bulges round the circumference. `0` swells the whole ring at once; on a flat grid, ripples ring out from the centre | | `waves` | number | `1` | `wobble`: waves along the axis (out from the centre of a flat grid), so the bulges spiral | | `bearing` | number | `0` | `bend`: the direction it bends toward, degrees (0 north, clockwise from above) | | `motion` | string | `sway` | `bend`: `sway` (to and fro), `circle` (the bend turns round, a tornado) or `none` (a still bend) | | `angle` | number | `90` | `twist`: degrees turned at the far end (at the centre of a flat grid). With a `period`, the twist swings between plus and minus this | | `anchor` | string | `bottom` | `bend`, `twist` round an axis: the end that stays put, `bottom`, `top` or `middle` (both ends move) | | `base_frequency` | number | about 3 lumps across the grid's size | `noise`: detail per scene unit; lower is larger lumps, as on [fills](../effects#animated-surface-fills) | | `num_octaves` | number | `2` | `noise`: layers of finer detail, `1` to `6` | | `drift` | number | `0` | `noise`: how fast the lumps drift through the grid, scene units per second | | `seed` | number | `0` | `noise`: changes the pattern | ### Sector maps **A plane grid with named columns and rows, like a printed map: AF3 is column AF, row 3.** Use it for a sector chart with filled territories and places named by their cell. - `axis_labels` writes the column names along the top (north) edge and the row names down the left edge. - `cells` fills ranges of cells: each entry fills a rectangle `from` one corner cell `to` the other, or one `cell`. - A point stands in the middle of a cell with `cell: AF3` and `object: `. The [sector map starter](../starters#sector-map) shows a full map. ```yaml live type: custom:lcards-astrometrics-card height: 340 camera: view: map views: map: target: [0, 0, 0] tilt: 90 distance: 300 projection: orthographic points: - id: outpost cell: AF3 object: sectors marker: diamond label: OUTPOST objects: - type: grid id: sectors shape: plane size: [240, 160] line_spacing: 20 axis_labels: column_start: AD cells: # a territory with a shaded, outlined look - from: AE2 to: AG5 color: var(--lcars-blue) opacity: 0.3 shade: 0.4 edges: true # one cell - cell: AK7 color: var(--lcars-orange) opacity: 0.4 ``` ::: details More about sector maps - **Without `axis_labels`:** cells and `cell:` points still work, named from A1 in the top left; only the labels are missing. - **Shading:** with `shade`, each cell is a little lighter or darker than its neighbours. The same cell always gets the same shade, and `seed` picks a different set. - **Out of range:** a range that runs past the edge of the grid is cut at the edge. ::: | Key | Type | Default | Description | |---|---|---|---| | `axis_labels.columns` | string | `letters` | How columns are named: `letters` or `numbers` | | `axis_labels.rows` | string | `numbers` | How rows are named: `letters` or `numbers` | | `axis_labels.column_start` | string / number | `A` or `1` | The first column's name, such as `AD` | | `axis_labels.row_start` | string / number | `1` or `A` | The first row's name | | `axis_labels.pad` | number | the widest label, at least 2 | Zero-pad numbers to this many digits (01, 02 ...). `0` turns it off | | `axis_labels.every` | number | `1` | Label every Nth column and row | | `axis_labels.offset` | number | 0.6 x `line_spacing` | How far outside the edge the labels sit, scene units | | `axis_labels.style` | string | `tiny` | Label style (built in or from `labels.styles`) | | `axis_labels.color` | colour | - | Label colour | | `axis_labels.text` | object | - | Text keys for every label, under `text.default` | | `cells[].from` | string | - | The first corner cell of a range, such as `AF3` | | `cells[].to` | string | `from` | The opposite corner cell | | `cells[].cell` | string | - | One cell, instead of `from` and `to` | | `cells[].color` | colour | `var(--lcars-blue)` | Fill colour | | `cells[].opacity` | number | `0.25` | Fill opacity, `0` to `1` | | `cells[].shade` | number | `0` | How much each cell's brightness varies, `0` to `1` | | `cells[].seed` | number | `0` | Changes which cells are lighter and darker with `shade` | | `cells[].edges` | boolean / object | off | An outline round the range: `true`, or the keys below | | `cells[].edges.width` | number | `1.5` | Outline width, px | | `cells[].edges.color` | colour | the fill colour | Outline colour | | `cells[].edges.opacity` | number | `0.9` | Outline opacity, `0` to `1` | ## volume **A see-through box of grid cells: a territory, a sector of space, a restricted zone.** Its faces are grids, its edges are drawn brighter, and you can see through it. - `shape: sector` is a slice of a disc round the object's place: between two radii, two bearings and two heights. A sector's second bearing may pass 360, so it can cross north. - `shape: box` is a box of `size` centred on `at`. `shape: prism` is any border you draw (`outline`) between two heights, for territories that are not pie slices. - In the Astrometrics Studio you can [draw and drag a prism's outline on the preview](../start#the-studio). ```yaml live type: custom:lcards-astrometrics-card height: 300 camera: views: v: target: [0, 5, 0] yaw: 200 tilt: 30 distance: 215 objects: - type: grid shape: disc radius: 80 pattern: polar line_spacing: 20 spoke_count: 12 # a sector, with its own cell sizes - type: volume shape: sector radius: [30, 75] angle: [100, 170] height: [0, 20] cells: ring: 9 angle: 10 layer: 10 color: var(--lcars-blue) # a box - type: volume shape: box at: [-40, 10, -30] size: [30, 20, 20] color: var(--lcars-orange) # a prism with a drawn border - type: volume shape: prism at: [-35, 0, 35] height: [0, 12] outline: - [-20, -10] - [5, -18] - [22, -2] - [12, 16] - [-14, 14] color: var(--lcars-green) ``` ::: details More about volume - **The outline:** a prism's `outline` needs at least three `[x, z]` points, in order round the border and measured from `at`. -z is north. A prism without a usable outline is drawn as a sector. - **Wireframe by default:** `back_opacity` is `1`, so the far faces show as brightly as the near ones. Lower it to dim the far faces, so the near ones stand out. - **Scan bands:** `scan` sweeps a [scan band](../effects#scan-bands) down the walls, top to bottom. ::: | Key | Type | Default | Description | |---|---|---|---| | `shape` | string | `sector` | `sector`, `box` or `prism` | | `radius` | `[inner, outer]` | `[50, 100]` | `sector`: the two radii, scene units | | `angle` | `[from, to]` | `[0, 90]` | `sector`: the two bearings, degrees clockwise from north | | `height` | `[bottom, top]` | `[0, 10]` | `sector` and `prism`: the floor and the ceiling, scene units | | `size` | number / `[w, h, d]` | `20` | `box`: width, height and depth, scene units. One number is a cube | | `outline` | list | - | `prism`: the border as `[x, z]` points from `at`, scene units | | `cells.ring` | number | a quarter of the depth | `sector`: cell size outward, scene units | | `cells.angle` | number | `10` | `sector`: cell width round, degrees | | `cells.layer` | number | half the height | `sector`: cell height, scene units | | `cells.width` | number | box a quarter of the width, prism an eighth | `box` and `prism`: cell size across (along a prism's walls), scene units | | `cells.height` | number | box a quarter of the height, prism half | `box` and `prism`: cell size up, scene units | | `cells.depth` | number | box a quarter of the depth, prism an eighth | `box` and `prism`: cell size along z, scene units | | `color` | colour | `var(--lcars-blue)` | Colour of the faces, and of the edges unless `edges.color` is set | | `line_width` | number | `1` | Face line width, px | | `faces.opacity` | number | `0.45` | Opacity of the face lines, `0` to `1`. The edges stay brighter | | `edges` | boolean / object | `true` | Draw the outline edges. `false` for none, or the keys below | | `edges.width` | number | `1.5` | Edge width, px | | `edges.color` | colour | `color` | Edge colour | | `back_opacity` | number | `1` | Opacity of the far faces, `0` to `1`. `1` is a wireframe with nothing hidden | | `blend` | string | `normal` | `add`: light adds up where lines cross | | `scan` | object | off | A [scan band](../effects#scan-bands) down the walls: `scan.period` and `scan.color` | ## sphere **A planet or globe: latitude and longitude lines over a solid body.** The body hides the lines and objects behind it, so a sphere reads as a solid world. - `image` wraps a map round the body: one of the [built-in planet maps](#built-in-planet-maps), or your own picture. With no map (or for a made-up planet), a [`fill.effect` preset](../effects#planet-types) paints a planet type. - `body: earth` (or any [real body](../scale#the-real-solar-system)) turns the sphere as that body really is at the scene date. - Points with `latlon` and `object: ` stand on it and turn with its `spin`. ```yaml live type: custom:lcards-astrometrics-card height: 300 camera: views: v: target: [0, 0, 0] yaw: 0 tilt: 15 distance: 60 points: - id: base latlon: [15, -20] object: world alt: 0.3 marker: dot label: BASE CAMP color: var(--lcars-orange) objects: - type: sphere id: world radius: 14 spin: 12 lat_step: 15 lon_step: 20 color: var(--lcars-blue) ``` ::: details More about sphere - **Your own map** is an equirectangular picture, longitude 0 in the middle: a path such as `/local/mars.jpg`, or a Home Assistant media item (`media-source://...`). - **A real body:** with `body`, the axis is tilted where the real pole points, the sphere turns once a real sidereal day, and longitude 0 of its map is where the body's prime meridian is, so `latlon` points stand over the real places. `spin` and `rotation` do not apply then. - **Deforming it:** `deform` works as on a [grid](#deformed-grids) sphere, and the body, lines and points on it move together. - **A see-through ball** with no body is a [grid](#grid) with `shape: sphere`. ::: | Key | Type | Default | Description | |---|---|---|---| | `radius` | number | `10` | Radius, scene units | | `line_spacing_deg` | number | `15` | A latitude and a longitude line every N degrees (longitude rounded to fit round) | | `lat_step` | number | `line_spacing_deg` | Latitude lines every N degrees, when different | | `lon_step` | number | `line_spacing_deg` | Longitude lines every N degrees, when different | | `color` | colour | `theme:colors.ui.tertiary` | Line colour | | `line_width` | number | `1` | Line width, px | | `pattern`, `major`, `blend` | | | As on a [grid](#grid) | | `back_opacity` | number | `0` | Opacity of the lines on the far side | | `fill.color` | colour | `black` | The body's colour | | `fill.opacity` | number | `0.85` | The body's opacity, `0` to `1` | | `fill.effect` | object | - | An [animated fill](../effects#animated-surface-fills) or [planet type](../effects#planet-types) painted on the body, in place of `image` | | `image` | string / object | - | A map on the body instead of `fill.color`: the picture, or the two keys below | | `image.src` | string | - | The map: `builtin:`, `/local/...` or `media-source://...` | | `image.opacity` | number | `1` | Map opacity, `0` to `1` | | `occlude` | boolean | `true` | Hide labels behind the sphere. `false` shows them through it | | `body` | string | - | A [real body](../scale#the-real-solar-system): turn the sphere as it really is at the scene date | | `deform` | list | - | Warps of the planet, as on a [grid](#deformed-grids) | | `scan` | object | off | A [scan band](../effects#scan-bands) from pole to pole: `scan.period` and `scan.color` | **The Earth, with your home on it.** `zone.home` has your latitude and longitude, so a point that follows it stands where you live: ```yaml live type: custom:lcards-astrometrics-card height: 320 camera: views: v: target: [0, 0, 0] yaw: -40 tilt: 30 distance: 55 points: - id: home entity: zone.home latlon: entity: zone.home object: earth alt: 0.3 marker: reticle label: HOME overlap: true - id: greenwich latlon: [51.48, 0] object: earth marker: dot label: Greenwich style: tiny objects: - type: sphere id: earth radius: 15 image: builtin:earth_blue_marble line_spacing_deg: 30 color: var(--lcars-blue) ``` ### Built-in planet maps **Planet and moon maps that ship with LCARdS, for a sphere's `image`.** Each is 2048 x 1024 with longitude 0 in the middle, and all are public domain: NASA and USGS imagery is not subject to copyright in the United States. - Saturn, Uranus and Neptune have no public-domain global maps, so use the `ringed_giant`, `ice_giant` and `storm_giant` [planet types](../effects#planet-types) for them. Saturn's rings are a [ring band](#ring-band). - Venus as seen from space (a cloud deck) is the `clouds` planet type; the Venus map shows the surface under the clouds. Deimos has no global map, so give it a grey `fill.color`. ```yaml live type: custom:lcards-astrometrics-card height: 300 camera: views: v: target: [0, 0, 0] yaw: 0 tilt: 12 distance: 120 objects: - type: sphere at: [-45, 0, 0] radius: 9 image: builtin:mercury_messenger line_width: 0.5 spin: 10 - type: sphere at: [-22, 0, 0] radius: 9 image: builtin:venus_magellan line_width: 0.5 spin: 10 - type: sphere at: [0, 0, 0] radius: 9 image: builtin:moon_lroc line_width: 0.5 spin: 10 - type: sphere at: [22, 0, 0] radius: 9 image: builtin:mars_viking line_width: 0.5 spin: 10 - type: sphere at: [45, 0, 0] radius: 9 image: builtin:jupiter_cassini line_width: 0.5 spin: 10 ``` ::: details More about the maps - **No Saturn map:** a 2025 Cassini global map of Saturn exists, but it has gaps at the poles and the rings' shadow across the south, and no clear licence. ::: | `image` | Planet | Source | |---|---|---| | `builtin:earth_blue_marble` | Earth | NASA Earth Observatory, Blue Marble: Next Generation (July 2004) | | `builtin:moon_lroc` | Moon | NASA Scientific Visualization Studio, CGI Moon Kit (Lunar Reconnaissance Orbiter colour) | | `builtin:mercury_messenger` | Mercury | USGS Astrogeology, MESSENGER MDIS colour global mosaic | | `builtin:venus_magellan` | Venus (the surface under its clouds) | USGS Astrogeology, Magellan radar mosaic in synthetic colour | | `builtin:mars_viking` | Mars | USGS Astrogeology, Viking global colour mosaic | | `builtin:jupiter_cassini` | Jupiter | NASA/JPL/Space Science Institute, Cassini map PIA07782 (December 2000) | | `builtin:pluto_new_horizons` | Pluto | USGS Astrogeology, New Horizons global mosaic (July 2017); the far south was never seen and is grey | | `builtin:sun_sdo` | Sun (extreme ultraviolet, the chromosphere; Carrington longitude 0 in the middle) | NASA Scientific Visualization Studio 30362, STEREO EUVI and SDO AIA 304 Å map (2012) | | `builtin:phobos_viking` | Phobos | USGS Astrogeology, Viking orbiter global mosaic | | `builtin:ceres_dawn` | Ceres | USGS Astrogeology, Dawn Framing Camera global mosaic (October 2015) | | `builtin:io_galileo` | Io | USGS Astrogeology, Galileo SSI and Voyager colour merge mosaic | | `builtin:europa_galileo` | Europa | USGS Astrogeology, Voyager and Galileo SSI global mosaic | | `builtin:ganymede_galileo` | Ganymede | USGS Astrogeology, Voyager and Galileo SSI colour mosaic | | `builtin:callisto_galileo` | Callisto | USGS Astrogeology, Voyager and Galileo SSI global mosaic | | `builtin:titan_cassini` | Titan (the surface under its haze, near infrared) | USGS Astrogeology, Cassini ISS global mosaic | | `builtin:triton_voyager` | Triton | USGS Astrogeology, Voyager 2 colour mosaic; most of the north was never seen and is grey | | `builtin:charon_new_horizons` | Charon | USGS Astrogeology, New Horizons global mosaic (July 2017); the far south was never seen and is grey | ## ring **A circle or ellipse: an orbit, a rim, a range ring.** It is a line, drawn with the same [line keys](./lines#line-keys) as a path, so it can be dashed, glow or carry pulses. - `at` is its centre. With a point id the ring follows that point. - `inclination` tilts the ring about its line of nodes, and `node` turns that line: the bearing where an inclined ring crosses the plane. - `orbit: mars` draws a [real body's](../scale#the-real-solar-system) orbit at the scene date instead of a circle you size yourself, and `satellite: iss` an [Earth satellite's](../scale#earth-satellites). ```yaml live type: custom:lcards-astrometrics-card height: 300 camera: views: v: target: [0, 0, 0] yaw: 20 tilt: 30 distance: 170 points: - id: star xyz: [0, 0, 0] marker: reticle label: STAR objects: # a range ring - type: ring at: star radius: 30 color: var(--lcars-blue) # an inclined, dashed ellipse - type: ring at: star radius: [60, 45] inclination: 20 node: 40 dash: [8, 6] color: var(--lcars-orange) # a quarter arc, glowing - type: ring at: star radius: 75 arc: [0, 90] width: 3 glow: true color: var(--lcars-yellow) ``` ::: details More about ring - **Orbits:** an `orbit` is an ellipse with its parent at a focus, tilted and turned as it really is, in the frame's units. Leave `at` out for a planet (the Sun sits at the origin) and put a moon's at its planet (`orbit: io`, `at: jupiter`). `radius`, `inclination`, `node`, `arc` and `band` do not apply then. - **In a body's equator:** `body: saturn` lays the ring in that body's equator at the scene date; `inclination` and `node` tilt it from there, and `rotation` does not apply. - **Looks:** a ring drawn as a line is part of the diagram look; the realistic [look](../scene#looks-diagram-and-realistic) hides it. A ring with a band picture stays. ::: | Key | Type | Default | Description | |---|---|---|---| | `radius` | number / `[a, b]` | `100` | Radius, scene units, or `[a, b]` for an ellipse (`a` along the line of nodes) | | `inclination` | number | `0` | Tilt of the ring's plane about the line of nodes, degrees | | `node` | number | `0` | Bearing of the line of nodes, degrees | | `arc` | `[from, to]` | whole ring | Only part of the ring, degrees round it | | `orbit` | string | - | A real body's name: draw its orbit at the scene date | | `satellite` | string | - | A satellite point's id: draw that [Earth satellite's](../scale#earth-satellites) orbit | | `body` | string | - | A real body's name: lay the ring in its equator | | `band` | object | - | A flat band with a picture, see [Ring band](#ring-band) | | `color` | colour | `theme:colors.ui.secondary` | Line colour | | [Line keys](./lines#line-keys) | | | `width`, `dash`, `colors`, `glow`, `line_look`, `blend` and `pulse` | ### Ring band **`band` turns a ring into a flat band with a picture laid across it: planetary rings, an accretion disc.** `builtin:saturn_rings` is Saturn's rings. - The band runs from `band.inner_radius` out to the ring's `radius`. The picture lies across its width: its left edge on the inner rim, its right edge on the outer; its height is not used. - A planet in the middle hides the far side of the band, and the near side passes in front of the planet. - With a band, the ring's own line is drawn only when you set `width`. ```yaml live type: custom:lcards-astrometrics-card height: 300 camera: views: v: target: [0, 0, 0] yaw: 25 tilt: 18 distance: 50 objects: - type: sphere id: saturn radius: 8 fill: effect: preset: ringed_giant line_width: 0.5 spin: 12 - type: ring radius: 18.6 band: image: builtin:saturn_rings inner_radius: 8.9 inclination: 27 ``` ::: details More about ring bands - **Saturn's rings to scale:** `builtin:saturn_rings` runs from the D ring to the F ring, drawn from their published radii. Use a `radius` of 2.33 and a `band.inner_radius` of 1.11 times the planet's radius. ::: | Key | Type | Default | Description | |---|---|---|---| | `band.image` | string | - | The picture: `builtin:saturn_rings`, `/local/...` or `media-source://...` | | `band.inner_radius` | number / `[a, b]` | half the radius | The band's inner edge, scene units, or `[a, b]` for an ellipse | | `band.opacity` | number | `1` | The band's opacity, `0` to `1` | | `band.color` | colour | none | A tint the picture is multiplied by. Without it, the picture's own colours | ## image **Your own picture lying flat on the scene plane: a galaxy photo under a map, a chart, a floor plan.** Grids drawn at the same height draw over it, so it works as a backdrop for a grid. - The picture sits just under the plane by default (`alt: -0.01`), so a grid at height 0 draws its lines on top. - `blend: add` makes black in the picture see-through, which suits a photo of space on black. ```yaml live type: custom:lcards-astrometrics-card height: 300 camera: views: v: target: [0, 0, 0] yaw: 20 tilt: 50 distance: 260 objects: # a nebula photo, black made see-through - type: image src: builtin:nebula_orange_red size: 160 shape: disc blend: add opacity: 0.8 # a grid drawn over it - type: grid shape: disc radius: 80 pattern: polar line_spacing: 20 spoke_count: 12 color: var(--lcars-blue) ``` | Key | Type | Default | Description | |---|---|---|---| | `src` | string | - | The picture: `builtin:`, a path or URL (`/local/galaxy.jpg`), or a Home Assistant media item (`media-source://...`) | | `size` | number / `[w, d]` | `200` | Width and depth, scene units. One number is a square; a disc takes the width as its diameter | | `shape` | string | `plane` | `plane` (a rectangle) or `disc` | | `alt` | number | `-0.01` | Height above the plane, scene units | | `blend` | string | `normal` | `add`: black in the picture becomes see-through | | `opacity` | number | `1` | Opacity, `0` to `1` | --- # Objects **`objects` is the list of what the scene draws: planets, grids, routes, nebulas, ships.** Each object has a `type`, and its other keys depend on the type. - Pick a type in [Which type for what](#which-type-for-what); each links to its keys on one of the four pages below. - Positions, sizes and distances are in scene units, set by the card's `units` ([Scale](./scale#units)). Line widths and dashes are in px. | Page | Types | |---|---| | [Grids, Spheres and Volumes](./objects/surfaces) | grid, volume, sphere, ring, image | | [Lines and Light](./objects/lines) | path, beam, trail, lightning, glow | | [Space Phenomena](./objects/space) | nebula, belt, asteroid, comet, galaxy, crystalline | | [Ships and Stations](./objects/ships) | model, cube | ## Which type for what **The type to use for each thing you might want in the scene.** Each name links to its keys. | You want | Use | |---|---| | A planet, moon or globe (solid, hides what is behind it, can wear a map) | [`sphere`](./objects/surfaces#sphere) | | A wireframe: a sector map, a galaxy disc, a sky dome, a see-through ball, a tube, a gravity well | [`grid`](./objects/surfaces#grid) | | A territory or region of space (see-through cells: a box, a pie slice or any outline) | [`volume`](./objects/surfaces#volume) | | An orbit, a range ring, a rim | [`ring`](./objects/surfaces#ring) | | A route through points, an arched route, the sun's track | [`path`](./objects/lines#path) | | A weapon, transporter or sensor beam (a glowing straight line) | [`beam`](./objects/lines#beam) | | Where a moving point has been (a fading line behind a ship or planet) | [`trail`](./objects/lines#trail) | | A star, a galactic core, a beacon (a soft light) | [`glow`](./objects/lines#glow) | | Clouds of gas | [`nebula`](./objects/space#nebula) | | An asteroid belt (a band of rocks round a centre) | [`belt`](./objects/space#belt) | | One asteroid up close (a tumbling rock, lit from its star) | [`asteroid`](./objects/space#asteroid) | | A comet (a nucleus, a glowing coma and tails pointing away from its star) | [`comet`](./objects/space#comet) | | A spiral galaxy (stars, arms, a bar and dust; the Milky Way by default) | [`galaxy`](./objects/space#galaxy) | | Your own picture on the plane | [`image`](./objects/surfaces#image) | | A ship, a station, any 3D model | [`model`](./objects/ships#model) | | A Borg cube (or a plain shaded box) | [`cube`](./objects/ships#cube) | | The Crystalline Entity (a glowing crystal spine and branches round a starburst core) | [`crystalline`](./objects/space#crystalline) | | Lightning: bolts that flash and go, or held flickering columns (lights the gas of a volume nebula it strikes in) | [`lightning`](./objects/lines#lightning) | | Real Earth satellites round an Earth sphere: GPS, Galileo, the geostationary weather satellites, the space stations (a dot each, orbits too) | [`satellites`](./scale#the-satellites-object) | | A star system at true scale inside a larger scene (its own points and objects, in units of its own) | [`system`](./scale#the-system-object) | ## Keys every object takes **These keys work on every type: where the object sits, how it is turned, when it shows and what a tap does.** - Colours take theme tokens (`theme:colors.ui.primary`), CSS variables (`var(--lcars-blue)`) or plain colours. - Under reduced motion, moving parts (spin, pulses, drifting gas, strikes) stop; each type says what it shows instead. Moving effects are on the [Effects](./effects) page. ```yaml live type: custom:lcards-astrometrics-card height: 280 camera: views: v: target: [0, 0, 0] yaw: 20 tilt: 30 distance: 110 points: - id: planet xyz: [25, 0, 0] label: PLANET style: minor objects: - type: sphere at: planet radius: 6 # sits at a point, tipped over and spinning - type: ring id: rings at: planet radius: 14 rotation: [30, 0, 0] spin: 30 color: var(--lcars-orange) # half see-through, with a tag for rules - type: grid shape: sphere at: [-25, 0, 0] radius: 15 opacity: 0.5 tags: [survey] ``` ::: details More about keys every object takes - **Looks:** an object without `look` shows in every look, and one with a diagram form switches its parts with the look: a mapped sphere, a filled grid, a glow, cube, asteroid, belt, comet, galaxy, crystalline entity or volume nebula shows its wireframe in the diagram look, and a model with its own materials shows as a hologram. A ring drawn as a line, and a path, hide in the realistic look. `look: all` shows it in every look, as configured. ::: | Key | Type | Default | Description | |---|---|---|---| | `id` | string | `type#n` | A name for points standing on it (`object`), rules and fly-to. The first grid is `grid#1` | | `at` | id / `[x, y, z]` | the origin | Where it sits: a point id (it follows the point) or `[x, y, z]` | | `rotation` | `[x, y, z]` | `[0, 0, 0]` | Turns it, degrees: y is a bearing, x tips it toward the camera, z rolls it | | `spin` | number | `0` | Turns it round its own vertical axis, degrees per second. Points on it turn with it | | `face` | string | - | `motion`: [face the way it goes](#facing-the-way-it-goes). A point id: [face that point](#facing-a-point) | | `look` | string | every look | `diagram`, `realistic` or `all`: which [look](./scene#looks-diagram-and-realistic) of the card shows it (`mixed` shows both) | | `opacity` | number | `1` | `0` to `1`. Some types start lower (a model `0.85`, a glow `0.9`) | | `visible` | boolean | `true` | `false` hides it; its points still work | | `max_distance`, `min_distance`, `fade` | | | Shown only within a camera distance: see [Distance](#distance) | | `hide_in_systems` | boolean / list | `false` | `true` hides it while the camera is inside a [star system](./scale#star-systems), so galaxy-scale volumes and lines step aside in the close-ups. A list of system ids hides it in those only | | `tags` | list | - | Tags for [rules](./data#rules): a rule on `tag:` changes every object with the tag | | `tap_action`, `hold_action` | action | - | What a tap or a hold does, as on [points](./points#actions). An object without a `tap_action` is not tappable | | `view` | object | - | Where the camera lands when it flies to the object: `distance`, `tilt`, `yaw`, `warp`. Keys left out keep the current ones; the distance defaults to a close-up | ### Facing the way it goes **`face: motion` turns an object to face where its point is going: a ship rides its orbit nose first.** - The object needs `at:` a moving point. Without `face`, the object slides along keeping its own turn. - The bow is +z on every built-in model. A model file with its bow along +x needs `rotation: [0, 90, 0]`. ```yaml live type: custom:lcards-astrometrics-card height: 320 camera: views: v: target: [0, 0, 0] yaw: 20 tilt: 35 distance: 120 points: - id: ship polar: [40, 90] object: orbit label: ENTERPRISE style: tiny objects: - type: ring id: orbit radius: 40 spin: 12 width: 0.5 opacity: 0.4 - type: model at: ship src: builtin:constitution_class_refit size: 8 face: motion - type: trail point: ship length: 4 width: 2 ``` ::: details More about facing the way it goes - **Level flight:** the object's top stays up, so a ship stays level. `rotation` applies on top, in the object's own frame. - **Where the heading comes from:** the point's movement however it moves (a spinning ring, an entity, a rule), measured on the object the point stands on. A ship on a ring round a planet that is itself on an orbit faces round the planet, not along the planet's way. - **Before it moves:** before the point first moves, and under reduced motion (which holds spin), a point on a spinning object faces along the spin. Anything else keeps its `rotation` until the point moves. ::: | Key | Type | Default | Description | |---|---|---|---| | `face` | string | - | `motion`: turn the object's +z toward where its point is going, top up | ### Facing a point **`face: ` keeps an object turned toward a point, wherever it is (another star system, across the galaxy), as either moves.** - Most objects turn their +z to the point, top up. Objects round an axis (a grid other than a plane, a ring, a belt, a galaxy, a whirlpool nebula) point their axis at it instead, so a ring lies face-on to it. - A [well](./objects/surfaces#wells-and-wormholes)'s narrow end leads to the point it faces, and a wormhole is two wells facing each other. ```yaml live type: custom:lcards-astrometrics-card height: 300 camera: views: v: target: [0, 0, 0] yaw: 20 tilt: 30 distance: 130 points: - id: beacon polar: [45, 0] object: track marker: reticle label: BEACON objects: - type: ring id: track radius: 45 spin: 20 opacity: 0.3 # turns its +z (the bow) to the beacon - type: model src: builtin:constitution_class_refit size: 30 face: beacon # turns its axis to the beacon, so it lies face-on to it - type: ring at: [0, 22, 0] radius: 8 face: beacon color: var(--lcars-blue) ``` | Key | Type | Default | Description | |---|---|---|---| | `face` | string | - | A point id: turn toward that point. `rotation` applies on top | ## Distance **Show an object only within a range of camera distances: planets that appear as you zoom in.** Zoom into the star below: its planet and orbit appear as you close in, and the disc gives way. - The distance is measured to the object's nearest edge, so a large grid does not vanish while you fly through it. - To swap a model for a marker far away, give the model `max_distance: 60` and give a point with `marker: ship` (or `starbase`) `min_distance: 60`. Touching ranges cross-fade, so one stands in for the other. ```yaml live type: custom:lcards-astrometrics-card height: 320 camera: views: v: target: [0, 0, 0] yaw: 20 tilt: 35 distance: 420 points: - id: star xyz: [0, 0, 0] marker: dot label: SOL style: major min_distance: 140 - id: earth polar: [30, 60] object: orbit label: EARTH style: minor max_distance: 150 objects: - type: glow size: 24 color: var(--lcars-yellow) - type: ring id: orbit radius: 30 color: var(--lcars-blue) spin: 6 max_distance: 120 - type: sphere at: earth radius: 2.5 image: builtin:earth_blue_marble line_width: 0 max_distance: 120 # gives way as you close in - type: grid shape: disc radius: 90 line_spacing: 30 opacity: 0.6 min_distance: 120 ``` ::: details More about distance - **Points:** the keys are the same as on [points](./points#visibility). - **Inside and above:** the distance is 0 when the camera is inside the object. A flat grid (`shape: plane` or `disc`, not deformed) is measured to its surface: above a galactic disc the distance is your height over it, so `min_distance` can hide the disc once you dive into a star system. - **Out of range:** an object out of range is not drawn and cannot be tapped; its points keep their own ranges. ::: | Key | Type | Default | Description | |---|---|---|---| | `max_distance` | number | - | Hidden when the camera is farther than this. It fades out over the next 10% of that distance | | `min_distance` | number | - | Hidden when the camera is closer than this. It fades in over the 10% of that distance before it | | `fade` | `[start, end]` | - | Fully shown nearer than `start`, gone past `end` | --- # Points **A point is a named place in the scene: placed once, then referred to by its `id` from paths, rings, beams, object positions and camera views.** With a `label` or a `marker` it also shows on the scene, and with a `tap_action` or a `card` it becomes something to tap. ```yaml live type: custom:lcards-astrometrics-card height: 260 camera: views: v: target: [0, 0, 0] yaw: 20 tilt: 45 distance: 140 points: - id: vega # a unique name polar: [40, 120] # where: exactly one placement form label: Vega # text shown at the point marker: triangle # a marker style: major # the label style tap_action: action: fly-to # a tap flies the camera there objects: - type: grid shape: disc radius: 60 pattern: polar line_spacing: 10 spoke_count: 12 ``` ## In the Astrometrics Studio **The card editor opens the [Astrometrics Studio](./start#the-studio), a full-screen editor with the live scene, and its Points tab lists every point.** Add, duplicate, reorder and remove points there, and set each one's placement, the object it stands on, entity, label, style, marker, colour and the main label text keys. Other keys stay as they are; edit them in the YAML tab. - **Pick on preview** (the crosshair on a row) places a point with a tap: the preview shows "TAP TO PLACE ..." and the next tap writes the point's numbers, in its own form. `xyz` and `polar` land on the ground (y = 0), or on the surface of the object in `object`; `latlon` lands on a sphere, `altaz` on a dome, `cell` on a plane grid's cell. Drag to turn the view first if you need to; Escape or Cancel stops picking. - **On the scene**, tap a point to open its row, drag it to move it, or add one with **Place a point** in the toolbar. See [The Studio](./start#the-studio). - **A part of a model** puts a point on a named part of a model object: the part list comes from the built-in model, or from the preview once it has loaded your file. The offset moves the point from the part's origin. - **The Card section** pins a Lovelace card to the point: **Add card** opens Home Assistant's card picker, and the card's own editor opens below, as in a stack card. Show, position and width set how it appears. ::: details More about the Studio and points - **Points that cannot be picked:** points placed by `sky`, `at` or an entity are not picked on the preview. - **On a model:** a picked `xyz` lands on the model's surface, in the model file's own coordinates. See [model](./objects/ships#model). - **Card picker not ready:** if the picker says it is not ready, select **Add card** on any dashboard once (you can cancel it) and try again. ::: ## Placement forms **Each point takes exactly one placement form: scene coordinates, a bearing on the plane, a place on a globe or a dome, the sun or moon, a real planet, an Earth satellite, a sector map cell, another point, or a part of a model.** `offset: [x, y, z]` then moves any of them by scene units. - `object` names the object the point stands on. `latlon`, `altaz`, `sky`, `satellite`, `cell` and `part` need it; with `xyz` or `polar` it is optional, and the point then moves and spins with that object. - A point can sit on a point that sits on an object that sits on a point: the planet orbits the star, the away team stands on the planet. A reference that loops back on itself is refused (and logged). - `xyz`, `polar`, `latlon` and `altaz` can also read their numbers from an entity: see [Positions from entities](./data#positions-from-entities). ```yaml live type: custom:lcards-astrometrics-card height: 340 camera: views: side: target: [0, 0, 0] yaw: 30 tilt: 25 distance: 120 points: # scene coordinates - id: origin xyz: [0, 0, 0] marker: dot label: XYZ # distance and bearing on the plane - id: bearing polar: [35, 90] marker: diamond label: POLAR 35 AT 90 # another point, moved up - id: lifted at: bearing offset: [0, 15, 0] marker: triangle label: AT + OFFSET # on the globe, lifted off its surface - id: lander latlon: [20, 0] object: globe alt: 0.5 marker: reticle label: LATLON 20 0 objects: - type: grid shape: disc radius: 50 pattern: polar line_spacing: 10 spoke_count: 12 - type: sphere id: globe at: [-30, 12, 0] radius: 10 spin: 10 ``` ::: details More about placement - **Longitude 0** on a sphere faces the default camera, with east to the right. A `latlon` point turns with the sphere's `spin`. - **The sun and moon** with `sky` are placed from the time and your Home Assistant location (`sun.sun` when it exists), updated every minute; with a [clock](./scale#the-scene-clock) on the card, at the scene date instead of now. - **Real bodies** with `body` sit where that Sun, planet, dwarf planet or moon is at the scene date, in the scene's or system's units. See [The real Solar System](./scale#the-real-solar-system). - **Earth satellites** with `satellite` sit over the right place on an Earth sphere at the scene date. See [Earth satellites](./scale#earth-satellites). - **A model part** with `part`: the point follows the part as it moves, and `xyz` is then an offset in the part's coordinates. See [model](./objects/ships#model). ::: | Key | Type | Default | Description | |---|---|---|---| | `id` | string | required | Unique name of the point, used by `at`, `target`, `from`, `to`, `points` and views | | `xyz` | `[x, y, z]` | - | Scene coordinates; y is up. With `object`: local to that object (on a model, in the file's coordinates) | | `polar` | `[distance, bearing]` | - | On the scene plane: distance from the centre, scene units, and a bearing in degrees (0 north, clockwise seen from above) | | `latlon` | `[lat, lon]` | - | Latitude and longitude, degrees, on the sphere in `object` | | `altaz` | `[azimuth, altitude]` | - | On the sky dome in `object`: azimuth clockwise from north, altitude up from the horizon, degrees | | `sky` | string | - | `sun` or `moon`: that body on the dome in `object`, now or at the scene date | | `body` | string | - | A real Sun, planet, dwarf planet or moon (`mars`), at the scene date | | `center` | string | - | With `body`: measure from this body instead of the Sun (`jupiter`) | | `satellite` | string / number | - | A real Earth satellite (`iss`, or a NORAD number) round the sphere in `object`, at the scene date | | `heights` | string | `real` | With `satellite`: `real` to scale, or `diagram` (low orbits lifted, high ones brought in) | | `cell` | string | - | The centre of a sector map cell (`AF3`) on the plane grid in `object`, which needs `axis_labels` | | `at` | string | - | At another point, by id | | `part` | string | - | On a named part of the [model](./objects/ships#model) in `object`; it follows the part | | `object` | string | - | The object the point stands on, by id | | `alt` | number | `0` | Height above the surface (`latlon`, `altaz`, `sky`) or the plane (`polar`), scene units | | `offset` | `[x, y, z]` | - | Moves the point by these scene units from where its form puts it | ## Labels **A point's label is LCARdS text, with the same [text-field keys](/core/text-fields) as the button, elbow and slider cards: font, size, weight, case, letter spacing, colour (a state map too), a background box, templates.** `label: Vega` is short for one field called `label`; `text:` gives a point as many fields as you like, each placed round the point. - Fields with the same `position` stack. Without a `position`, a field sits right of the marker (`center-right`), or on the point when there is no marker (`center`). - `text.default` holds keys every field of this point inherits; it is not drawn itself. - Text-field keys that place text in a card's zones (`zone`, `x`, `y`, `x_percent`, `y_percent`, `anchor`, `baseline`, `stretch`, `font_size_percent`, `cap_height_ratio`) mean nothing round a point; the checker reports them as unknown. ```yaml live controls type: custom:lcards-astrometrics-card height: 260 camera: views: top: target: [0, 0, 0] tilt: 70 distance: 110 points: - id: switch entity: switch.demo_switch xyz: [-15, 0, 0] marker: reticle text: # every field of this point default: font_size: 14 label: content: "{entity.attributes.friendly_name}" color: default: var(--lcards-moonlight) "off": var(--lcars-orange) # under the label, right of the point status: content: "{entity.state}" position: bottom-right font_size: 11 color: var(--lcars-black) # the LCARS bar-break box background: default: var(--lcars-orange) objects: - type: grid shape: plane size: 100 line_spacing: 10 ``` ::: details More about label text - **Templates** in `content` are evaluated with the point's `entity`, and with `sky` and `point` as well: see [Live data: templates](./data#templates). - **Fonts:** `font_family` takes the LCARdS [fonts](../../configuration/fonts) (`lcards_michroma`, `lcards_borg`, ...), loaded when used. The default is the theme's LCARS font (Antonio). - **Selected points:** a `selected` key in a `color` map colours the field while the point is selected. Without one, a selected point's label takes the theme's alert colour. ::: | Key | Type | Default | Description | |---|---|---|---| | `label` | string / number | - | Text shown at the point: short for `text.label.content` | | `text` | object | - | Text fields by name (`label` is the main one) | | `text.default` | object | - | Keys every text field of this point inherits | | `content` | string | - | A field's text. [Templates](/core/templates/) are evaluated | | `template` | boolean | `true` | `false` shows `content` as written | | `show` | boolean | `true` | `false` hides the field | | `display_format` | string | - | As on every card: see [Display format](/core/text-fields-content#display-format) | | `position` | string | `center-right` with a marker, else `center` | Where the field sits round the point: `center`, `center-right`, `top-left`, `bottom-center` and the other six. `right`, `left`, `top` and `bottom` are short for the middle ones | | `font_size` | number / string | by style | px (a number) or a CSS size | | `font_weight` | string / number | - | As on every card | | `font_family` | string | the theme's LCARS font | A font name or one of the LCARdS fonts | | `text_transform` | string | - | `uppercase`, `lowercase`, `capitalize` | | `letter_spacing` | number / string | - | px (a number) or a CSS length | | `color` | colour / state map | by style | A colour, or a [state map](/core/colours) by the point's entity; a `selected` key colours it while the point is selected | | `background` | colour / state map | - | A box behind the text, as on the [bar-label buttons](/core/text-fields-style#text-background) | | `background_padding` | number | `8` | Space between the text and the sides of its box, px | | `background_radius` | number | `4` | Corner radius of the box, px | | `background_width` | number | - | A fixed box width, px | | `background_min_width` | number | - | A smallest box width, px | | `padding` | number / object | - | Moves the field, px: a number, or `top`, `right`, `bottom` and `left` | | `rotation` | number | - | Turns the field, degrees | ### Styles and defaults **`style` picks a label style, which sets the size, the colour and the rank when labels overlap.** The four built-ins are `title` (34 px), `major` (20 px), `minor` (13 px, the default) and `tiny` (10 px); `labels.styles` changes them or adds your own, and `labels.default` sets keys for every label on the card. - A field takes its keys from, lowest first: the built-in style, `labels.default`, `labels.styles.