Bump here-routing to 1.2.0 (#147204)

* Bump here-routing to 1.2.0

* Fix mypy typing errors

* Correct types for call assertion
This commit is contained in:
Kevin Stillhammer
2025-06-20 13:44:14 +02:00
committed by GitHub
parent a493bdc208
commit f9d4bde0f6
6 changed files with 12 additions and 8 deletions

View File

@ -100,9 +100,11 @@ class HERERoutingDataUpdateCoordinator(DataUpdateCoordinator[HERETravelTimeData]
try:
response = await self._api.route(
transport_mode=TransportMode(params.travel_mode),
origin=here_routing.Place(params.origin[0], params.origin[1]),
origin=here_routing.Place(
float(params.origin[0]), float(params.origin[1])
),
destination=here_routing.Place(
params.destination[0], params.destination[1]
float(params.destination[0]), float(params.destination[1])
),
routing_mode=params.route_mode,
arrival_time=params.arrival,

View File

@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/here_travel_time",
"iot_class": "cloud_polling",
"loggers": ["here_routing", "here_transit", "homeassistant.helpers.location"],
"requirements": ["here-routing==1.0.1", "here-transit==1.2.1"]
"requirements": ["here-routing==1.2.0", "here-transit==1.2.1"]
}

View File

@ -6,6 +6,8 @@ from dataclasses import dataclass
from datetime import datetime
from typing import TypedDict
from here_routing import RoutingMode
class HERETravelTimeData(TypedDict):
"""Routing information."""
@ -27,6 +29,6 @@ class HERETravelTimeAPIParams:
destination: list[str]
origin: list[str]
travel_mode: str
route_mode: str
route_mode: RoutingMode
arrival: datetime | None
departure: datetime | None

2
requirements_all.txt generated
View File

@ -1140,7 +1140,7 @@ hdate[astral]==1.1.2
heatmiserV3==2.0.3
# homeassistant.components.here_travel_time
here-routing==1.0.1
here-routing==1.2.0
# homeassistant.components.here_travel_time
here-transit==1.2.1

View File

@ -992,7 +992,7 @@ hassil==2.2.3
hdate[astral]==1.1.2
# homeassistant.components.here_travel_time
here-routing==1.0.1
here-routing==1.2.0
# homeassistant.components.here_travel_time
here-transit==1.2.1

View File

@ -319,8 +319,8 @@ async def test_entity_ids(hass: HomeAssistant, valid_response: MagicMock) -> Non
valid_response.assert_called_with(
transport_mode=TransportMode.TRUCK,
origin=Place(ORIGIN_LATITUDE, ORIGIN_LONGITUDE),
destination=Place(DESTINATION_LATITUDE, DESTINATION_LONGITUDE),
origin=Place(float(ORIGIN_LATITUDE), float(ORIGIN_LONGITUDE)),
destination=Place(float(DESTINATION_LATITUDE), float(DESTINATION_LONGITUDE)),
routing_mode=RoutingMode.FAST,
arrival_time=None,
departure_time=None,