mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
Add type hints to here_travel_time (#69216)
* Add type hints to here_travel_time * Adjust
This commit is contained in:
parent
39abf1453c
commit
db10c313b5
@ -31,5 +31,5 @@ class HERETravelTimeConfig:
|
|||||||
travel_mode: str
|
travel_mode: str
|
||||||
route_mode: str
|
route_mode: str
|
||||||
units: str
|
units: str
|
||||||
arrival: time
|
arrival: time | None
|
||||||
departure: time
|
departure: time | None
|
||||||
|
@ -285,6 +285,7 @@ class HERETravelTimeSensor(SensorEntity, CoordinatorEntity):
|
|||||||
"""Return the attribution."""
|
"""Return the attribution."""
|
||||||
if self.coordinator.data is not None:
|
if self.coordinator.data is not None:
|
||||||
return self.coordinator.data.get(ATTR_ATTRIBUTION)
|
return self.coordinator.data.get(ATTR_ATTRIBUTION)
|
||||||
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def icon(self) -> str:
|
def icon(self) -> str:
|
||||||
|
3
mypy.ini
3
mypy.ini
@ -2689,9 +2689,6 @@ ignore_errors = true
|
|||||||
[mypy-homeassistant.components.hassio.websocket_api]
|
[mypy-homeassistant.components.hassio.websocket_api]
|
||||||
ignore_errors = true
|
ignore_errors = true
|
||||||
|
|
||||||
[mypy-homeassistant.components.here_travel_time.sensor]
|
|
||||||
ignore_errors = true
|
|
||||||
|
|
||||||
[mypy-homeassistant.components.home_plus_control]
|
[mypy-homeassistant.components.home_plus_control]
|
||||||
ignore_errors = true
|
ignore_errors = true
|
||||||
|
|
||||||
|
@ -57,7 +57,6 @@ IGNORED_MODULES: Final[list[str]] = [
|
|||||||
"homeassistant.components.hassio.sensor",
|
"homeassistant.components.hassio.sensor",
|
||||||
"homeassistant.components.hassio.system_health",
|
"homeassistant.components.hassio.system_health",
|
||||||
"homeassistant.components.hassio.websocket_api",
|
"homeassistant.components.hassio.websocket_api",
|
||||||
"homeassistant.components.here_travel_time.sensor",
|
|
||||||
"homeassistant.components.home_plus_control",
|
"homeassistant.components.home_plus_control",
|
||||||
"homeassistant.components.home_plus_control.api",
|
"homeassistant.components.home_plus_control.api",
|
||||||
"homeassistant.components.icloud",
|
"homeassistant.components.icloud",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user