Initial version v0.4.5
Release Notes - v0.4.5
🎉 Initial Public Release
I'm excited (mostly nervous though) to publish the very first public release of the Home Assistant Trafiklab Integration! This integration brings arrival and departure information from the Swedish public into your Home Assistant setup using the modern Trafiklab Realtime API (currently in beta).
✨ What's to say about this integration?
Core Features
- Departures and arrivals - Get timetable information from any stop in Sweden by the connected traffic operators
- Real-time information - Many of the traffic operators provide realtime information (see below)
- Nationwide coverage - Support for most major Swedish public transport operators through Trafiklab API
- Flexible sensor configuration - Create separate sensors for departures or arrivals
- Smart filtering options - Filter by specific lines and directions per sensor
- Configurable time windows - Search 1-1440 minutes ahead
- Customizable refresh intervals - Balance API usage with update frequency (60-3600 seconds)
Transport Operators Coverage
- Multiple transport modes: Buses, trains, metro, trams, and ships
- Real-time operators: SL, UL, Östgötatrafiken, JLT, Kronoberg, KLT, Skånetrafiken, Värmlandstrafik, Örebro, Västmanland, Dalatrafik, X-trafik, Din Tur
- Timetable operators: 25+ additional operators including Västtrafik, SJ, Norrtåg, and more
User Experience
- Easy configuration - Step-by-step setup through Home Assistant UI
- Stop lookup service - Search for stops by name directly in Home Assistant
- Multi-language support - English and Swedish translations
- Extended sensor data - Attributes including real-time status, deviations, and platform information
Technical Features
- Modern API integration - Uses the latest Trafiklab Realtime API
- Robust error handling - Graceful handling of API errors and connectivity issues
- Efficient data processing - Smart caching and update coordination
- HACS compatible - Easy installation and updates through HACS
📊 Sensor Types
Departure Sensors
- Next Departure - Shows time until next departure with full details as well as upcoming within time window
Arrival Sensors
- Next Arrival - Shows time until next arrival with full details as well as upcoming within time window
🔧 Configuration Options
- Line filtering - Monitor specific bus/train lines (comma-separated)
- Direction filtering - Filter by direction at stops (Direction 1, Direction 2, or Both)
- Time window - Search 1-1440 minutes ahead (default: 60 minutes)
- Refresh interval - Update every 60-3600 seconds (default: 300 seconds)
🛠️ Services
Stop Lookup Service
service: trafiklab.stop_lookup
data:
api_key: "your_api_key"
search_query: "Stockholm"Returns structured data for easy automation and provides service responses visible in the Services page.
📋 Requirements
- Home Assistant 2023.1.0 or later
- Free Trafiklab API key from trafiklab.se
🚀 Installation
HACS (Recommended)
- Add this repository to HACS as a custom repository
- Search for "Trafiklab" in HACS
- Install the integration
- Restart Home Assistant
Manual Installation
- Copy
custom_components/trafiklab/to your Home Assistant - Restart Home Assistant
📖 Getting Started
- Get API Key - Register at trafiklab.se for free API access
- Find Your Stop - Use the built-in stop lookup service to find area IDs
- Add Integration - Go to Settings → Devices & Services → Add Integration → Trafiklab
- Configure Sensors - Set up departure/arrival sensors with your preferred filters
🤝 Docs
- Documentation: GitHub Repository
- Issues: Report bugs and feature requests
- API Documentation: Trafiklab API Docs
📄 License
This project is licensed under Creative Commons Attribution-NonCommercial 4.0 International License.
🙏 Acknowledgments
- Trafiklab for providing excellent public transport APIs
- Home Assistant community for development documentation and support
- HASL developers for inspiration from their SL integration - this is not a replacement since I believe HASL is great for SL
- Claude Sonnet 4 for development assistance and helping me out when the Waters are a Little deep
Migration note: This is the initial public release - no migration needed for new installations.