1 """Helpers for Waze Travel Time integration."""
5 from pywaze.route_calculator
import WazeRouteCalculator, WRCError
11 _LOGGER = logging.getLogger(__name__)
15 hass: HomeAssistant, origin: str, destination: str, region: str
17 """Return whether the config entry data is valid."""
21 client = WazeRouteCalculator(region=region, client=httpx_client)
23 await client.calc_routes(resolved_origin, resolved_destination)
24 except WRCError
as error:
25 _LOGGER.error(
"Error trying to validate entry: %s", error)
bool is_valid_config_entry(HomeAssistant hass, str origin, str destination, str region)
httpx.AsyncClient get_async_client(HomeAssistant hass, bool verify_ssl=True)
str|None find_coordinates(HomeAssistant hass, str name, list|None recursion_history=None)