forked from andrius/neohubapi
Add method to set temperature format.
This commit is contained in:
parent
135c6033bc
commit
175497b15b
11
neohub.py
11
neohub.py
|
@ -102,3 +102,14 @@ class NeoHub:
|
|||
|
||||
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
|
||||
|
|
4
test.py
4
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())
|
||||
|
|
Loading…
Reference in New Issue