diff --git a/pytec/examples/aioexample.py b/pytec/examples/aioexample.py index c502995..598aef2 100644 --- a/pytec/examples/aioexample.py +++ b/pytec/examples/aioexample.py @@ -1,9 +1,9 @@ import asyncio -from pytec.aioclient import Client +from pytec.aioclient import AsyncioClient async def main(): - tec = Client() + tec = AsyncioClient() await tec.start_session() # (host="192.168.1.26", port=23) await tec.set_param("s-h", 1, "t0", 20) print(await tec.get_pwm()) diff --git a/pytec/pytec/aioclient.py b/pytec/pytec/aioclient.py index 30264f1..4f9cffe 100644 --- a/pytec/pytec/aioclient.py +++ b/pytec/pytec/aioclient.py @@ -11,7 +11,7 @@ class StoppedConnecting(Exception): pass -class Client: +class AsyncioClient: def __init__(self): self._reader = None self._writer = None @@ -26,7 +26,7 @@ class Client: Throws asyncio.TimeoutError if timeout was exceeded. Example:: - client = Client() + client = AsyncioClient() try: await client.start_session() except StoppedConnecting: diff --git a/pytec/pytec/gui/model/thermostat.py b/pytec/pytec/gui/model/thermostat.py index 87f0727..f5d9d1f 100644 --- a/pytec/pytec/gui/model/thermostat.py +++ b/pytec/pytec/gui/model/thermostat.py @@ -3,7 +3,7 @@ from qasync import asyncSlot from pytec.gui.model.property import Property, PropertyMeta import asyncio import logging -from pytec.aioclient import Client +from pytec.aioclient import AsyncioClient class Thermostat(QObject, metaclass=PropertyMeta): @@ -20,7 +20,7 @@ class Thermostat(QObject, metaclass=PropertyMeta): def __init__(self, parent, update_s): self._update_s = update_s - self._client = Client() + self._client = AsyncioClient() self._watch_task = None self._report_mode_task = None self._poll_for_report = True