Skip to content

Commit 4bb8590

Browse files
authored
Revert "Force httpx client to use IPv4 for waze_travel_time" (home-assistant#157596)
1 parent 5e0923b commit 4bb8590

File tree

2 files changed

+3
-30
lines changed

2 files changed

+3
-30
lines changed

homeassistant/components/waze_travel_time/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
ServiceResponse,
1515
SupportsResponse,
1616
)
17+
from homeassistant.helpers.httpx_client import get_async_client
1718
from homeassistant.helpers.location import find_coordinates
1819
from homeassistant.helpers.selector import (
1920
BooleanSelector,
@@ -46,7 +47,6 @@
4647
VEHICLE_TYPES,
4748
)
4849
from .coordinator import WazeTravelTimeCoordinator, async_get_travel_times
49-
from .httpx_client import create_httpx_client
5050

5151
PLATFORMS = [Platform.SENSOR]
5252

@@ -106,8 +106,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
106106
if SEMAPHORE not in hass.data.setdefault(DOMAIN, {}):
107107
hass.data.setdefault(DOMAIN, {})[SEMAPHORE] = asyncio.Semaphore(1)
108108

109-
httpx_client = await create_httpx_client(hass)
110-
109+
httpx_client = get_async_client(hass)
111110
client = WazeRouteCalculator(
112111
region=config_entry.data[CONF_REGION].upper(), client=httpx_client
113112
)
@@ -120,7 +119,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
120119
await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)
121120

122121
async def async_get_travel_times_service(service: ServiceCall) -> ServiceResponse:
123-
httpx_client = await create_httpx_client(hass)
122+
httpx_client = get_async_client(hass)
124123
client = WazeRouteCalculator(
125124
region=service.data[CONF_REGION].upper(), client=httpx_client
126125
)

homeassistant/components/waze_travel_time/httpx_client.py

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)