-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Had an interesting one today - the api returned no trains as there were legit no trains (due to engineering work), I was too late to check the api. The UI showed "Welcome to", then a linefeed and then "...". Is it possible to "No Trains from Station" if there are no trains if its inside the operating windown (eg 6-22)
In "drawSignage" I think it would be something like the following - Im conscious that you probably also need to check for platform filtering. Alternatively something in your drawBlank.
More comprehensive check for no services in drawSignage - Apologies for the crap python - feel free to shoot me down
if departures is None or len(departures) == 0:
print(f"No departures found for {departureStation}")
noTrains = drawBlankSignage(device, width=width, height=height, departureStation=departureStation)
return noTrains
# Additional check after filtering (if you filter by platform)
if hasattr(config["journey"], "screen1Platform"):
filtered_departures = platform_filter(departures, config["journey"]["screen1Platform"], station)
if filtered_departures is None or len(filtered_departures) == 0:
print(f"No departures on platform {config['journey']['screen1Platform']}")
noTrains = drawBlankSignage(device, width=width, height=height, departureStation=departureStation)
return noTrains
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request