3 from __future__
import annotations
9 async_create_clientsession,
10 async_get_clientsession,
15 hass: HomeAssistant, password: str |
None, username: str |
None
16 ) -> aiohttp.ClientSession:
17 """Return proper session object."""
18 if username
and password:
19 auth = aiohttp.BasicAuth(login=username, password=password)
aiohttp.ClientSession get_maybe_authenticated_session(HomeAssistant hass, str|None password, str|None username)
aiohttp.ClientSession async_create_clientsession()
aiohttp.ClientSession async_get_clientsession(HomeAssistant hass, bool verify_ssl=True, socket.AddressFamily family=socket.AF_UNSPEC, ssl_util.SSLCipherList ssl_cipher=ssl_util.SSLCipherList.PYTHON_DEFAULT)