forked from texnofobix/pyhwtherm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
22 lines (17 loc) · 739 Bytes
/
example.py
File metadata and controls
22 lines (17 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import pyhwtherm
mytest = pyhwtherm.PyHWTherm(
username="someuser@example.com",
password="mysecretpassword",
deviceid=123456
)
print "login successful: ",mytest.login()
print "Get thermostat data:", mytest.updateStatus()
beforeChange = mytest.status
print "Status: ", beforeChange
mytest.tempHold("11:00",cool=78,heat=68)
mytest.submit()
print "Get thermostat data:", mytest.updateStatus()
afterChange = mytest.status
print "heat >>",beforeChange['latestData']['uiData']['HeatSetpoint'],"->",afterChange['latestData']['uiData']['HeatSetpoint']
print "cool >>",beforeChange['latestData']['uiData']['CoolSetpoint'],"->",afterChange['latestData']['uiData']['CoolSetpoint']
print "Logout", mytest.logout()