Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

If you found a bug, please report it on the [Issues](https://github.com/bcpearce/homeassistant-gtfs-realtime/issues) page.

**This feed isn't working**
### This feed isn't working

While GTFS stands for *General* Transit Feed Specification, there is much variation in the way that a specific provider may configure their feeds. This repository tries to keep a number of feed specs up to date both to confirm compatibility with various providers, and for convenience in setting up the integration in Home Assistant.

Expand All @@ -21,13 +21,17 @@ Feeds are checked daily in a GitHub Actions Workflow. You can check the most rec

[![Check GTFS Feed Compatibility](https://github.com/bcpearce/homeassistant-gtfs-realtime/actions/workflows/feed_compatibility.yaml/badge.svg)](https://github.com/bcpearce/homeassistant-gtfs-realtime/actions/workflows/feed_compatibility.yaml)

**Other Bugs**
### This Translation Is Not Accurate

This project was developed in English and translations were originally provided by Gemini. If you are fluent in any of the translations provided and find an error, please open an Issue or Pull Request to correct it.

### Other Bugs

This project relies on [gtfs-station-stop](https://github.com/bcpearce/gtfs-station-stop) for grabbing and formatting data feeds into an "arrival clock" style that can be used in Home Assistant. This is consistent with the [Home Assistant Developer Documentation](https://developers.home-assistant.io/docs/creating_platform_index#interfacing-with-devices) recommendations, however it can make bug reporting slightly more complex as it may need to be fixed in the underlying Python library. Note that issues reported for bugs in this integration may be solved with updates to the underlying data provider library instead.

## Features

**Adding feeds**
### Adding feeds

If you have a custom feed that works with this repository, feel free to open a pull request adding it to help out any other users. See [feeds.json](/custom_components/gtfs_realtime/feeds.json) for the schema.
- If authentication is required, provide an `auth_hint` or placeholder in the URL.
Expand Down
29 changes: 14 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@
![GTFS Realtime](resources/logo.svg)
# GTFS Realtime for Home Assistant

Add public transit arrivals and alerts to your Home Assistant Dashboards and Automations.

[![Coverage Status](https://coveralls.io/repos/github/bcpearce/homeassistant-gtfs-realtime/badge.svg?branch=main)](https://coveralls.io/github/bcpearce/homeassistant-gtfs-realtime?branch=main)

[![Check GTFS Feed Compatibility](https://github.com/bcpearce/homeassistant-gtfs-realtime/actions/workflows/feed_compatibility.yaml/badge.svg)](https://github.com/bcpearce/homeassistant-gtfs-realtime/actions/workflows/feed_compatibility.yaml)

## Installation

This integration can be installed manually or through [HACS](https://hacs.xyz/). HACS is recommended.

> [!NOTE]
> As of version 0.4.0, realtime location is available for vechicles in *some* cases. This currently is being tested with NYC Subway locations using a "best guess" method of checking the stop update closest to the current time.
> For more about [Realtime Data](#realtime-data-experimental)
[HACS](https://hacs.xyz/) is recommended for installation.

#### HACS

Expand All @@ -28,9 +26,9 @@ Copy files in [custom_components/gtfs_realtime](custom_components/gtfs_realtime/

Once the integration is installed, configure the integration through Settings >> Devices and Services, and use "Add Integration". Select GTFS Realtime and follow the instructions in the user interface.

You can select a supported provider or configure it manually. A number of GTFS providers are included for convenience in this repository.
You can select a supported provider or configure it manually. A number of GTFS providers are included for convenience in this repository. If you have a feed configuration that is not part of the defaults [pull requests are welcome](/.github/CONTRIBUTING.md#adding-feeds).

There is no guarantee that these providers will continue to work with this integration. A [GitHub Action Workflow](https://github.com/bcpearce/homeassistant-gtfs-realtime/actions/workflows/feed_compatibility.yaml) runs to check the status of each feed.
There is no guarantee that these providers will continue to work with this integration. A [GitHub Action Workflow](https://github.com/bcpearce/homeassistant-gtfs-realtime/actions/workflows/feed_compatibility.yaml) runs daily to check the status of each feed.

### Realtime Feed URLs

Expand Down Expand Up @@ -58,15 +56,17 @@ The [resources/NYCT_Bullets](resources/NYCT_Bullets/) folder contains ready-to-u

### Other Transit Systems

This software may work for other GTFS realtime providers, but has not been tested. There is no guarantee that providers--even if included in this repository--will work--or that changes in provider APIs will not cause breakages.
This software may work for other GTFS realtime providers, but has not been tested. There is no guarantee that providerseven if included in this repositorywill workor that changes in provider APIs will not cause breakages.

## Frontend

Example frontend card configs can be found in [example](example/).

Simply displaying all entities for a "stop" device provides a train arrival board.
![sample icon dashboard](example/icon_arrival.jpg)

![sample tile dashboard](example/tile_arrival.jpg)

![sample dashboard](resources/sample.png)
A tile dashboard can also be generated using the "Generate Arrival Board" action in Developer Tools.

## Sensors

Expand All @@ -81,12 +81,9 @@ Raw sensor data is provided in seconds. Minutes are the recommended unit.
#### Realtime Vehicle Position Data (Experimental)

> [!NOTE]
> Available in ≥ 0.4.0 only
> Available in ≥ 0.4.3 vehicle position data from feeds will be included. Feeds that do not provide vehicle position data use an estimate of the nearest station in trip-update data.

> [!CAUTION]
> This does *not* use GTFS Realtime [Vehicle Positions](https://gtfs.org/documentation/realtime/feed-entities/vehicle-positions/) updates. Support may be added in a later release.

Realtime data is being tested for NYC Subway arrivals and may work with other systems. This can be viewed by adding the entities to a [Map Card](https://www.home-assistant.io/dashboards/map/).
Entities can appear on map cards.

![sample map](resources/realtime-locations.jpg)

Expand All @@ -102,6 +99,8 @@ Each stop will collect the arrival sensors together as a device. For each static

Services are provided for updating and clearing the static data schedule. During setup, an interval for refreshing this data can be provided.

A service also exists for creating a "Train Arrival Boad" card using multiple tile entities.

## GTFS Station Stop

This package utilizes [GTFS Station Stop](https://pypi.org/project/gtfs-station-stop/) to provide updates to Home Assistant sensors.
Expand Down
5 changes: 5 additions & 0 deletions custom_components/gtfs_realtime/translations/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Translations

Translations from English were generated by Gemini, and may not be accurate.

If you are a native speaker of any of the translated languages, Pull Requests and Issue reports correcting the translation are welcome.
164 changes: 164 additions & 0 deletions custom_components/gtfs_realtime/translations/de.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
{
"title": "GTFS Realtime",
"common": {
"generic_gtfs_provider": "Generischer GTFS-Anbieter",
"manual_gtfs_provider_name": "Andere - Manuell eingeben"
},
"config": {
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]",
"reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]",
"reconfigure_successful": "Neuformatierung erfolgreich. Falls Entitäten entfernt wurden, können diese in den Einstellungen gelöscht werden."
},
"error": {
"failed_preconfigured_feeds": "Vorkonfigurierte Feeds konnten nicht geladen werden",
"select_at_least_one_stop_or_route": "Es muss mindestens eine Haltestelle oder Linie für GTFS-Updates ausgewählt werden.",
"unexpected_user_input": "Unerwartete Benutzereingabe"
},
"step": {
"choose_informed_entities": {
"title": "Linien- und Haltestellen-Kennungen auswählen, um Sensoren zu erstellen.",
"data": {
"arrival_limit": "Ankunftslimit",
"gtfs_provider": "Name des GTFS-Anbieters",
"route_ids": "Linien-Kennung",
"stop_ids": "Haltestellen-Kennung"
},
"data_description": {
"route_ids": "Kennung einer Linie, um Verkehrsmeldungen zu erhalten.",
"stop_ids": "Kennung einer Haltestelle, um Ankunftsdaten und Verkehrsmeldungen zu erhalten."
},
"description": "GTFS-Parameter konfigurieren.",
"sections": {
"static_sources_update_frequency": {
"name": "Aktualisierungsintervall der Soll-Daten",
"description": "Legen Sie fest, wie oft die statischen Daten aktualisiert werden sollen. Fragen Sie Ihren Anbieter nach der üblichen Frequenz."
}
}
},
"choose_static_and_realtime_feeds": {
"title": "Adressen für Echtzeit- und Soll-Daten auswählen.",
"data": {
"auth_header": "Autorisierungs-Header (falls erforderlich)",
"gtfs_static_data": "Statische GTFS-Daten (Datei oder Adresse)",
"route_icons": "Format-Adresse für Linien-Symbole",
"url_endpoints": "Feed-Adresse"
},
"data_description": {
"auth_header": "Muss im Format '[Typ]: [Schlüssel]' vorliegen. Beispiel: 'X-Api-Key: [Ihr Schlüssel]'. Nicht alle Typen werden unterstützt.",
"gtfs_static_data": "GTFS-Soll-Daten als ZIP-Datei. Geben Sie die Adresse(n) für die Fahrplandaten an. Erforderlich, um Fahrten und Haltestellen mit Echtzeitdaten zu verknüpfen.",
"route_icons": "Adresse zu einem Anbieter von Linien-Symbolen (SVG). Der String kann bis zu 3 Variablen enthalten: [route_id], [route_color] und [route_text_color].",
"url_endpoints": "Adressen für GTFS-Echtzeitdaten"
},
"description": "Dieses Formular wurde basierend auf Ihrer Anbieterwahl vorausgefüllt. Nicht benötigte Feeds können zur Leistungsverbesserung entfernt werden.\n\nHinweis: Die meisten Datensätze benötigen mindestens einen statischen Feed für Fahrplandaten.\n\n{disclaimer}"
},
"reconfigure": {
"title": "GTFS-Parameter neu konfigurieren.",
"data": {
"arrival_limit": "Ankunftslimit",
"gtfs_provider": "Name des GTFS-Anbieters",
"route_ids": "Linien-Kennung",
"stop_ids": "Haltestellen-Kennung",
"url_endpoints": "Feed-Adresse"
},
"data_description": {
"route_ids": "Linien-Kennung für Verkehrsmeldungen.",
"stop_ids": "Haltestellen-Kennung für Ankunftsdaten und Verkehrsmeldungen.",
"url_endpoints": "Adressen für GTFS-Echtzeitdaten"
},
"description": "GTFS-Parameter für bestehenden Eintrag anpassen.",
"sections": {
"static_sources_update_frequency": {
"name": "Aktualisierungsintervall der Soll-Daten",
"description": "Zeitspanne zwischen den Aktualisierungen statischer Daten."
}
}
},
"user": {
"title": "GTFS-Anbieter auswählen",
"data": {
"gtfs_provider_id": "GTFS-Anbieter"
},
"description": "Wählen Sie einen Anbieter aus. Die hier gelisteten Daten stammen aus der Datei 'feeds.json'. Der Nutzer erklärt sich mit den Geschäftsbedingungen des jeweiligen Anbieters einverstanden."
}
}
},
"entity": {
"button": {
"clear": {
"name": "Alle Fahrplandaten löschen"
},
"refresh": {
"name": "Fahrplan-Feed aktualisieren: {gtfs_static_source}"
}
}
},
"entity_component": {
"binary_sensor": {
"state_attributes": {
"description": {
"name": "Beschreibung {i+1}"
},
"header": {
"name": "Überschrift {i+1}"
}
}
},
"button": {
"state_attributes": {
"target_url": {
"name": "Ziel-Adresse"
}
}
},
"sensor": {
"state_attributes": {
"destination": {
"name": "Zielort"
},
"headsign": {
"name": "Zielbeschilderung"
},
"location_source": {
"name": "Standortquelle",
"state": {
"nearest_station_estimate": "Schätzung über nächste Haltestelle",
"vehicle_position_message": "Fahrzeugposition (GPS)"
}
},
"route_color": {
"name": "Linienfarbe"
},
"route_id": {
"name": "Linien-Kennung"
},
"route_text_color": {
"name": "Linien-Textfarbe"
},
"trip_id": {
"name": "Fahrtnummer (Trip-ID)"
}
}
}
},
"services": {
"generate_arrival_board": {
"name": "Abfahrtstafel generieren",
"description": "Erzeugt eine Abfahrtstafel für eine Haltestelle",
"fields": {
"device_id": {
"name": "Haltestellen-Kennung",
"description": "Haltestelle, für die Ankünfte angezeigt werden sollen"
},
"show_entity_picture": {
"name": "Linien-Symbole anzeigen",
"description": "Benutzerdefinierte Linien-Logos einblenden"
},
"show_unknown": {
"name": "Unbekannte Ankünfte anzeigen",
"description": "Zeigt Ankünfte an, für die noch keine geplante Fahrt vorliegt"
}
}
}
}
}
Loading
Loading