Skip to content

Commit

Permalink
Pass hass clientsession to ring config flow (#125119)
Browse files Browse the repository at this point in the history
Pass hass clientsession to ring config flow
  • Loading branch information
sdb9696 authored and bramkragten committed Sep 3, 2024
1 parent be3b16b commit 4982e1c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion homeassistant/components/ring/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
)
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.aiohttp_client import async_get_clientsession

from .const import CONF_2FA, DOMAIN

Expand All @@ -31,7 +32,10 @@
async def validate_input(hass: HomeAssistant, data: dict[str, str]) -> dict[str, Any]:
"""Validate the user input allows us to connect."""

auth = Auth(f"{APPLICATION_NAME}/{ha_version}")
auth = Auth(
f"{APPLICATION_NAME}/{ha_version}",
http_client_session=async_get_clientsession(hass),
)

try:
token = await auth.async_fetch_token(
Expand Down

0 comments on commit 4982e1c

Please sign in to comment.