Fix implicit-return in transport_nsw (#122930)

This commit is contained in:
epenet 2024-07-31 14:44:14 +02:00 committed by GitHub
parent 8d0e998e54
commit e706ff0564
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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):