Skip to content

Commit 73cb06c

Browse files
frenckballoob
authored andcommitted
Fix Garmin Connect i/o in event loop (#34598)
1 parent dd63225 commit 73cb06c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

homeassistant/components/garmin_connect/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
3838
garmin_client = Garmin(username, password)
3939

4040
try:
41-
garmin_client.login()
41+
await hass.async_add_executor_job(garmin_client.login)
4242
except (
4343
GarminConnectAuthenticationError,
4444
GarminConnectTooManyRequestsError,

homeassistant/components/garmin_connect/config_flow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async def async_step_user(self, user_input=None):
4242

4343
errors = {}
4444
try:
45-
garmin_client.login()
45+
await self.hass.async_add_executor_job(garmin_client.login)
4646
except GarminConnectConnectionError:
4747
errors["base"] = "cannot_connect"
4848
return await self._show_setup_form(errors)

0 commit comments

Comments
 (0)