From ec92300199edad5fc9868a5639c12eab0ed1eb2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 2 Jan 2021 22:55:13 +0000 Subject: [PATCH] Update README to new API. --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5c3659d..88d3c56 100644 --- a/README.md +++ b/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()