Salidas de UTA en Home Assistant

Muestra el próximo autobús o tren de tu parada en un panel de Home Assistant, una pantalla inteligente o una automatización. Cada página de parada tiene una configuración lista para copiar.

Esta página solo está disponible en inglés. Ver la versión en inglés

What you get

Next departure

Minutes until the next bus or train leaves your stop, as a number you can use in automations, like a reminder to leave. It shows as unavailable when nothing is coming in the next three hours.

Departures

The next three as text, for a dashboard card or a smart display: Green to West Valley: 12 min · Green to West Valley: 27 min · Green to West Valley: 42 min

Set it up

  1. 1

    Find your stop

    Search for it, or tap it on the live map. For TRAX, FrontRunner and the S-Line, search the station name: each platform is its own stop, one per direction.

  2. 2

    Copy the setup

    On the stop's page, open Home Assistant, then Show the setup, and copy it. It already has the stop's name, number and data address.

  3. 3

    Paste it into configuration.yaml

    If the file already has a rest: section, add the entry under it instead of adding a second rest: key.

  4. 4

    Restart and add a card

    Restart Home Assistant, then add the two sensors to a dashboard. They update once a minute.

The data

Each stop's next departures (up to ten, three hours ahead) are in a small JSON file that is rewritten every 30 seconds. Stops are spread over 64 files; the stop's page shows the exact address, which ends in /live/stops/<n>.json.

In that file, stops["<stop number>"] lists departures as [route, destination, time, kind, vehicle, delay, direction]. route and destination point into the file's routes and heads lists, time is in Unix seconds, kind is 0 for a tracked vehicle, 1 for the schedule and 2 for a trip that isn't being tracked, and delay is in seconds. Route rows are [id, label, color, text color, mode, slug, name].

Use it fairly

  • Check at most once a minute; the files change every 30 seconds.
  • Personal dashboards, displays and automations are welcome. For anything bigger, use UTA's official GTFS and GTFS-realtime feeds directly.
  • Times come from UTA's feeds and can be wrong. Confirm with UTA when it matters.
  • High Valley Transit and University of Utah stops aren't in these files yet.