mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix implicit-return in dublin bus transport (#122833)
This commit is contained in:
parent
ea508b2629
commit
2135691b90
@ -9,6 +9,7 @@ from __future__ import annotations
|
|||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
@ -102,7 +103,7 @@ class DublinPublicTransportSensor(SensorEntity):
|
|||||||
return self._state
|
return self._state
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def extra_state_attributes(self):
|
def extra_state_attributes(self) -> dict[str, Any] | None:
|
||||||
"""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"
|
||||||
@ -117,6 +118,7 @@ class DublinPublicTransportSensor(SensorEntity):
|
|||||||
ATTR_ROUTE: self._times[0][ATTR_ROUTE],
|
ATTR_ROUTE: self._times[0][ATTR_ROUTE],
|
||||||
ATTR_NEXT_UP: next_up,
|
ATTR_NEXT_UP: next_up,
|
||||||
}
|
}
|
||||||
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def native_unit_of_measurement(self):
|
def native_unit_of_measurement(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user