Migrate http client to use aiohttp instead of httpx (#643)

This commit is contained in:
Steven B
2024-01-18 17:32:26 +00:00
committed by GitHub
parent 3b1b0a3c21
commit 642e9a1f5b
10 changed files with 488 additions and 119 deletions

View File

@@ -8,7 +8,7 @@ from .credentials import Credentials
from .exceptions import SmartDeviceException
if TYPE_CHECKING:
from httpx import AsyncClient
from aiohttp import ClientSession
_LOGGER = logging.getLogger(__name__)
@@ -151,7 +151,7 @@ class DeviceConfig:
# compare=False will be excluded from the serialization and object comparison.
#: Set a custom http_client for the device to use.
http_client: Optional["AsyncClient"] = field(default=None, compare=False)
http_client: Optional["ClientSession"] = field(default=None, compare=False)
def __post_init__(self):
if self.connection_type is None: