Independent directory, made by the developer of Vulpo. Not affiliated with Home Assistant or the Open Home Foundation.

About

Trafiklab is a custom integration that shows realtime departures, arrivals and trip plans for Swedish public transport. It adds sensors for upcoming departures and upcoming arrivals at a stop, plus a travel search sensor that plans a journey between an origin and a destination using the Resrobot API. Stop sensors can be narrowed by line, destination text and transport mode, and each sensor has its own time window, refresh interval and result limit. The travel search can also set a maximum walking distance and trip duration, and it can match legs against realtime data to show platform and delay. A button refreshes the data right away, and a stop lookup service finds stop IDs by name. It relies on the Trafiklab cloud with a free API key, and it is set up in the Home Assistant interface.

Automatic summary of the README and code of MrSjodin/HomeAssistant_Trafiklab_Integration. Something wrong, or are you the maintainer and want your own text here? Get in touch

Supports

  • Uses the vendor's cloud Needs an internet connection and an account with the vendor.

  • From the Marketplace Installed through the Marketplace, formerly HACS.

  • Actively maintained Its author released or pushed a change in the last six months.

Provides

  • Sensors

Setting it up

Install it from the Marketplace and restart Home Assistant, then add it under Settings, Devices and services.

Trafiklab

  • Sensor Type
  • API Key
  • Custom sensor name

Configure Stop Sensor

  • Stop ID
  • Line Filter (comma-separated; empty for all lines)
  • Destination Filter (substring; empty for all destinations)
  • Transport Mode(s) (leave empty for all)Leave empty to show all modes.
  • Time Window (minutes ahead to search)
  • Data Refresh Interval (seconds)
  • Update Condition (template; render to 'true' to fetch)
  • Maximum Number of Results (departures/arrivals to return)

Resrobot Travel Search

  • Origin Type
  • Origin (Stop ID or coordinates)
  • Destination Type
  • Destination (Stop ID or coordinates)
  • Via (optional stop ID)
  • Avoid (optional stop ID)
  • Maximum Walking Distance (meters)
  • Maximum Trip Duration (minutes, leave empty for no limit)
  • Transport Mode(s) (leave empty for all)Leave empty to include all modes. Note: if set, walk and transfer legs will be excluded from results.
  • Time Window (minutes ahead to search)
  • Data Refresh Interval (seconds)
  • Include realtime info (platform & delays)When enabled, each public-transport leg is matched against the Timetable Realtime API to resolve the departure platform, delay, and updated departure time. Requires a configured departure or arrival sensor. One extra API call per unique origin stop is made on each refresh.
  • Maximum Number of Results (trips to return)

Configure Sensor

  • Sensor Type
  • Line Filter (comma-separated, leave empty for all lines)
  • Destination Filter (substring; leave empty for all destinations)
  • Transport Mode(s) (leave empty for all)Leave empty to show all modes.
  • Time Window (minutes ahead to search)
  • Data Refresh Interval (seconds)
  • Update Condition (template; render to 'true' to fetch)
  • Maximum Number of Results (departures/arrivals to return)

Reconfigure Stop Sensor

  • API Key
  • Stop ID

Reconfigure Resrobot Travel Search

  • API Key
  • Origin Type
  • Origin (Stop ID or coordinates)
  • Destination Type
  • Destination (Stop ID or coordinates)

After setup

  • Line Filter (comma-separated, leave empty for all lines)
  • Destination Filter (substring; leave empty for all destinations)
  • Transport Mode(s) (leave empty for all)Leave empty to show all modes.
  • Time Window (minutes ahead to search)
  • Data Refresh Interval (seconds)
  • Update Condition (template; render to 'true' to fetch)
  • Maximum Number of Results (departures/arrivals to return)
  • Via (optional stop ID)
  • Avoid (optional stop ID)
  • Maximum Walking Distance (meters)
  • Maximum Trip Duration (minutes, leave empty for no limit)
  • Transport Mode(s) (leave empty for all)Leave empty to include all modes. Note: if set, walk and transfer legs will be excluded from results.
  • Time Window (minutes ahead to search)
  • Data Refresh Interval (seconds)
  • Include realtime info (platform & delays)When enabled, each public-transport leg is matched against the Timetable Realtime API to resolve the departure platform, delay, and updated departure time. Requires a configured departure or arrival sensor. One extra API call per unique origin stop is made on each refresh.
  • Maximum Number of Results (trips to return)

Texts from the code of MrSjodin/HomeAssistant_Trafiklab_Integration.

Entities

  • ButtonsUpdate now
  • SensorsUpcoming Departures, Upcoming Arrivals, Travel Search

Troubleshooting

  • DiagnosticsDownloads a diagnostics file to attach to a bug report.

From the README

Trafiklab Home Assistant custom integration for Swedish public transport, using the Trafiklab Realtime API and Trafiklab Resrobot API, presents you the timetables for a stop as well as the full route plan for your travel. The integration covers all major public transport operators in Sweden — not just SL. See Operators for the full list.

This integration is entirely community-developed and is not developed by, or in collaboration with, Trafiklab/Samtrafiken. Trafiklab/Samtrafiken has given the project a thumbs-up though — see Trafiklab Praise page.

  • Real-time departures and arrivals: Live departure and arrival information from any Trafiklab-covered stop in Sweden
  • Resrobot end-to-end travel search: Trip planning between origin and destination (stop ID, coordinates, stop name, HA zone, or person entity)
  • Line filtering: Monitor specific lines by filtering with comma-separated line numbers, per sensor
  • Destination filtering: Filter by (substring) text match of destination(s) at a stop (useful for busy stops), per sensor
  • Configurable time window: Set how many minutes ahead to search (1-1440 minutes), per sensor
  • Configurable result count: Set how many departures/arrivals or trips are returned (1-100, default 10), per sensor
  • Maximum trip duration filter: For Travel Search sensors, exclude trips longer than a configurable limit (1-1440 minutes)
  • Transport mode filtering: Filter by transport category — Bus, Metro, Train, Tram, or Boat/Ferry — for both Realtime and Travel Search sensors
From the README of MrSjodin/HomeAssistant_Trafiklab_Integration, MIT License. Shortened.

Shows in Vulpo

Button card, Chart card, Apple Watch.

Information

Installs
80 sharing analytics
GitHub stars
16
Connection
Uses the vendor's cloud
Upkeep
Updated in the last 6 months
Version
v1.1.1,
Category
Vehicles and transport, Public transport
Kind
Marketplace integration
Needs
Needs the Marketplace (HACS on 2026.10 and older)
Domain
trafiklab

You might also like

Independent directory, made by the developer of Vulpo. Not affiliated with Home Assistant or the Open Home Foundation. About these numbers