From b70cc611e13d24ef08cb913cb5aeb06cdab8e773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Mon, 23 Nov 2020 23:40:26 +0000 Subject: [PATCH] Remove missing import and add example to print temperatures. --- neohub.py | 3 +-- test.py | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/neohub.py b/neohub.py index 1ab74b3..4223966 100644 --- a/neohub.py +++ b/neohub.py @@ -9,7 +9,6 @@ from types import SimpleNamespace from enums import ScheduleFormat from enums import schedule_format_int_to_enum -from holiday import Holiday from neostat import NeoStat @@ -332,7 +331,7 @@ class NeoHub: async def get_live_data(self): """ - Returns unstructured live data from all devices + Returns live data from all devices """ message = {"GET_LIVE_DATA": 0} diff --git a/test.py b/test.py index f7348d0..a0e49f3 100755 --- a/test.py +++ b/test.py @@ -16,8 +16,10 @@ async def run(): hub = neohub.NeoHub() await hub.connect() system = await hub.get_system() - result = await hub.get_zones() - print(result) + result = await hub.get_live_data() + devices = result.devices + for device in devices: + print(f"Temperature in zone {device.ZONE_NAME}: {device.ACTUAL_TEMP}") logging.basicConfig(level=logging.DEBUG)