megakid / ha_realtime_trains_api

rtt.io Home Assistant integration
Apache License 2.0
17 stars 8 forks source link

journey_data_for_next_X_trains being ignored (v1.0) #7

Closed stevehop closed 2 years ago

stevehop commented 2 years ago

I have set my two sensors to limit the number of trains to 5 but I've seen data for up to 8 being returned:

sensor:
    -   platform: realtime_trains_api
        username: !secret rtt_username
        password: !secret rtt_password
        scan_interval:
            seconds: 604800
        auto_adjust_scans: true
        queries:
          - origin: AFK
            destination: STP
            journey_data_for_next_X_trains: 5
            stops_of_interest:
                - SFA
                - EBD
          - origin: STP
            destination: AFK
            journey_data_for_next_X_trains: 5
            stops_of_interest:
                - SFA
                - EBD
journey_start: STP
journey_end: AFK
next_trains:
  - origin_name: St Pancras International
    destination_name: Dover Priory
    service_uid: W69248
    scheduled: 21-08-2022 14:37
    estimated: 21-08-2022 14:37
    minutes: 10
    platform: '12'
    operator_name: Southeastern
    stops_of_interest:
      - stop: SFA
        name: Stratford International
        scheduled_stop: 21-08-2022 14:43
        estimate_stop: 21-08-2022 14:43
        journey_time_mins: 6
        stops: 0
      - stop: EBD
        name: Ebbsfleet International
        scheduled_stop: 21-08-2022 14:54
        estimate_stop: 21-08-2022 14:54
        journey_time_mins: 17
        stops: 1
    scheduled_arrival: 21-08-2022 15:14
    estimate_arrival: 21-08-2022 15:13
    journey_time_mins: 36
    stops: 2
  - origin_name: St Pancras International
    destination_name: Margate
    service_uid: W69254
    scheduled: 21-08-2022 15:12
    estimated: 21-08-2022 15:12
    minutes: 45
    platform: '12'
    operator_name: Southeastern
    stops_of_interest:
      - stop: SFA
        name: Stratford International
        scheduled_stop: 21-08-2022 15:18
        estimate_stop: 21-08-2022 15:18
        journey_time_mins: 6
        stops: 0
      - stop: EBD
        name: Ebbsfleet International
        scheduled_stop: 21-08-2022 15:30
        estimate_stop: 21-08-2022 15:29
        journey_time_mins: 17
        stops: 1
    scheduled_arrival: 21-08-2022 15:50
    estimate_arrival: 21-08-2022 15:50
    journey_time_mins: 38
    stops: 2
  - origin_name: St Pancras International
    destination_name: Dover Priory
    service_uid: W69260
    scheduled: 21-08-2022 15:37
    estimated: 21-08-2022 15:37
    minutes: 70
    platform: '12'
    operator_name: Southeastern
    stops_of_interest:
      - stop: SFA
        name: Stratford International
        scheduled_stop: 21-08-2022 15:43
        estimate_stop: 21-08-2022 15:43
        journey_time_mins: 6
        stops: 0
      - stop: EBD
        name: Ebbsfleet International
        scheduled_stop: 21-08-2022 15:54
        estimate_stop: 21-08-2022 15:54
        journey_time_mins: 17
        stops: 1
    scheduled_arrival: 21-08-2022 16:14
    estimate_arrival: 21-08-2022 16:13
    journey_time_mins: 36
    stops: 2
  - origin_name: St Pancras International
    destination_name: Margate
    service_uid: W69266
    scheduled: 21-08-2022 16:12
    estimated: 21-08-2022 16:12
    minutes: 105
    platform: '13'
    operator_name: Southeastern
    stops_of_interest:
      - stop: SFA
        name: Stratford International
        scheduled_stop: 21-08-2022 16:18
        estimate_stop: 21-08-2022 16:18
        journey_time_mins: 6
        stops: 0
      - stop: EBD
        name: Ebbsfleet International
        scheduled_stop: 21-08-2022 16:30
        estimate_stop: 21-08-2022 16:29
        journey_time_mins: 17
        stops: 1
    scheduled_arrival: 21-08-2022 16:50
    estimate_arrival: 21-08-2022 16:50
    journey_time_mins: 38
    stops: 2
  - origin_name: St Pancras International
    destination_name: Dover Priory
    service_uid: W69272
    scheduled: 21-08-2022 16:37
    estimated: 21-08-2022 16:37
    minutes: 130
    platform: '12'
    operator_name: Southeastern
    stops_of_interest:
      - stop: SFA
        name: Stratford International
        scheduled_stop: 21-08-2022 16:43
        estimate_stop: 21-08-2022 16:43
        journey_time_mins: 6
        stops: 0
      - stop: EBD
        name: Ebbsfleet International
        scheduled_stop: 21-08-2022 16:54
        estimate_stop: 21-08-2022 16:54
        journey_time_mins: 17
        stops: 1
    scheduled_arrival: 21-08-2022 17:14
    estimate_arrival: 21-08-2022 17:13
    journey_time_mins: 36
    stops: 2
  - origin_name: St Pancras International
    destination_name: Margate
    service_uid: W69278
    scheduled: 21-08-2022 17:12
    estimated: 21-08-2022 17:12
    minutes: 165
    platform: '13'
    operator_name: Southeastern
  - origin_name: St Pancras International
    destination_name: Dover Priory
    service_uid: W69284
    scheduled: 21-08-2022 17:34
    estimated: 21-08-2022 17:34
    minutes: 187
    platform: '12'
    operator_name: Southeastern
  - origin_name: St Pancras International
    destination_name: Margate
    service_uid: W69290
    scheduled: 21-08-2022 18:10
    estimated: 21-08-2022 18:10
    minutes: 223
    platform: '12'
    operator_name: Southeastern
unit_of_measurement: min
icon: mdi:train
friendly_name: Next train from STP to AFK
megakid commented 2 years ago

Fixed in 78940c45af35a4d2f3e3aaeb00d45ceb7ac39627