Skip to content

Commit

Permalink
Update sensor.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyShpilevoy authored Jun 20, 2020
1 parent 38057bd commit d32d0ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/ovapi/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ def update(self):
stop['DestinationName50'],
"stop_name": stop['TimingPointName'],
"TargetDepartureTime": target_departure_time.time(),
"TargetDepartureDateTime": target_departure_time,
"ExpectedArrivalTime": expected_arrival_time.time(),
"Delay": delay
}
Expand All @@ -251,7 +252,7 @@ def update(self):
self._departures = STATE_UNKNOWN
self._state = STATE_UNKNOWN
else:
stops_list.sort(key=operator.itemgetter('TargetDepartureTime'))
stops_list.sort(key=operator.itemgetter('TargetDepartureDateTime'))

self._destination = stops_list[self._sensor_number]["destination"]
self._provider = stops_list[self._sensor_number]["provider"]
Expand Down

0 comments on commit d32d0ee

Please sign in to comment.