Fix exception checking for next dublin bus (#19663)
This commit is contained in:
parent
18d36e011a
commit
81a0ce621e
1 changed files with 1 additions and 1 deletions
|
@ -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 self._times:
|
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]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue