Västtrafik - no departures

Hi, I have a question for those who use Västtrafik component if you experience the same.
A few weeks ago I noticed that the sensor has stopped showing departures for certain directions after a couple of years of previous seamless work :

Config:

  - platform: vasttrafik
    key: redacted 
    secret: redacted
    departures:
      - name: mot Frölunda Torg
        from: Eriksbergstorget
        heading: Frölunda Torg
        delay: 9

And in the log:

2020-04-22 09:52:02 DEBUG (SyncWorker_14) [homeassistant.components.vasttrafik.sensor] No departures from Eriksbergstorget, Göteborg heading Frölunda Torg Spårvagn, Göteborg

So it seems that the bus stop Frölunda Torg provided in the setting is now interpreted as a different tram stop Frölunda Torg Spårvagn for some odd reason.

In case someone is interested in this issue:

Seems like not much interest to the issue, is it due to that no one is currently using public transportation?

There is a clarification from Vasttrafik: https://developer.vasttrafik.se/portal/#/community/topic/114
Each station is assigned a weight value which indicates how “busy” this station is. The higher the value, the more “busy” the station is. That is why the “bussiest” station is shown earlier in the list when the input data matches several.
So it means that the current implementation in homeassistant is not reliable and can fail for other stops too.

I have a similar issue: The line 10 sometimes goes to Biskopgården and other times to Centralstationen. Is there someway I could choose both directions in the same sensor?
a way to include an “or” in the direction attribute?

sensor:

  • platform: vasttrafik
    key: XXXXXX
    secret: XXXXXXXXXXX
    departures:
    • name: From Dr. Fries Torg
      from: Doktor Fries Torg
      heading: Centralstationen OR Biskopsgården

It doesn’t look that you provide the correct name for the stop. There is no such stop Biskopsgården for this line. Heading is not necessarily should be the last stop but the stop you want to reach.

Thanx Molodax! , It fixed it. I didnt realize on that. as the other query i was doing coincidentally has the same name in the last stop as the line destination.

btw is there a way to receive the time for the 2nd departure? sometimes I check it and is like 1-2 min left and i would like to know better the next one.

I was trying something like:

      - name: 10 to central2
        from: Doktor Sydows Gata
        heading: Chalmers
        delay: "{{ states('sensor.10_to_central.state') | int }}"

but i am not sure If I can call a sensor state like that in the config yaml file. Also I would need to translate the time format of the string of the state, as it returns things like “9:23”. so would need to take that as a number, substract a timestamp of current time and apply he result as a delay. but i didnt succeed on the implementation.

For the second departure, you need to create another sensor and provide delay parameter that should be equal to approximate difference in minutes between two departures. This way, this additional sensor will always show you the next (second) departure from the current time.