Revert "Fix NMBS IndexError" (#90346)

This commit is contained in:
PatrickGlesner 2023-03-27 11:00:52 +02:00 committed by GitHub
parent 94a52d5cca
commit 56293ad876
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -162,11 +162,7 @@ class NMBSLiveBoard(SensorEntity):
"""Set the state equal to the next departure."""
liveboard = self._api_client.get_liveboard(self._station)
if (
liveboard is None
or not liveboard.get("departures")
or liveboard.get("number") == "0"
):
if liveboard is None or not liveboard.get("departures"):
return
next_departure = liveboard["departures"]["departure"][0]