Custom Component: London TfL Departures integration

Hey everyone! I was in need of a simple way to see when the next trains from my local London tube / DLR station would leave (to minimise time spent waiting for a train).

None of the integrations I found did what I needed, so here I am having written my own.

It’s not HACS-ready yet, but will be at some point, once I’m happy with how it behaves.

Once dropped into your custom_components, you can add it via the Integrations menu (Search for ‘London TfL’). It automatically populates the lines list and the correct stations based on the line you need, and you can add as many stations as you’re interested in.

It updates once per minute, but doesn’t always hit the public API. It tries to maximise using the data it receives in a single call. Anecdotally it makes a remote call once every 10 minutes, for each sensor.

If you have any issues, please do share! I’ve already fixed quite a few originating from TfL API’s weird choices at times.

1 Like

You can now add it via HACS as a custom component (not yet part of the default set advertised in HACS, but hopefully soon)! With more than a month of testing and actual usage, with a couple of bug fixes thanks to members of the community finding issues, I think it’s pretty stable now.

Hi, I’ve been using this integration and finding it, combined with the lovelace-departures card, very neat.

I can’t for the life of me work out how to add more stations/lines after the initial setup though. I’m sure it must be something obvious but I just can’t spot it. Cheers.

Glad you find it useful!

You can add more stations / lines by just adding the integration again. It’s… not clean, but it works.

Note: only add new stations with the new integrations. Old one will still exist.

Just installed this via HACS and combined with the HASL Departure Card - great integration, thanks!

1 Like