From 81a0ce621e2a49f9b07b87b9cc95fb13bd5d01b5 Mon Sep 17 00:00:00 2001 From: Thom Troy Date: Sun, 30 Dec 2018 17:35:12 +0000 Subject: [PATCH] Fix exception checking for next dublin bus (#19663) --- homeassistant/components/sensor/dublin_bus_transport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/sensor/dublin_bus_transport.py b/homeassistant/components/sensor/dublin_bus_transport.py index 0fccf7da5a8..d47c471e90d 100644 --- a/homeassistant/components/sensor/dublin_bus_transport.py +++ b/homeassistant/components/sensor/dublin_bus_transport.py @@ -92,7 +92,7 @@ class DublinPublicTransportSensor(Entity): """Return the state attributes.""" if self._times is not None: next_up = "None" - if self._times: + if len(self._times) >= 1: next_up = self._times[1][ATTR_ROUTE] + " in " next_up += self._times[1][ATTR_DUE_IN]