GTFS Skånetrafiken

Hi,

Want som help with this…

Managed to read some on the subject. It´s not easy trying to understand how to make a lovelace card with following:

  • Scheduled departure for specified bus
  • Realtime departure for specified bus

Anyone?

I use this, it combines the regular gtfs and the realtime in one card for the bus out and into our town
image

type: entities
entities:
  - entity: sensor.653_mouans_rt
    type: custom:multiple-entity-row
    state_header: RealTime
    name: Mouans > Sophia 653
    format: time
    secondary_info: last-changed
    entities:
      - entity: sensor.653_aller_mouans_first
        name: first
      - entity: sensor.ligne_653a_mouans_corrected
        name: List
        format: time
  - entity: sensor.653_valbonne_rt
    type: custom:multiple-entity-row
    name: Sophia > Mouans 653
    format: time
    state_header: RealTime
    secondary_info: last-changed
    entities:
      - entity: sensor.ligne_653r_sophia_corrected
        name: List
        format: time

Looks good! And how to create the sensor/entity?

That is not what you asked… :slight_smile:
Assuming you already setup the integration, then you have to analyse the content of the zip file (stops) (or the sqlite db that was created in /config/gtfs…and add such a thing as this to your config
origin and destination formats differe highly between gtfs providers so yous may look completely different

sensor:
  - platform: gtfs
    origin: 00812-0608400
    destination: 01998-0615200
    data: gtfs_file_for_your_transport.zip
    name: "Ligne2 653A Mouans" 
    include_tomorrow: true

This is all documented here (limited…but it is sufficient)
General Transit Feed Specification (GTFS) - Home Assistant (home-assistant.io)

And… I just read…realtime…that is a whole different ballgame then the ‘theoretical’/ list times
What is the link to your realtime dataprovider, data/api…not map,