Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions apps/homegame/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ESPN's unofficial college football API:

The scoreboard only ever covers FBS, with or without `groups=80`. A smaller
division team whose payload has no `nextEvent` therefore has no second source,
and the app says so with **No game** instead of blanking the panel.
and the app treats it as having no game scheduled.

## Display layout

Expand Down Expand Up @@ -88,12 +88,13 @@ that length sits flush against the edge with every glyph intact.
down to; without this state the panel sat at `0m` until midnight.
5. **Postponed / Canceled** — `POSTPONED` or `CANCELED` in amber. These arrive as the
same `post` state as a finished game, so they are separated out by status name.
6. **No game** — ESPN answered but the team has nothing scheduled: `NO GAME` in amber
over a wrapped line. This is the off-season display, so it is a normal state, and
amber rather than red because nothing is wrong.
7. **Unreachable** — ESPN could not be reached at all: `main` returns `[]`, so the app
sits the cycle out instead of holding the panel on a failure the viewer cannot fix.
A team that simply has nothing scheduled is **not** this state — it is state 6.
6. **No game** — ESPN answered but the team has nothing scheduled, the normal
off-season condition: `main` returns `[]`, so the app is left out of the rotation
instead of spending a slot saying there is nothing to show. It reappears on its own
once a game is on the schedule.
7. **Unreachable** — ESPN could not be reached at all: `main` also returns `[]`, so the
app sits the cycle out instead of holding the panel on a failure the viewer cannot
fix.

"Game day" means the same calendar day as kickoff in the display timezone, not a
rolling 24-hour window.
Expand Down
50 changes: 4 additions & 46 deletions apps/homegame/homegame.star
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,10 @@ def main(config):
return []

# ESPN answered, but this team has nothing on the schedule - the normal
# state for most of the year.
# state for most of the year. Skip the tile rather than spend the
# rotation slot saying so.
if game_data == None:
return render_notice("NO GAME", "Nothing scheduled")
return []

# Parse game data
our_team = game_data.get("our_team", "TEAM")
Expand Down Expand Up @@ -349,7 +350,7 @@ def get_next_game_from_scoreboard(team_id, timezone):

The scoreboard only covers FBS, so this cannot help a smaller-division
team. That is fine: when the search comes up empty it returns None, and
the caller shows "NO GAME" rather than blanking the panel.
the caller skips the tile.

Args:
team_id: ESPN team ID
Expand Down Expand Up @@ -721,49 +722,6 @@ def render_game_display(our_team, opponent, is_home_game, kickoff_date, kickoff_
),
)

def render_notice(headline, message):
"""
Renders a short headline over an explanatory line.

Used for the states that have no game to show. Amber rather than red:
an empty schedule is the normal off-season condition, not a fault.

Args:
headline: Short all-caps word or two
message: Explanatory line below it

Returns:
render.Root object
"""

return render.Root(
child = render.Box(
child = render.Column(
expanded = True,
main_align = "center",
cross_align = "center",
children = [
render.Text(
content = headline,
font = "6x13",
color = "#FFA500",
),
render.Box(width = 64, height = 2),

# Wrapped, because the messages are longer than the 64px
# panel - a plain Text clips them at both ends.
render.WrappedText(
content = message,
font = "tb-8",
color = "#FFFFFF",
width = 64,
align = "center",
),
],
),
),
)

def get_schema():
"""
Defines the configuration schema for user customization.
Expand Down
2 changes: 1 addition & 1 deletion apps/homegame/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ tags:
- ncaa
- countdown
published: '2026-11-07T03:04:19Z'
updated: '2026-11-08T06:58:29Z'
updated: '2026-11-29T22:35:40Z'