From 56293ad876884fb3c49ecf4d2e18cdcc82e95452 Mon Sep 17 00:00:00 2001 From: PatrickGlesner <34370149+PatrickGlesner@users.noreply.github.com> Date: Mon, 27 Mar 2023 11:00:52 +0200 Subject: [PATCH] Revert "Fix NMBS IndexError" (#90346) --- homeassistant/components/nmbs/sensor.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/homeassistant/components/nmbs/sensor.py b/homeassistant/components/nmbs/sensor.py index c3bcdb35536..b9a216875f4 100644 --- a/homeassistant/components/nmbs/sensor.py +++ b/homeassistant/components/nmbs/sensor.py @@ -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]