Repository navigation
Solar System card: rotate, zoom, any date — planets, dwarf planets, asteroids, moons - #5
Merged
Merged
Conversation
…teroids, moons A dashboard card that ships with the integration (frontend/, plain custom element and canvas, no dependencies, no build step). The integration serves the folder and registers the card as an extra frontend module, so it needs no second HACS entry and no manual resource. Skipped when Home Assistant runs without web server or frontend. - any date from 3000 BC to 3000 AD (Julian calendar before 15 Oct 1582), time-lapse, live mode - 8 planets, 9 dwarf planets and candidates, 13 asteroids, 21 moons, each one switchable; moon systems of seven bodies to scale - computed in the browser: no entity, no state, nothing in the recorder - names its sources in the card and each object's checked years and error; outside the checked years an object is drawn hollow (extrapolated) Orbit data (scripts/build_solar_system_data.py, needs network once): - planets: NASA JPL "Approximate Positions of the Planets", table 2a/2b, parsed from the JPL page, not retyped - small bodies: mean elements with linear rates (plus JPL's extra terms where they help) fitted to osculating elements from JPL Horizons - moons: circular orbits fitted to JPL Horizons 1900-2100; Earth's Moon from Meeus ch. 47 Tests: - tests_js/: the card's maths against 478 positions from JPL Horizons (new CI job, Node 22; also runs in a browser). Measured: planets at most 0.33 deg, the Moon 0.06 deg. - tests_ha/: in a real Home Assistant core the card is registered once and served as JavaScript; without frontend the sensors still come up. - tests/: packaging (every imported file is shipped, sources are named). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…hint below the picture Seen in a real dashboard with a theme that sets --divider-color to transparent: buttons, inputs and separators had no outline at all. Outlines and fills are now derived from the text colour (color-mix, with a neutral grey fallback). The wheel zoomed the card whenever the pointer was over it, and touch-action: none blocked swiping past it on a phone. Wheel and vertical swipes now scroll the page until the picture is clicked or tapped; leaving it with the mouse or focusing something else hands the wheel back. Also: the usage hint moved from the picture to the info line, names near the right edge are drawn left of the dot instead of being cut off, and the picture is lower on narrow cards unless the YAML sets a height. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
Summary
Adds a Solar System dashboard card that ships with the integration: rotate and zoom, pick any date from 3000 BC to 3000 AD, switch planets, dwarf planets, asteroids and moons on and off. Pre-release
2.8.0-beta.1— not yet seen inside a real dashboard, please test before it becomes 2.8.0.What it does
frontend/and registers the card as an extra frontend module. No second repository, no manual resource. Without web server or frontend the step is skipped and the sensors still load.Where the numbers come from
Outside its checked years an object is drawn hollow with a dashed orbit, because the position is then an extrapolation (Horizons has no asteroid positions before 1600).
scripts/build_solar_system_data.pyregenerates the data; the planet table is parsed from the JPL page, not retyped.Tests
tests_js/— the card's maths against 478 positions from JPL Horizons. New CI job (Node 22); the same file runs in a browser viatests_js/index.html.tests_ha/— in a real Home Assistant core (2026.2.3 locally) the card is registered exactly once and served as JavaScript: 14 passed.tests/— 181 passed, including packaging checks (every imported file is shipped, the sources are named).tests_js/demo.html: click, double-click, drag, wheel, date entry with error message, time-lapse, light and dark theme, English and German.Not verified
🤖 Generated with Claude Code