Add Weather Clock With Date OG app - #592
Conversation
A recreation of the original Tidbyt OG weather clock: time, weather icon, temperature, humidity, and an optional day/date column, with a dimmed night mode. Supports NWS (no key needed) or OpenWeather.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughA new 64x32 Weather Clock With Date OG app renders configurable time, weather, humidity, and date information. It supports National Weather Service and OpenWeather data sources, cached retrieval, night mode, blinking separators, custom glyphs, app registration, documentation, and a preview asset. ChangesWeather Clock With Date OG
Estimated code review effort: 4 (Complex) | ~45 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant AppRuntime
participant main
participant get_weather
participant WeatherAPI
participant render.Root
AppRuntime->>main: configuration
main->>get_weather: provider and location settings
get_weather->>WeatherAPI: fetch and normalize weather data
WeatherAPI-->>get_weather: weather object or fallback data
get_weather-->>main: weather object
main->>render.Root: time, weather, and animation frames
render.Root-->>AppRuntime: rendered display
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/weatherclockdateog/weatherclockdateog.star`:
- Around line 165-178: Update is_night to validate night_start and night_end
before calling int(), accepting only the expected four-digit HHmm format with
valid hour and minute ranges. For malformed values such as “11pm” or “23:00”,
use a safe fallback behavior instead of parsing, while preserving normal
night-mode handling for valid inputs; do not use try/catch.
- Around line 105-111: Update the schema.Text definition for the api_key field
to include secret = True, ensuring the OpenWeather API key is treated as a
protected value in the configuration UI while preserving its existing metadata
and default.
- Around line 536-538: Update default_weather() to return None for temp and
humidity instead of 0, while preserving the existing cloudy condition and empty
description. This will route fetch failures through build_weather_row’s existing
temp == None placeholder handling; leave no_api_key_weather() and successful
weather responses unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f7993b47-6fc9-4dbb-aa08-770baa13c4b6
⛔ Files ignored due to path filters (15)
apps/weatherclockdateog/images/cloudy.pngis excluded by!**/*.pngapps/weatherclockdateog/images/foggy.pngis excluded by!**/*.pngapps/weatherclockdateog/images/haily.pngis excluded by!**/*.pngapps/weatherclockdateog/images/moony.pngis excluded by!**/*.pngapps/weatherclockdateog/images/moonyish.pngis excluded by!**/*.pngapps/weatherclockdateog/images/rainy.pngis excluded by!**/*.pngapps/weatherclockdateog/images/sleety.pngis excluded by!**/*.pngapps/weatherclockdateog/images/sleety2.pngis excluded by!**/*.pngapps/weatherclockdateog/images/snowy.pngis excluded by!**/*.pngapps/weatherclockdateog/images/snowy2.pngis excluded by!**/*.pngapps/weatherclockdateog/images/sunny.pngis excluded by!**/*.pngapps/weatherclockdateog/images/sunnyish.pngis excluded by!**/*.pngapps/weatherclockdateog/images/thundery.pngis excluded by!**/*.pngapps/weatherclockdateog/images/tornady.pngis excluded by!**/*.pngapps/weatherclockdateog/images/windy.pngis excluded by!**/*.png
📒 Files selected for processing (4)
apps/weatherclockdateog/README.mdapps/weatherclockdateog/manifest.yamlapps/weatherclockdateog/weatherclockdateog.starapps/weatherclockdateog/weatherclockdateog.webp
…es, fix fetch-failure fallback - schema.Text for api_key now uses secret = True so it's masked in the config UI. - is_night validates night_start/night_end as strict 4-digit HHmm with valid hour/minute ranges before parsing, falling back to defaults on malformed input (e.g. "11pm") instead of crashing int(). - default_weather() now returns None for temp/humidity on a genuine fetch failure, routing through the existing no-data placeholder path instead of silently displaying a fake 0°/0%.
Switch the day/date column from tom-thumb to CG-pixel-3x5-mono and nudge the two lines 1px apart (day up 1px, date down 1px) for better visual separation.
|
looks good to me. Although I think coderabbit was being a little bit overzelous about marking the api key secret. Who cares if somebody see the first 5 digits of your api key. Its more annoying than anything. I'll just reverse that and then merge. |
Weather Clock With Date OG
A recreation of the original Tidbyt "OG" weather clock, rebuilt from a reference photo of the original device and cross-checked against the original app's source for accurate fonts and layout. This isn't a 1:1 port though — it fixes a couple of things and adds a few options on top of the original:
Improvements over the original
5x8and6x13fonts — Pixlet's built-in fonts render0noticeably thinner than the other digits at this size, which reads as a misaligned/inconsistent digit next to1-9. Hand-drawn replacement glyphs now match the width of the rest of the digits.What it shows
Data
Configuration
Location, 12/24-hour clock, imperial/metric units, time/temperature/humidity colors, temperature unit suffix toggle, day/date toggle, blinking colon toggle, and night mode with configurable start/end time.
Validation
pixlet formatandpixlet check apps/weatherclockdateogpass.pixlet lint apps/weatherclockdateog/weatherclockdateog.starpasses with no warnings.Summary by CodeRabbit