forked from andrius/neohubapi
Update README to new API.
This commit is contained in:
parent
7893ed66fd
commit
ec92300199
13
README.md
13
README.md
|
@ -3,26 +3,25 @@
|
|||
SPDX-License-Identifier: CC-BY-4.0
|
||||
-->
|
||||
|
||||
# Neohubapi
|
||||
# NeoHubAPI
|
||||
|
||||
This is a simple python wrapper around Heatmiser's Neohub API.
|
||||
|
||||
It's primary purpose is to be used via Home Assistant integration but
|
||||
it can also be used as a standalone library.
|
||||
|
||||
## Usage example
|
||||
|
||||
```python
|
||||
import asyncio
|
||||
import datetime
|
||||
import logging
|
||||
import neohubapi.neohub as neohub
|
||||
|
||||
from neohubapi.enums import ScheduleFormat
|
||||
|
||||
|
||||
async def run():
|
||||
hub = neohub.NeoHub()
|
||||
system = await hub.get_system()
|
||||
hub_data, thermostats = await hub.get_live_data()
|
||||
for device in thermostats:
|
||||
hub_data, devices = await hub.get_live_data()
|
||||
for device in devices['thermostats']:
|
||||
print(f"Temperature in zone {device.name}: {device.temperature}")
|
||||
await device.identify()
|
||||
|
||||
|
|
Loading…
Reference in New Issue