Nextbus: Sort results for upcoming times (#29811)
Sort upcoming times across all direction's for a particular route and stop.
This commit is contained in:
1 parent
9049e090f9
commit
4f1f4a1b4f
2 files changed
+5
-3
No files matched your search
@@ -225,7 +225,9 @@ class NextBusDepartureSensor(Entity):
|
||||
return
|
||||
|
||||
# Generate list of upcoming times
|
||||
self._attributes["upcoming"] = ", ".join(p["minutes"] for p in predictions)
|
||||
self._attributes["upcoming"] = ", ".join(
|
||||
sorted(p["minutes"] for p in predictions)
|
||||
)
|
||||
|
||||
latest_prediction = maybe_first(predictions)
|
||||
self._state = utc_from_timestamp(
|
||||
|
||||
Reference in new issue
Block a user