Update README to new API.

This commit is contained in:
Andrius Štikonas 2021-01-02 22:55:13 +00:00
parent 7893ed66fd
commit ec92300199
1 changed files with 6 additions and 7 deletions

View File

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