Add Lightning + Lux cards — v0.13.0#23
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two new weather-family cards
prism-lightning-cardA 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.
prism-lux-cardA 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.Levels: <10 Dark · <100 Dim · <1 000 Indoor · <10 000 Overcast · <25 000 Daylight · ≥25 000 Bright sun.
Changes
src/prism-lightning-card.js,src/prism-lux-card.jsbuild.sh,build.ps1,test/smoke.js(lightning + illuminance fixtures + 4 cases),test/preview.html(mocks + 2 demos)VERSION0.12.0 → 0.13.0; regeneratedprism.js(now 22 cards)docs/cards.mdsections (doc-links resolve) + sizing rows;CLAUDE.mdsession logVerification
node test/smoke.js— all pass (4 new cases); both cards registered with resolving doc anchors🤖 Generated with Claude Code
Generated by Claude Code