Skip to content

Sun card: AstroWeather moon data + azimuth positioning — v0.17.1 - #35

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

Sun card: AstroWeather moon data + azimuth positioning — v0.17.1#35
ryanbuiltthat merged 1 commit into
mainfrom
claude/prism-smart-dashboard-card-rjlks3

Conversation

@ryanbuiltthat

Copy link
Copy Markdown
Owner

What

Extends the sun card's after-sunset moon view with the data the user asked for, designed to pair with the AstroWeather integration:

  • Azimuth-positioned moon — the moon glyph now rides the sky by its azimuth: East→South→West maps to left→top→right along the dome, and altitude (when available as an attribute) scales how high it sits. No azimuth → the centred disk as before.
  • Next full moon chip — next_full_moon_entity (a timestamp) → "Full in 5d".
  • Next dark night chip — next_dark_night_entity, either a timestamp ("Dark in 2h") or a duration sensor such as AstroWeather's deep-sky darkness hours ("Dark 6.2 h").
  • Moonrise / moonset moved onto the same wrapping chip row.

Config (new)

Key Notes
moon_azimuth_entity Degrees; also read from an azimuth/moon_azimuth attribute on the moon sensor. AstroWeather: moon_azimuth.
next_full_moon_entity Timestamp → "Full in Xd". AstroWeather: moon_next_full_moon.
next_dark_night_entity Timestamp or duration. AstroWeather: deep_sky_darkness.

Any sensor providing these values works — not AstroWeather-specific. When any optional moon sensor is configured, the tile grows from 3 to 4 grid rows to fit the chip row.

Testing

  • Verified in Chromium: azimuth 95°/180°/265° place the moon at cx ≈ 40 / 100 / 160 (E→left, S→centre, W→right); chips render (moonrise/moonset/full-moon/dark-night); 4-row grid; no console errors.
  • Fixed a relFuture rollover bug ("4d 24h" → "5d"; minute carry too) with a unit check.
  • bash build.sh + node test/smoke.js green (added AstroWeather-style fixtures + case). Preview "Sun & Moon" demo now passes all sensors, so the showcase picks it up.

VERSION 0.17.0 → 0.17.1.

🤖 Generated with Claude Code


Generated by Claude Code

Extend the sun card's after-sunset moon view:

- The moon glyph is now positioned on the sky by the moon's azimuth
  (moon_azimuth_entity, or an azimuth/moon_azimuth attribute on the moon
  sensor): E->S->W maps left->top->right along the dome, with altitude scaling
  its height when available. No azimuth falls back to a centred disk.
- New chips below the phase row: moonrise / moonset, "Full in Xd"
  (next_full_moon_entity), and "Dark ..." (next_dark_night_entity — a timestamp
  or a duration sensor such as AstroWeather's deep-sky darkness hours).
- The tile grows to 4 rows when any optional moon sensor is configured, to fit
  the chip row. Fixed a relFuture rollover ("4d 24h" -> "5d").

These pair with the AstroWeather integration (moon_azimuth,
moon_next_full_moon, deep_sky_darkness) but accept any matching sensor.
Editor Moon section, smoke fixtures/case, preview demo, README + docs updated.
Verified azimuth placement and chips in Chromium. VERSION 0.17.0 -> 0.17.1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014cpNPVU8j1iiU9CnXgr5JY
@ryanbuiltthat
ryanbuiltthat merged commit 12304c1 into main Jul 28, 2026
1 check failed
@ryanbuiltthat
ryanbuiltthat deleted the claude/prism-smart-dashboard-card-rjlks3 branch July 28, 2026 05:14
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