Skip to content
led-ticker

MLB attendance widget

How packed the ballpark was last night, and what the weather did to it — the paid crowd, the percent full, and a capacity bar that fills up right on the wall.

The baseball.attendance widget (type = "baseball.attendance", from the baseball plugin) shows one team’s game-day attendance and conditions as a hero card, or the day’s league-wide crowd superlatives. On a wide sign the card draws an animated capacity bar that fills from empty to the gate count with a tick marking the team’s season average. Data comes from MLB’s free StatsAPI — no API key, no account, it just works.

baseball.attendance on a long panel: a team card — paid crowd, game-day weather (72° CLEAR), percent full, difference vs season average, and stadium name, with a capacity bar animating from empty to the gate count past a season-average tick — then a league FULLEST PARK superlative card.
baseball.attendance on a long panel: a team card — paid crowd, game-day weather (72° CLEAR), percent full, difference vs season average, and stadium name, with a capacity bar animating from empty to the gate count past a season-average tick — then a league FULLEST PARK superlative card.

That animated capacity bar is the wide- and tall-sign look; the narrowest sign shows a scrolling attendance line instead — same widget, no config change.

Requires led-ticker-core >= 4.9. The demo = true mode used for the GIF on this page needs led-ticker-baseball >= 1.6.0.

Install the plugin first (steps just below this snippet), then drop it into a section:

[[playlist.section]]
mode = "slideshow"
hold_time = 8
[[playlist.section.widget]]
type = "baseball.attendance"
team = "TOR"

There are no required fields. Set a team for that team’s game card; omit it for league-wide superlatives.

To install the plugin on a Docker deploy, add its line to the plugin manifest and restart:

Terminal window
# First plugin? Create your manifest from the example:
cp -n config/requirements-plugins.example.txt config/requirements-plugins.txt
# Add the package (one name per line), then restart:
echo "led-ticker-baseball==1.6.0" >> config/requirements-plugins.txt
docker compose restart

Other install paths (web UI Store tab, dev checkout) are on the Plugins page.

Set demo = true to render a fixed team card — with game-day weather and the animated capacity bar — with no StatsAPI call and no network:

[[playlist.section]]
mode = "slideshow"
hold_time = 6
[[playlist.section.widget]]
type = "baseball.attendance"
demo = true

This is the exact widget block that rendered the hero GIF above (its full render config is baseball-attendance.toml, a [display] at default_scale = 4 with this one section). Because a real team card only appears after the game goes Final, demo mode is the reliable way to see the card and its bar on demand — no waiting for a game to end.

Two modes: team card or league superlatives

Section titled “Two modes: team card or league superlatives”

Which mode you get is chosen by whether you set a team:

  • Team (team set) — that team’s game. The card shows the big paid-attendance number, then — once Final — a % FULL column and a VS AVG column (the difference against the team’s season home average, green at or above average and red below). A capacity bar fills to the game’s actual paid/capacity fraction in the home team’s brand color, with a bright vertical season-average tick marking where a typical crowd would land — a quick “packed house vs. ordinary night” read. Before the game is Final there’s no attendance number yet, so it falls back to a scrolling next-game line with the venue and weather.
  • League-wide (no team) — the day’s crowd superlatives: Biggest crowd 45,123 — Dodger Stadium, plus smallest crowd and fullest/emptiest park by capacity %. The superlative card shows the label (BIGGEST CROWD, FULLEST, …), the big value, the venue name, and a team-colored chip identifying the home club, with the bar in that team’s color (no season-average tick — a league record isn’t tied to one team’s history).

The bar always animates: on every card entry it grows from empty to its resting fraction over about a second, then holds for the rest of the visit. Re-entering the section always re-fills from empty — it never resumes mid-fill.

On a narrow sign you get a scrolling attendance line; on a wider or taller sign you get the hero card with the animated capacity bar from the GIF above — both wider builds draw the bar, more compact on a mid-width sign and full-width on the longest. You don’t pick: layout (omit it — the default "auto") resolves at draw time from your sign’s real physical width.

Not sure which you have? Most short DIY builds are smallsign (scale-1); the 256- and 512-pixel-wide panels are bigsign and longboi — see the hardware guides. New here? Get a sign running first.

Your signWhat you see
smallsign (~160×16, scale-1)a scrolling line (TOR · Rogers Centre 41,212 (90%) · 72° Clear)
bigsign (~256px, scale>1)the big hero card — draws the animated capacity bar
longboi (~512px, scale>1)the long hero card — full-width, adds the weather line

Pin a shape explicitly with layout = "big" or layout = "long" (both force a hero card regardless of width).

There are no required fields; everything is optional.

FieldTypeDefaultNotes
teamstrunsetSet → that team’s game card; omit → league-wide superlatives. Case-insensitive.
layout"auto" / "big" / "long""auto"Explicit override; omit to auto-select from real panel width — see One widget, every sign.
statslist of strall fourLeague mode only, in display order: "biggest_crowd", "smallest_crowd", "fullest", "emptiest". Omit for all four.
titlestr"Attendance"Section title override.
timezonestr (IANA)system localTimezone for the “Today” label and the day rollover. See Scheduling.
font_colorcolor / "rainbow" / "color_cycle" / "shimmer" / tablecallout colorsRGB list tints body text; the day label, amber value, and venue/team color keep their callout colors. Scale-1 only. See Color providers.
fontstr"6x12"Display font. A hires name needs font_size. Scale-1 only.
bg_color[r, g, b]noneBackground fill behind the messages. Scale-1 only.
paddingint, px6Horizontal spacing after each line when scrolling.
update_intervalint, seconds1800 (30 min)How often to poll StatsAPI for fresh attendance and conditions — see Data source.
demoboolfalseRender the fixed team card instead of calling StatsAPI — see Try it in demo mode.
scheduletablenoneCore visibility window — only show this widget during set hours. See Scheduling.

Attendance and conditions come from MLB’s StatsAPI — free and keyless. The widget refreshes every update_interval seconds (1800, or 30 minutes, by default), and a schedule check skips the per-game fetches when nothing has changed. Attendance is a post-game number, so a team card only fills in its paid crowd and fill % once the game is Final; before that it shows the venue and weather on a scrolling next-game line. Fill % is omitted when a venue lists no capacity (spring sites). With nothing Final yet it shows yesterday’s data (short-date labeled); with no games at all, Next game: <date> (team) or Next games: <date> (league); a fetch failure shows No Data.

  • Nothing shows up at all — a blank panel. Most likely the widget block isn’t nested inside a [[playlist.section]] — a bare [[playlist.section.widget]] yields zero sections and a blank sign. Every snippet on this page shows the wrapper. Also rule out that the baseball plugin isn’t installed (see the install step above), which usually surfaces as unknown widget type 'baseball.attendance' at config-load.
  • My team card isn’t showing — I only get a scrolling next-game line. Attendance is a post-game number, so the team card appears once that day’s game is Final; before then it falls back to the venue-and-weather scrolling line. To preview the finished card on demand, set demo = true.
  • The capacity bar isn’t animating — I only get a scrolling line. The animated bar is on the scale>1 hero cards; a smallsign always scrolls. Render on a default_scale = 4 config with demo = true to see the bar fill.
  • Fill % is missing. The venue lists no capacity (common at spring-training sites), so there’s no denominator for a percentage — the crowd count still shows.

Haven’t tried it yet? Try it in demo mode above takes about two minutes, no key and no network. Implementation notes live in the baseball package README.

The baseball plugin ships four more widgets that share this data and design. Put the crowd card in a game-day rotation next to baseball.scores for the live game, baseball.standings for the division race, the family showpiece baseball.statcast — the day’s longest home run drawing its own trajectory arc — and baseball.promotions so you never miss bobblehead night. It also brings the baseball.roll* rolling-ball sprite transition and the :baseball.ball: emoji.