Remove missing import and add example to print temperatures.

This commit is contained in:
Andrius Štikonas 2020-11-23 23:40:26 +00:00
parent 3718cb64d1
commit b70cc611e1
2 changed files with 5 additions and 4 deletions

View File

@ -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}

View File

@ -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)