fix: Fix import of aiohttp_client
This commit is contained in:
@@ -1,12 +1,10 @@
|
|||||||
import datetime
|
import datetime
|
||||||
import locale
|
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
from homeassistant import aiohttp_client
|
|
||||||
|
|
||||||
_log = logging.getLogger(__name__)
|
_log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -49,6 +47,8 @@ class CovidCrawler(CovidCrawlerBase):
|
|||||||
_log.info("Fetching COVID-19 data update")
|
_log.info("Fetching COVID-19 data update")
|
||||||
|
|
||||||
if self.hass:
|
if self.hass:
|
||||||
|
from homeassistant.helpers import aiohttp_client
|
||||||
|
|
||||||
result = await aiohttp_client.async_get_clientsession(self.hass).get(
|
result = await aiohttp_client.async_get_clientsession(self.hass).get(
|
||||||
self.url
|
self.url
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user