forked from andrius/neohubapi
Add NTP commands.
This commit is contained in:
parent
bb96122a69
commit
b147662381
15
neohub.py
15
neohub.py
|
@ -146,6 +146,8 @@ class NeoHub:
|
||||||
|
|
||||||
Puts thermostats into frost mode and timeclocks are set to off.
|
Puts thermostats into frost mode and timeclocks are set to off.
|
||||||
Instead of this function it is recommended to use frost on/off commands.
|
Instead of this function it is recommended to use frost on/off commands.
|
||||||
|
|
||||||
|
List of devices affected by this can be restricted using GLOBAL_DEV_LIST command
|
||||||
"""
|
"""
|
||||||
|
|
||||||
message = {"AWAY_ON" if state else "AWAY_OFF": 0}
|
message = {"AWAY_ON" if state else "AWAY_OFF": 0}
|
||||||
|
@ -168,6 +170,7 @@ class NeoHub:
|
||||||
result = await self._send(message)
|
result = await self._send(message)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
async def get_holiday(self):
|
async def get_holiday(self):
|
||||||
"""
|
"""
|
||||||
Get list of holidays
|
Get list of holidays
|
||||||
|
@ -243,3 +246,15 @@ class NeoHub:
|
||||||
|
|
||||||
result = await self._send(message)
|
result = await self._send(message)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
async def set_ntp(self, state: bool):
|
||||||
|
"""
|
||||||
|
Enables NTP client on Neohub
|
||||||
|
"""
|
||||||
|
|
||||||
|
message = {"NTP_ON" if state else "NTP_OFF": 0}
|
||||||
|
reply = {"result": "ntp client started" if state else "ntp client stopped"}
|
||||||
|
|
||||||
|
result = await self._send(message, reply)
|
||||||
|
return result
|
||||||
|
|
Loading…
Reference in New Issue