ha_realtime_trains_api icon indicating copy to clipboard operation
ha_realtime_trains_api copied to clipboard

Status showing as 'OK' for cancelled trains (v1.1)

Open stevehop opened this issue 2 years ago • 0 comments

The train below is shown as 'status: OK' but in fact was cancelled which was reflected in the RTT API. I think the logic needs tweaking to allow a wild card (e.g. "Cancelled*") in the 'displayAs' field.

In HA:

journey_start: AFK
journey_end: EBN
next_trains:
  - origin_name: Rye
    destination_name: Eastbourne
    service_uid: W78634
    scheduled: 24-08-2022 16:25
    estimated: 24-08-2022 16:25
    minutes: 26
    platform: '1'
    operator_name: Southern
    stops_of_interest: []
    scheduled_arrival: 24-08-2022 17:44
    estimate_arrival: 24-08-2022 17:44
    journey_time_mins: 79
    stops: 13
    status: OK

In RTT API (note the 'displayAs' field) EBD2

From National Rail Enquiries: EBD

stevehop avatar Aug 25 '22 07:08 stevehop