You are reading the development docs (2026.12.1-dev.1): features here may not be released yet.
Skip to content

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.
  • 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.
GroupActions
Alert Modelcards.set_alert_mode, lcards.red_alert, lcards.yellow_alert, lcards.blue_alert, lcards.gray_alert, lcards.black_alert, lcards.clear_alert
Screen Effectslcards.trigger_effect, lcards.clear_effect
Soundlcards.play_sound
Astrometricslcards.fly_to, lcards.set_clock
Portal Overlaylcards.show_portal_card, lcards.clear_portal_card
Borg Assimilationlcards.borg_assimilate, lcards.borg_deassimilate
Frontend Controllcards.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 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
KeyTypeDefaultDescription
target_device_idslistevery deviceBrowser device ids (the lcards_device_id each browser keeps in localStorage)
target_device_nameslistevery deviceDevice display names, set in LCARdS Config > Users & Devices or with ?lcards_device=
target_user_idslistevery userHome Assistant user ids
target_user_nameslistevery userHome Assistant user display names

Alert Mode Actions ​

The alert actions change the alert mode: the colours, the alert sound and any 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 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).

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
KeyTypeDefaultDescription
modestringrequiredred_alert, yellow_alert, blue_alert, gray_alert, black_alert or green_alert
Targeting-every browsertarget_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.

ActionEffect
lcards.red_alertRed alert
lcards.yellow_alertYellow alert
lcards.blue_alertBlue alert
lcards.gray_alertGray alert
lcards.black_alertBlack alert
lcards.clear_alertBack to normal (green_alert)
yaml
action: lcards.red_alert
KeyTypeDefaultDescription
Targeting-every browsertarget_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 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.
  • 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
KeyTypeDefaultDescription
layersobjectrequiredA map of layers: backdrop, color and canvas, each a preset with its settings, or null to clear it
durationnumberuntil clearedClear the layers this call sets after this many ms, at least 100
Targeting-every browsertarget_device_ids, target_device_names, target_user_ids, target_user_names

The presets for each layer, with their main settings:

LayerPresetMain settings
backdropbluramount (8px)
backdropgrayscaleamount (100%)
backdropsaturateamount (200%)
backdropcontrastamount (200%)
backdrophue-rotateangle (180deg)
colorcolor-tintcolor
colorvignetteopacity (0.7)
canvasstaticopacity, scale
canvaspixelateopacity, pixelSize
canvasglitchopacity, intensity
canvasscanlinesopacity, 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
KeyTypeDefaultDescription
slotstringevery layerbackdrop, canvas or color
Targeting-every browsertarget_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 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 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
KeyTypeDefaultDescription
event_typestring-One of the 27 event keys in What Events Are Covered, such as notification, card_tap or alert_red
asset_keystring-A sound asset key, a file URL or a media-source:// id
Targeting-every browsertarget_device_ids, target_device_names, target_user_ids, target_user_names

Astrometrics Actions ​

Move the camera or set the clock of an astrometrics card 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.
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
KeyTypeDefaultDescription
card_idstringrequiredThe astrometrics card's id
viewstring-A named view of the card (camera.views)
pointstring-A point id of the card; the camera flies to it as a tap on it would
durationnumberthe card's camera.fly_durationFlight time in ms, 0 to 60000
warpbooleanthe view's warp, else the card's camera.warptrue: stars and dust streak on the way; false: they don't
Targeting-every browsertarget_device_ids, target_device_names, target_user_ids, target_user_names

lcards.set_clock ​

Sets the card's scene date 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.
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
KeyTypeDefaultDescription
card_idstringrequiredThe astrometrics card's id
datestringkeeps runningnow, 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)
ratestring / numberunchangedDays 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-every browsertarget_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 or the connection overlay, and they don't disturb it. For popups with buttons, see Using 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
KeyTypeDefaultDescription
contentobjectrequiredAny card config (type: custom:lcards-button, type: entities ...)
layersobjectnoneScreen effect layers behind the card, as in lcards.trigger_effect
positionstringcentercenter, top, top-left, top-right, bottom, bottom-left, bottom-right, left or right
widthstringautoCSS width of the card's box: 400px, 40vw, auto
heightstringautoCSS height of the card's box: 300px, 30vh, auto
durationnumberuntil clearedClose it after this many ms, at least 100
dismissbooleantrueA click on the backdrop closes it
Targeting-every browsertarget_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
KeyTypeDefaultDescription
Targeting-every browsertarget_device_ids, target_device_names, target_user_ids, target_user_names

Borg Assimilation Actions ​

Start and end the Borg assimilation 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 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
KeyTypeDefaultDescription
intro_durationnumberwait for a clickEnd the intro after this many ms, 1000 to 60000; a click still ends it earlier
site_countnumber8Injection sites on the screen, 1 to 20
tendrils_per_sitenumber5Tendrils per injection site, 1 to 20
tendril_lengthnumber600Longest tendril reach in pixels, 100 to 1200
particle_countnumber2Nano-probe particles per tendril, 0 to 6; 0 turns them off
rendererstringautoauto or webgl: the WebGL intro where the browser supports it; canvas: the classic intro
cubestringdetailedWebGL intro: detailed (solid cube with machinery), classic (wireframe) or none
corruptionnumber0.5WebGL intro: signal corruption strength, 0 to 1; 0 turns it off
overrunnumber0.65WebGL intro: darkness behind the assimilation front, 0 to 1
transition_stylestringblur_fadePalette transition: blur_fade, flash, fade_only or off
font_swapbooleantruefalse keeps the dashboard font; everything else still runs
soundstringthe borg_assimilate sound eventA file URL (/local/sounds/borg.mp3), a media-source:// id or a sound asset key; none for silence
suppress_persistentbooleanfalsetrue leaves no effects after the intro. Ignored when persistent_layers is set
intro_layersobject-Layers for the intro, merged slot by slot with the defaults; see Layers format
persistent_layersobject-Layers kept after the intro, replacing the defaults; {} keeps none. Wins over suppress_persistent
Targeting-every browsertarget_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
KeyTypeDefaultDescription
with_outrobooleantruefalse restores at once, with no outro and no wait
outro_layersobjectglitch on canvas for 1200 msOutro layers, replacing the default. The longest duration in them sets the wait, at least 1200 ms
revert_transition_stylestringfade_onlyPalette transition back to normal: fade_only, flash, blur_fade or off
soundstringthe borg_deassimilate sound eventA sound for this call, as for lcards.borg_assimilate
Targeting-every browsertarget_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
KeyTypeDefaultDescription
Targeting-every browsertarget_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).
yaml
action: lcards.set_log_level
data:
  level: debug
KeyTypeDefaultDescription
levelstringrequiredoff, error, warn, info, debug or trace
Targeting-every browsertarget_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 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 so it only writes keys LCARdS has.

Released under the MIT License. | About