fix logic error in dubln bus (#20075)

This commit is contained in:
Thom Troy 2019-01-14 09:51:37 +00:00 committed by Fabian Affolter
parent d6d28dd3e9
commit cb9e0c03d5

View file

@ -92,7 +92,7 @@ class DublinPublicTransportSensor(Entity):
"""Return the state attributes.""" """Return the state attributes."""
if self._times is not None: if self._times is not None:
next_up = "None" next_up = "None"
if len(self._times) >= 1: if len(self._times) > 1:
next_up = self._times[1][ATTR_ROUTE] + " in " next_up = self._times[1][ATTR_ROUTE] + " in "
next_up += self._times[1][ATTR_DUE_IN] next_up += self._times[1][ATTR_DUE_IN]