Remove missing import and add example to print temperatures.
This commit is contained in:
parent
3718cb64d1
commit
b70cc611e1
|
@ -9,7 +9,6 @@ from types import SimpleNamespace
|
||||||
|
|
||||||
from enums import ScheduleFormat
|
from enums import ScheduleFormat
|
||||||
from enums import schedule_format_int_to_enum
|
from enums import schedule_format_int_to_enum
|
||||||
from holiday import Holiday
|
|
||||||
from neostat import NeoStat
|
from neostat import NeoStat
|
||||||
|
|
||||||
|
|
||||||
|
@ -332,7 +331,7 @@ class NeoHub:
|
||||||
|
|
||||||
async def get_live_data(self):
|
async def get_live_data(self):
|
||||||
"""
|
"""
|
||||||
Returns unstructured live data from all devices
|
Returns live data from all devices
|
||||||
"""
|
"""
|
||||||
|
|
||||||
message = {"GET_LIVE_DATA": 0}
|
message = {"GET_LIVE_DATA": 0}
|
||||||
|
|
6
test.py
6
test.py
|
@ -16,8 +16,10 @@ async def run():
|
||||||
hub = neohub.NeoHub()
|
hub = neohub.NeoHub()
|
||||||
await hub.connect()
|
await hub.connect()
|
||||||
system = await hub.get_system()
|
system = await hub.get_system()
|
||||||
result = await hub.get_zones()
|
result = await hub.get_live_data()
|
||||||
print(result)
|
devices = result.devices
|
||||||
|
for device in devices:
|
||||||
|
print(f"Temperature in zone {device.ZONE_NAME}: {device.ACTUAL_TEMP}")
|
||||||
|
|
||||||
|
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
|
|
Loading…
Reference in New Issue