Coder Social home page Coder Social logo

Comments (7)

morosanmihail avatar morosanmihail commented on September 13, 2024 2

Though I think there's a fork that does do buses only, so I might adapt what they did.

from ha-londontfl.

morosanmihail avatar morosanmihail commented on September 13, 2024 2

I have indeed kept building on top of this a lot earlier than expected. I think I solved it.

I will create a beta release with the changes. Hopefully it all works ok.

from ha-londontfl.

morosanmihail avatar morosanmihail commented on September 13, 2024 1

I've made some changes to this one to add buses as a method of transport, but it seems it doesn't work out of the box.

You can select your chosen method (bus, dlr, tube, etc), then the lines and stations populate nicely. However, for buses, it seems there are no results and it does need a slightly different API call.

I will likely keep building on top of this as I find time and hopefully have a version that works nicely.

from ha-londontfl.

morosanmihail avatar morosanmihail commented on September 13, 2024

Glad it is helpful!

No current plans to expand what's available, but assuming the TfL API does the same things for buses as it does for trains, then someone could tweak the available lines and see if it works.

I might try when I have some free time, but that might not be until April :( .

from ha-londontfl.

james-fry avatar james-fry commented on September 13, 2024

Thanks for the reply. I'll keep an eye open in case you add it, and thanks in advance if you do :)

from ha-londontfl.

james-fry avatar james-fry commented on September 13, 2024

Though I think there's a fork that does do buses only, so I might adapt what they did.

I've tried out that fork. Looking at the code, to my (rather python deficient) eye it seems a trivial change.
Seems only a couple of sting constant values changed.
The compoents seems to work pretty well, with a small quirks around identifying the correct stop.

  • I can install the component via HACS by adding as custom repo - hacs.json has changed name from yours.
  • I can add the integration in same way
  • I can select the bus route from list (of a great many - who knew so many bus routes in London!)
  • The bus stop are then listed but seem to use mostly IDs not human readable names.
  • I created a sensor for my local bus line (65) and added random stop. You need to get the ID from TFL website - e.g. https://tfl.gov.uk/bus/stop/490000208A, where 490000208A is the ID for one direction. If you need the other direction it would be (e.g.) 490000208B

from ha-londontfl.

morosanmihail avatar morosanmihail commented on September 13, 2024

Seems fine on my end 5 days in, so I've released it publicly. Do open new issues if you find any!

from ha-londontfl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.