Problem of missing schedules with Swiss Transport component!

Hi

I’m trying to use the Swiss Transport component included in Ha but it looks to miss some data ! Here ii my configuration file for it:

sensor:
  - platform: swiss_public_transport
    from: 8592101
    to: 8579238
  - platform: template
    sensors:
      prochain_depart:
        friendly_name: "Prochain Départ:"
        icon_template: mdi:train
        value_template: '{{ as_timestamp(states.sensor.next_departure.attributes.next_departure)| timestamp_custom("%H:%M", True) }}'
      prochain_depart_suivant:
        friendly_name: "Prochain Départ suivant:"
        icon_template: mdi:train
        value_template: '{{ as_timestamp(states.sensor.next_departure.attributes.next_on_departure)| timestamp_custom("%H:%M", True) }}'

and the configuration in Lovelace:

entities:
  - entity: sensor.prochain_depart
  - entity: sensor.prochain_depart_suivant
show_header_toggle: false
title: Prochains bus Sallaz
type: entities

When I check with these same id on https://transport.opendata.ch/examples/connections.php?from=Lausanne%2C+Praz-Séchaud&to=Sallaz&datetime=2020-01-05+17%3A11%3A11 the Opendata swiss website that component is supposed to pull data from I get more schedules than the one displayed in HA ! I mean some departures are just not showing up in HA, it skips some and I don’t see the reason ! Out of a bug in the component itself ?

Thanks

Vincèn

After keeping an eye on it during a while, I think I have more details about the problem. It displays well all schedules but for an unknown reason it skips to next ones before the ones displayed are passed and in fact time ! I checked but HA is well on time… Perhaps can help narrow the problem :wink:

Same issue here. It’s basically useless, didn’t find the time to open an issue on GitHub yet.

No problem, I opened one https://github.com/home-assistant/home-assistant/issues/30515 :wink:

I noticed that too. There was an issue in the underlying library which skipped the next connection always:

The library has been updated and the updated version will be used in the next Home Assistant update (presumably 0.104.0).

1 Like

Hope it’ll be fixed as for now running beta 5 of HA 0.104 and bug is still there…

Updated to 0.104 that has been released yesterday and problem still exactly the same :frowning: