zacs / ha-gtfs-rt

Real-time transit information for Home Assistant
MIT License
69 stars 29 forks source link

See following departures #35

Open DaAwesomeP opened 11 months ago

DaAwesomeP commented 11 months ago

Hello!

Would it be possible to have multiple entities for one route/stop combination to show the next and following departure? This is very useful for "I won't make the train coming in 2 minutes, but I will make the one coming in 10 minutes."

There could possibly be an offset options that is 0 by default but will show the following arrival when set to 1 or the third arrival when set to 2.

DaAwesomeP commented 11 months ago

Aha! I figured out that there is the "Next bus in" attribute. Note that this maybe should be "next arrival in" since it could be a bus or train or other vehicle.

It still would be nice to have a way to see the 3rd arrival.

Example for dashboard:

type: entities
entities:
  - entity: sensor.my_route_and_stop
  - type: attribute
    entity: sensor.my_route_and_stop
    attribute: Next bus due in
    name: Following train
    suffix: min
state_color: false
title: Trains
mxr commented 10 months ago

I would also be interested in support for showing the next N arrivals. Happy to submit PR's for this once we agree on what the YAML/API should look like

evandcoleman commented 2 months ago

I have a PR up to add this here: https://github.com/zacs/ha-gtfs-rt/pull/39