File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1+ import os
2+
13from maxcube .cube import MaxCube
24from maxcube .device import (
35 MAX_DEVICE_MODE_AUTOMATIC ,
810 MAX_WINDOW_SHUTTER ,
911)
1012
11- cube = MaxCube (" 192.168.0.20" , 62910 )
13+ cube = MaxCube (os . environ . get ( "MAXCUBE_IP" , " 192.168.0.20") , 62910 )
1214
1315print ("Serial: %s" % (cube .serial ))
1416for room in cube .rooms :
6365
6466for device in cube .devices :
6567 print (device )
66- if cube .is_wallthermostat (device ) or cube .is_thermostat (device ):
68+ if device .is_wallthermostat () or device .is_thermostat ():
6769 print ("Setting temp" )
6870 cube .set_target_temperature (device , 8 )
6971 else :
7375
7476for device in cube .devices :
7577 print (device )
76- if cube .is_wallthermostat (device ):
78+ if device .is_wallthermostat ():
7779 print ("Setting mode" )
7880 cube .set_mode (device , MAX_DEVICE_MODE_MANUAL )
7981 else :
You can’t perform that action at this time.
0 commit comments