diff --git a/neohub.py b/neohub.py index 1c651f6..9f36532 100644 --- a/neohub.py +++ b/neohub.py @@ -98,7 +98,18 @@ class NeoHub: """ message = {"SET_CHANNEL": channel} - reply = {"result":"Trying to change channel"} + reply = {"result": "Trying to change channel"} + + result = await self._send(message, reply) + return result + + async def set_temp_format(self, temp_format): + """ + Set temperature format to C or F + """ + + message = {"SET_TEMP_FORMAT": temp_format} + reply = {"result": f"Temperature format set to {temp_format}"} result = await self._send(message, reply) return result diff --git a/test.py b/test.py index 5f13c4c..36cc089 100755 --- a/test.py +++ b/test.py @@ -14,9 +14,9 @@ async def run(): await hub.connect() firmware_version = await hub.firmware() print(firmware_version) - result = await hub.set_channel(11) + result = await hub.set_temp_format("C") print(result) -logging.basicConfig(level=logging.ERROR) +logging.basicConfig(level=logging.DEBUG) asyncio.run(run())