mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Fix implicit-return in wsdot (#122935)
This commit is contained in:
parent
c7f863a141
commit
4fda025106
@ -6,6 +6,7 @@ from datetime import datetime, timedelta, timezone
|
|||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
@ -125,7 +126,7 @@ class WashingtonStateTravelTimeSensor(WashingtonStateTransportSensor):
|
|||||||
self._state = self._data.get(ATTR_CURRENT_TIME)
|
self._state = self._data.get(ATTR_CURRENT_TIME)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def extra_state_attributes(self):
|
def extra_state_attributes(self) -> dict[str, Any] | None:
|
||||||
"""Return other details about the sensor state."""
|
"""Return other details about the sensor state."""
|
||||||
if self._data is not None:
|
if self._data is not None:
|
||||||
attrs = {}
|
attrs = {}
|
||||||
@ -140,6 +141,7 @@ class WashingtonStateTravelTimeSensor(WashingtonStateTransportSensor):
|
|||||||
self._data.get(ATTR_TIME_UPDATED)
|
self._data.get(ATTR_TIME_UPDATED)
|
||||||
)
|
)
|
||||||
return attrs
|
return attrs
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
def _parse_wsdot_timestamp(timestamp):
|
def _parse_wsdot_timestamp(timestamp):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user