Skip to content

Commit

Permalink
Next attemtp to fix rt on local stops
Browse files Browse the repository at this point in the history
  • Loading branch information
vingerha committed Mar 21, 2024
1 parent 726e000 commit a4f5327
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions custom_components/gtfs2/gtfs_rt_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,13 +350,23 @@ def get_rt_route_trip_statuses(self):
if entity.trip_update.trip.direction_id is not None:
direction_id = str(entity.trip_update.trip.direction_id)
else:
direction_id = DEFAULT_DIRECTION
direction_id = [DEFAULT_DIRECTION]

if self._rt_group == "trip":
direction_id = self._direction

trip_id = entity.trip_update.trip.trip_id

if ((self._rt_group == "route" and route_id == self._route_id and direction_id == self._direction) or
(self._rt_group == "trip" and trip_id == self._trip_id )):



_LOGGER.debug("Entity found params, group: %s, route_id: %s, direction_id: %s, trip_id: %s", self._rt_group, route_id, direction_id, self._trip_id)
_LOGGER.debug("Entity found: %s", entity)



if route_id not in departure_times:
departure_times[route_id] = {}

Expand Down

0 comments on commit a4f5327

Please sign in to comment.