Skip to content

Make forecast hours and day-range user-configurable - #5

Merged
yeled merged 1 commit into
mainfrom
configurable-slots
Jun 24, 2026
Merged

yeled merged 1 commit into
mainfrom
configurable-slots

Conversation

@yeled

@yeled yeled commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a Forecast Range custom field: 1 day (8 slots/day) or 2 days (4 slots/day). Slot count is fixed per range so the grid always wraps cleanly.
  • Adds a Forecast Hours custom field letting users pick which hours fill those slots (comma-separated 24h hours). Wrong count for the chosen range is ignored in favour of the default for that range.
  • Wired through trmnl_report.py's CLI (--days, --hours), weather.cgi's query string, and the plugin's polling_url in src/settings.yml.
  • Old polling URLs with no days/hours params still default to the original 2-day/4-slot behavior.

Test plan

  • resolve_slots() unit-checked: correct defaults per mode, valid overrides accepted, wrong-count/duplicate/garbage overrides fall back to defaults.
  • weather.cgi tested directly via QUERY_STRING — custom hours flow through correctly, and the no-params case still returns the original 2-day/4-slot payload.
  • CLI --days 2 --hours "7,11,15,19" verified to produce the expected custom slots.

🤖 Generated with Claude Code

Adds a Forecast Range custom field (1 day/8 slots vs 2 days/4 slots)
and a Forecast Hours field letting users pick which hours fill those
slots. Slot count stays fixed per range so the grid always wraps
cleanly; an hours override with the wrong count is ignored in favour
of the default for that range. Wired through trmnl_report.py's CLI
(--days/--hours), weather.cgi's query string, and the plugin's
polling_url custom fields.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@yeled
yeled merged commit e7bc032 into main Jun 24, 2026
1 check passed
@yeled
yeled deleted the configurable-slots branch June 24, 2026 06:14
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.

1 participant