Sun card: AstroWeather moon data + azimuth positioning — v0.17.1 - #35
Merged
Merged
Conversation
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
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.
What
Extends the sun card's after-sunset moon view with the data the user asked for, designed to pair with the AstroWeather integration:
next_full_moon_entity(a timestamp) → "Full in 5d".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").Config (new)
moon_azimuth_entityazimuth/moon_azimuthattribute on the moon sensor. AstroWeather:moon_azimuth.next_full_moon_entitymoon_next_full_moon.next_dark_night_entitydeep_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
relFuturerollover bug ("4d 24h" → "5d"; minute carry too) with a unit check.bash build.sh+node test/smoke.jsgreen (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