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]