home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.61k stars 30.37k forks source link

RMV Integration gives wrong data and ignores given parameters #41162

Closed ojarosch closed 3 years ago

ojarosch commented 4 years ago

The problem

The given results ignore configured parameters. I'm looking for the next departures of RB67, RB68 or RE60 from Frankfurt Central Station, which target either Mannheim or Heidelberg. I instead receive data from completly different lines which to not meet any of the given parameters, see example data below. RE70 for exaple does not even target Mannheim, even though the received data states it. I even got data from an ICE, which explicitly not asked for. Sometimes duplicate data is given. E.g. the same departure is given as RB67 aswell as RB68. According to the RMV-Website and/or App, there is only one departure at the given time.

Environment

Problem-relevant configuration.yaml

sensor:
      - name: "RMV FFM to Home"
        station: 3000010 # Frankfurt Hauptbahnhof
        max_journeys: 3
        lines:
          - "RB67"
          - "RB68"
          - "RE60"
        products:
          - "RB"
          - "RE"
        destinations:
          - "Heidelberg Bahnhof"
          - "Mannheim Hauptbahnhof"

Traceback/Error logs

no errors in logs

Additional information

next_departures: 
- destination: Mannheim Hauptbahnhof
  direction: Mannheim Hauptbahnhof
  departure_time: '2020-10-03T23:15:00'
  product: RE
  minutes: 12
  line: RE70
- destination: Heidelberg Bahnhof
  direction: Heidelberg Bahnhof
  departure_time: '2020-10-04T00:06:00'
  product: RB
  minutes: 63
  line: RB68
- destination: Mannheim Hauptbahnhof
  direction: Mannheim Hauptbahnhof
  departure_time: '2020-10-04T00:12:00'
  product: RE
  minutes: 69
  line: RE70
probot-home-assistant[bot] commented 4 years ago

Hey there @cgtobi, mind taking a look at this issue as its been labeled with an integration (rmvtransport) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

cgtobi commented 3 years ago

Thanks for reporting this. I was able to reproduce the bug and fix it.