diff --git a/homeassistant/helpers/config_entry_oauth2_flow.py b/homeassistant/helpers/config_entry_oauth2_flow.py index 043a28cac2..7fb954378e 100644 --- a/homeassistant/helpers/config_entry_oauth2_flow.py +++ b/homeassistant/helpers/config_entry_oauth2_flow.py @@ -392,7 +392,7 @@ async def async_oauth2_request( url, **kwargs, headers={ - **kwargs.get("headers", {}), + **(kwargs.get("headers") or {}), "authorization": f"Bearer {token['access_token']}", }, )