Fix mix of aiohttp and requests in Bloomsky (#74598)

This commit is contained in:
Franck Nijhof
2022-07-07 12:27:25 +02:00
committed by GitHub
parent ba7ad1029c
commit 19f33d205c

View File

@@ -3,7 +3,6 @@ from datetime import timedelta
from http import HTTPStatus
import logging
from aiohttp.hdrs import AUTHORIZATION
import requests
import voluptuous as vol
@@ -67,7 +66,7 @@ class BloomSky:
_LOGGER.debug("Fetching BloomSky update")
response = requests.get(
f"{self.API_URL}?{self._endpoint_argument}",
headers={AUTHORIZATION: self._api_key},
headers={"Authorization": self._api_key},
timeout=10,
)
if response.status_code == HTTPStatus.UNAUTHORIZED: