Get Full Departures List Action #1956
Unanswered
Jawar19
asked this question in
Integration enhancements
Replies: 1 comment
-
|
🏷️ I've automatically added the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Integration name
rejseplanen
Link to integration documentation on our website
https://www.home-assistant.io/integrations/rejseplanen/
Describe the enhancement
Feature: Get Full Departures List Action
Add a service/action
rejseplanen.get_departuresthat returns a complete list of all upcoming departures for a specified stop, including all available attributes and details. This action would provide the rich departure data needed by custom cards and advanced automations.This feature request is based loosely on the archived custom card by @Darkfox
Action Response
The action should return a data structure containing:
{ "departures": [ { "line": "1A", "direction": "Nørrebro", "type": "BUS", "scheduled_time": "2025-12-07T08:15:00+01:00", "realtime_time": "2025-12-07T08:18:00+01:00", "delay_minutes": 3, "track": "2", "is_delayed": true, "is_cancelled": false, "operator": "Movia", "stop_id": "8600617", "stop_name": "Roskilde St.", "final_stop": "Nørrebro Station" }, { "line": "2B", "direction": "Sydhavn", "type": "BUS", "scheduled_time": "2025-12-07T08:25:00+01:00", "realtime_time": "2025-12-07T08:25:00+01:00", "delay_minutes": 0, "track": null, "is_delayed": false, "is_cancelled": false, "operator": "Movia", "stop_id": "8600617", "stop_name": "Roskilde St.", "final_stop": "Sydhavn" } ], "stop_id": "8600617", "stop_name": "Roskilde St.", "fetched_at": "2025-12-07T08:10:30+01:00", "total_departures": 15 }Parameters
Use cases
The current sensor entities only display the next single departure, limiting the ability to create rich, information-dense transit dashboards. Many users and custom card developers (like rejseplanen-card) need access to multiple upcoming departures with complete attribute information.
Specific use cases:
Custom card integration: Developers can use the action response to populate custom Lovelace cards that display multiple departures with detailed information, real-time delays, and visual indicators for cancelled or delayed services.
Smart departure alerts: Automations can trigger the action and analyze the full departure list to send intelligent notifications:
Dashboard templates: Create template sensors or templates that extract specific information from the departure list:
Cross-stop comparison: Users planning trips can call the action for multiple stops and compare options:
Example automation using the action:
Example custom card usage:
Custom card developers can use this in their Lovelace YAML:
This approach provides complete flexibility for advanced users and developers while maintaining clean, standards-compliant sensor entities for basic use cases. The action-based design prevents sensor entity bloat while enabling sophisticated transit planning integrations.
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions