Fix implicit-return in transport_nsw (#122930)
This commit is contained in:
parent
8d0e998e54
commit
e706ff0564
1 changed files with 3 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from typing import Any
|
||||
|
||||
from TransportNSW import TransportNSW
|
||||
import voluptuous as vol
|
||||
|
@ -98,7 +99,7 @@ class TransportNSWSensor(SensorEntity):
|
|||
return self._state
|
||||
|
||||
@property
|
||||
def extra_state_attributes(self):
|
||||
def extra_state_attributes(self) -> dict[str, Any] | None:
|
||||
"""Return the state attributes."""
|
||||
if self._times is not None:
|
||||
return {
|
||||
|
@ -110,6 +111,7 @@ class TransportNSWSensor(SensorEntity):
|
|||
ATTR_DESTINATION: self._times[ATTR_DESTINATION],
|
||||
ATTR_MODE: self._times[ATTR_MODE],
|
||||
}
|
||||
return None
|
||||
|
||||
@property
|
||||
def native_unit_of_measurement(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue