mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix implicit-return in transport_nsw (#122930)
This commit is contained in:
parent
8d0e998e54
commit
e706ff0564
@ -3,6 +3,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
from TransportNSW import TransportNSW
|
from TransportNSW import TransportNSW
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
@ -98,7 +99,7 @@ class TransportNSWSensor(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:
|
||||||
return {
|
return {
|
||||||
@ -110,6 +111,7 @@ class TransportNSWSensor(SensorEntity):
|
|||||||
ATTR_DESTINATION: self._times[ATTR_DESTINATION],
|
ATTR_DESTINATION: self._times[ATTR_DESTINATION],
|
||||||
ATTR_MODE: self._times[ATTR_MODE],
|
ATTR_MODE: self._times[ATTR_MODE],
|
||||||
}
|
}
|
||||||
|
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