Skip to content

Add Lightning + Lux cards — v0.13.0#23

Merged
ryanbuiltthat merged 1 commit into
mainfrom
claude/prism-smart-dashboard-card-rjlks3
Jul 21, 2026
Merged

Add Lightning + Lux cards — v0.13.0#23
ryanbuiltthat merged 1 commit into
mainfrom
claude/prism-smart-dashboard-card-rjlks3

Conversation

@ryanbuiltthat

Copy link
Copy Markdown
Owner

Two new weather-family cards

prism-lightning-card

A flat lightning tile. Strike count is the dominant (accent-coloured) value, with last-strike time ("Last 12m ago") and distance ("8 km away") for context, and the shared animated storm cloud whose bolt flickers. Built for Ecowitt / AS3935-style sensors.

type: custom:prism-lightning-card
title: Lightning
count_entity: sensor.lightning_strike_count
distance_entity: sensor.lightning_distance
time_entity: sensor.lightning_last_strike   # timestamp or minutes-ago
accent: amber

prism-lux-card

A flat illuminance tile with a living sun — an SVG disc + 12 rays whose size/length scale with log10(lux) and whose colour warms by band (Dark → Bright sun); the rays rotate and the disc pulses (reduced-motion aware). Shows a moon below 1 lx. Big value + a plain-language level.

type: custom:prism-lux-card
entity: sensor.illuminance
title: Illuminance

Levels: <10 Dark · <100 Dim · <1 000 Indoor · <10 000 Overcast · <25 000 Daylight · ≥25 000 Bright sun.

Changes

  • New src/prism-lightning-card.js, src/prism-lux-card.js
  • Wired into build.sh, build.ps1, test/smoke.js (lightning + illuminance fixtures + 4 cases), test/preview.html (mocks + 2 demos)
  • Bumped VERSION 0.12.0 → 0.13.0; regenerated prism.js (now 22 cards)
  • README card table + quick-starts; full docs/cards.md sections (doc-links resolve) + sizing rows; CLAUDE.md session log

Verification

  • node test/smoke.js — all pass (4 new cases); both cards registered with resolving doc anchors
  • Real-Chromium render (screenshots reviewed): lightning → amber "7 strikes", "Last 12m ago", "8 km away", flickering bolt; lux → warm sun with 12 long rays, "18,500 lx" · "Daylight". No console errors.
  • On merge: release workflow publishes v0.13.0; showcase workflow folds both cards into the README images.

🤖 Generated with Claude Code


Generated by Claude Code

prism-lightning-card: a flat lightning tile. Strike count is the
dominant (accent-coloured) value, with the last-strike time ("Last 12m
ago") and distance ("8 km away") for context, and the shared animated
storm icon whose bolt flickers. Config: count_entity + optional
distance_entity / time_entity (timestamp or minutes-ago), accent
(amber), animate.

prism-lux-card: a flat illuminance tile with a "living sun" — an SVG disc
and 12 rays whose size and length scale with log10(lux) and whose colour
warms by band (Dark → Bright sun); the rays rotate and the disc pulses
(reduced-motion aware). Shows a moon below 1 lx. Big lux value + a
plain-language level. Reads a lux sensor state or an attribute.

Now 22 cards. Wired into build.sh / build.ps1 / smoke.js (lightning_* +
illuminance fixtures + 4 cases) / preview.html (mocks + 2 demos). README
table + 2 quick-starts; full docs/cards.md sections + sizing rows.

Verified in real Chromium (screenshots): lightning → amber "7 strikes",
"Last 12m ago", "8 km away", flickering bolt; lux → warm sun with 12 long
rays, "18,500 lx", "Daylight". No console errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014cpNPVU8j1iiU9CnXgr5JY
@ryanbuiltthat
ryanbuiltthat merged commit 87256d9 into main Jul 21, 2026
1 check failed
@ryanbuiltthat
ryanbuiltthat deleted the claude/prism-smart-dashboard-card-rjlks3 branch July 21, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants