parent
64535175b1
commit
bfc19c8cc3
2 changed files with 8 additions and 2 deletions
|
@ -22,7 +22,10 @@ async def async_setup_entry(
|
|||
) -> None:
|
||||
"""Set up August cameras."""
|
||||
data: AugustData = hass.data[DOMAIN][config_entry.entry_id]
|
||||
session = aiohttp_client.async_get_clientsession(hass)
|
||||
# Create an aiohttp session instead of using the default one since the
|
||||
# default one is likely to trigger august's WAF if another integration
|
||||
# is also using Cloudflare
|
||||
session = aiohttp_client.async_create_clientsession(hass)
|
||||
async_add_entities(
|
||||
AugustCamera(data, doorbell, session, DEFAULT_TIMEOUT)
|
||||
for doorbell in data.doorbells
|
||||
|
|
|
@ -30,7 +30,10 @@ class AugustGateway:
|
|||
|
||||
def __init__(self, hass):
|
||||
"""Init the connection."""
|
||||
self._aiohttp_session = aiohttp_client.async_get_clientsession(hass)
|
||||
# Create an aiohttp session instead of using the default one since the
|
||||
# default one is likely to trigger august's WAF if another integration
|
||||
# is also using Cloudflare
|
||||
self._aiohttp_session = aiohttp_client.async_create_clientsession(hass)
|
||||
self._token_refresh_lock = asyncio.Lock()
|
||||
self._access_token_cache_file = None
|
||||
self._hass = hass
|
||||
|
|
Loading…
Add table
Reference in a new issue