Skip to content

Add Weather Clock With Date OG app - #592

Merged
tavdog merged 10 commits into
tronbyt:mainfrom
alustig:add-weather-clock-date-og
Jul 27, 2026
Merged

Add Weather Clock With Date OG app#592
tavdog merged 10 commits into
tronbyt:mainfrom
alustig:add-weather-clock-date-og

Conversation

@alustig

@alustig alustig commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Weather Clock With Date OG

Weather Clock With Date OG preview

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

  1. Accurate, working weather data from the National Weather Service or OpenWeather (free API key), instead of stale or broken data.
  2. Fixed the narrow "0" glyph in both the 5x8 and 6x13 fonts — Pixlet's built-in fonts render 0 noticeably thinner than the other digits at this size, which reads as a misaligned/inconsistent digit next to 1-9. Hand-drawn replacement glyphs now match the width of the rest of the digits.
  3. Added an optional day-of-week and date column next to the weather.
  4. Added independent color options for temperature and humidity, on top of the existing time color.

What it shows

  • Time with a blinking colon separator, weather icon, temperature, and humidity.
  • Optional day-of-week and date column next to the weather.
  • Dimmed, clock-only night mode for a configurable overnight window.

Data

  • Defaults to the National Weather Service (US only, no API key required).
  • OpenWeather also supported for non-US locations, with a user-supplied API key.
  • Falls back to a "no key" placeholder (and hides the day/date column) when OpenWeather is selected without a key.

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 format and pixlet check apps/weatherclockdateog pass.
  • pixlet lint apps/weatherclockdateog/weatherclockdateog.star passes with no warnings.
  • Manually rendered and visually verified against live NWS data.

Summary by CodeRabbit

  • New Features
    • Added the “Weather Clock With Date OG” app rendering a 64x32 display with local time (optional blinking separator), weather icon, temperature, and humidity, plus optional day/date.
    • Supports 12/24-hour formats, unit selection, customizable colors, and night mode dimming.
    • Retrieves weather from National Weather Service by default, with optional OpenWeather support when an API key is provided.
  • Documentation
    • Documented configuration options and weather-source behavior.
  • Assets
    • Added/updated the app’s animated preview WebP asset.
  • Release Packaging
    • Added an app manifest entry for the new app.

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.
@alustig
alustig requested a review from tavdog as a code owner July 26, 2026 04:05
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 89e8e2df-08f0-483d-aa8b-dc903f73e6f2

📥 Commits

Reviewing files that changed from the base of the PR and between 52af575 and a0740c2.

📒 Files selected for processing (2)
  • apps/weatherclockdateog/manifest.yaml
  • apps/weatherclockdateog/weatherclockdateog.star

📝 Walkthrough

Walkthrough

A 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.

Changes

Weather Clock With Date OG

Layer / File(s) Summary
Configuration and display rendering
apps/weatherclockdateog/weatherclockdateog.star, apps/weatherclockdateog/weatherclockdateog.webp
Adds configuration, custom digit glyphs, time and weather rows, weather icons, date layout, 64x32 frame composition, and the preview asset.
Runtime orchestration and night mode
apps/weatherclockdateog/weatherclockdateog.star
Parses configuration, resolves local time, selects normal or night rendering, supports blinking frames, fetches weather, and returns the render root.
Weather service retrieval and normalization
apps/weatherclockdateog/weatherclockdateog.star
Adds provider dispatch, OpenWeather caching and code mapping, NWS grid and station retrieval, observation caching, condition normalization, and hourly forecast fallback.
App metadata and usage documentation
apps/weatherclockdateog/manifest.yaml, apps/weatherclockdateog/README.md
Registers the app and documents its display, providers, settings, and fallback behavior.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested reviewers: tavdog

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
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the new Weather Clock With Date OG app added in this PR.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between ca683aa and 4ef804e.

⛔ Files ignored due to path filters (15)
  • apps/weatherclockdateog/images/cloudy.png is excluded by !**/*.png
  • apps/weatherclockdateog/images/foggy.png is excluded by !**/*.png
  • apps/weatherclockdateog/images/haily.png is excluded by !**/*.png
  • apps/weatherclockdateog/images/moony.png is excluded by !**/*.png
  • apps/weatherclockdateog/images/moonyish.png is excluded by !**/*.png
  • apps/weatherclockdateog/images/rainy.png is excluded by !**/*.png
  • apps/weatherclockdateog/images/sleety.png is excluded by !**/*.png
  • apps/weatherclockdateog/images/sleety2.png is excluded by !**/*.png
  • apps/weatherclockdateog/images/snowy.png is excluded by !**/*.png
  • apps/weatherclockdateog/images/snowy2.png is excluded by !**/*.png
  • apps/weatherclockdateog/images/sunny.png is excluded by !**/*.png
  • apps/weatherclockdateog/images/sunnyish.png is excluded by !**/*.png
  • apps/weatherclockdateog/images/thundery.png is excluded by !**/*.png
  • apps/weatherclockdateog/images/tornady.png is excluded by !**/*.png
  • apps/weatherclockdateog/images/windy.png is excluded by !**/*.png
📒 Files selected for processing (4)
  • apps/weatherclockdateog/README.md
  • apps/weatherclockdateog/manifest.yaml
  • apps/weatherclockdateog/weatherclockdateog.star
  • apps/weatherclockdateog/weatherclockdateog.webp

Comment thread apps/weatherclockdateog/weatherclockdateog.star
Comment thread apps/weatherclockdateog/weatherclockdateog.star
Comment thread apps/weatherclockdateog/weatherclockdateog.star
alustig and others added 4 commits July 26, 2026 07:36
…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.
@tavdog

tavdog commented Jul 27, 2026

Copy link
Copy Markdown
Member

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.

@tavdog
tavdog merged commit 4145d1e into tronbyt:main Jul 27, 2026
1 check was pending
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