diff --git a/example.py b/example.py index 11bf8b3..bf6f491 100755 --- a/example.py +++ b/example.py @@ -14,13 +14,14 @@ from neohubapi.enums import ScheduleFormat async def run(): hub = neohub.NeoHub() - await hub.connect() system = await hub.get_system() hub_data, thermostats = await hub.get_live_data() for device in thermostats: - print(f"Temperature in zone {device.name}: {device.temperature}") + print(f"Target temperature of {device.name}: {device.target_temperature}") await device.identify() + print(await hub.target_temperature_step) -logging.basicConfig(level=logging.DEBUG) + +#logging.basicConfig(level=logging.DEBUG) asyncio.run(run()) diff --git a/neohubapi/neohub.py b/neohubapi/neohub.py index 8bb081c..0074ab9 100644 --- a/neohubapi/neohub.py +++ b/neohubapi/neohub.py @@ -14,11 +14,8 @@ from neohubapi.neostat import NeoStat class NeoHub: - def __init__(self): + def __init__(self, host='Neo-Hub', port=4242): self._logger = logging.getLogger('neohub') - pass - - async def connect(self, host='Neo-Hub', port='4242'): self._host = host self._port = port