From 5b590f577ae732f8856d3bafbdb124488b6aad5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sun, 22 Nov 2020 00:37:53 +0000 Subject: [PATCH] Add identify function. --- neohub.py | 12 ++++++++++++ test.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/neohub.py b/neohub.py index 2e19ac9..dcda4ef 100644 --- a/neohub.py +++ b/neohub.py @@ -334,3 +334,15 @@ class NeoHub: result = await self._send(message, reply) return result + + + async def identify(self): + """ + Flashes red LED light + """ + + message = {"IDENTIFY": 0} + reply = {"result": "flashing led"} + + result = await self._send(message, reply) + return result diff --git a/test.py b/test.py index 4bef39e..a230e9f 100755 --- a/test.py +++ b/test.py @@ -15,7 +15,7 @@ async def run(): hub = neohub.NeoHub() await hub.connect() system = await hub.get_system() - result = await hub.set_ntp(True) + result = await hub.identify() print(result)