Repository navigation
feat(themes): weather scenes — a theme can follow the weather (#247) - #248
Merged
Merged
Conversation
A theme can now list a scene per weather condition (manifest version 4, `weather`), and the display shows the one for the weather outside. To the household it is still one theme in the picker. The Weather theme itself ships from HomeGlowThemes; this is the core. - Scenes are keyed by the server's condition tokens: sunny, partlycloudy, cloudy, fog, windy, windy-variant, rainy, pouring, snowy, snowy-rainy, hail, lightning, lightning-rainy, plus a default. Each sets colors, tokens, ambience and confetti over the theme's. A missing scene falls back to a related one, then to default, so a theme can be made a few scenes at a time. - Night follows the display mode: a scene's dark look is its night, and a clear night is the sunny scene. On Auto, night follows sunset. - GET /api/weather/condition answers from any fresh reading of the place (whatever its units or language, and including a weather widget's reading by place name), else makes one fetch. Displays poll it as often as the server's reading lasts (10 minutes) and when they come back into view, so it costs no extra provider calls. - The theme uses the location Auto mode already has; there is no new location setting. - Admin -> Look -> Appearance shows what the theme would show now (or why the weather can't be read), a hint when the mode isn't Auto, and a preview of each scene on the display for 10 minutes, never saved. - A new scene fades in (opacity only, still under reduced motion). A new `flash` layer draws lightning, kept gentle: at most half strength, at least four seconds between strikes, nothing under reduced motion. - Manifest version 4 on both sides; weather and flash need it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mrramam
pushed a commit
to mrramam/HomeGlowThemes
that referenced
this pull request
Oct 8, 2026
The sky behind the dashboard changes with the weather: sun or moon and stars, clouds, fog, wind, rain, a downpour, snow, sleet, hail and thunderstorms, each with a night look in dark mode. To the household it is one theme in the picker. Twelve scenes (sunny, partlycloudy, cloudy, fog, windy, rainy, pouring, snowy, snowy-rainy, hail, lightning, lightning-rainy) plus a soft default; windy-variant falls back to windy. Frosted-glass cards, opaque enough to read over a storm. Uses weather scenes and the flash layer, so it needs manifest version 4 (HomeGlow with jherforth/HomeGlow#248); older cores list it as needing a newer HomeGlow. Co-Authored-By: Claude Opus 5.5 <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.
Closes #247 (phase 1: the core). The Weather theme itself, with its art, ships from HomeGlowThemes as phase 2.
What
A theme can now list a scene per weather condition (manifest version 4,
weather), and the display shows the scene for the weather outside. To the household it's still one theme in the picker.Scenes
sunny,partlycloudy,cloudy,fog,windy,windy-variant,rainy,pouring,snowy,snowy-rainy,hail,lightningandlightning-rainy.defaultcovers anything else, or no data.default:pouring→rainy;lightning-rainy→lightning→rainy;hail→snowy-rainy→snowy;windy-variant→windy;partlycloudy→cloudy.Asking for the weather
GET /api/weather/condition?lat=&lon=returns{ condition, checkedAt, maxAgeMs }.Admin → Look → Appearance
These appear when the chosen theme has weather scenes:
Engine
flashlayer for lightning, gentle by design:weatherandflashrequire it.Docs
theme-development.mdhas a new §4b, "Weather scenes", and theflashlayer.theme-architecture.mdlists version 4.features.mdandbackend-api.mdare updated.Tested
npm testpasses 362 of 363. The one failure is the migration-20 test timing out at 30 s under load; alone it passes in 6 s, and this change doesn't touch it. NewweatherCondition.test.jscovers:npx vitest runpasses (545 tests), andnpm run check:i18nandnpm run buildsucceed. New tests cover:pickWeatherScene, with every fallback andclear-night;resolveThemescene merging;🤖 Generated with Claude Code