@@ -1048,17 +1048,30 @@ def getStationMinMaxTH(station=None, module=None, home=None):
1048
1048
stderr .write ("Library source missing identification arguments to check lnetatmo.py (user/password/etc...)" )
1049
1049
exit (1 )
1050
1050
1051
- authorization = ClientAuth () # Test authentication method
1051
+ authorization = ClientAuth () # Test authentication method
1052
1052
1053
1053
try :
1054
1054
weatherStation = WeatherStationData (authorization ) # Test DEVICELIST
1055
1055
except NoDevice :
1056
1056
logger .warning ("No weather station available for testing" )
1057
1057
else :
1058
- weatherStation .MinMaxTH () # Test GETMEASUR
1058
+ weatherStation .MinMaxTH () # Test GETMEASUR
1059
1059
1060
1060
try :
1061
1061
homes = HomeData (authorization )
1062
+ for k , v in homes .homes .items ():
1063
+ #print (v)
1064
+ C = v .pop ('cameras' )
1065
+ P = v .pop ('persons' )
1066
+ S = v .pop ('smokedetectors' )
1067
+ #
1068
+ if C == [] and P == [] and S == []:
1069
+ #print (v)
1070
+ logger .info ("No Cameras, Persons, Smokedetectors found" )
1071
+ #
1072
+ else :
1073
+ homeid = k
1074
+ #
1062
1075
except NoDevice :
1063
1076
logger .warning ("No home available for testing" )
1064
1077
@@ -1067,6 +1080,18 @@ def getStationMinMaxTH(station=None, module=None, home=None):
1067
1080
except NoDevice :
1068
1081
logger .warning ("No thermostat avaible for testing" )
1069
1082
1083
+ try :
1084
+ # homesdata = lnetatmo.HomesData(authorization)
1085
+ # ERROR ; Your current token scope do not allow access to Module ? - No Home ID given !
1086
+ homesdata = HomesData (authorization , homeid )
1087
+ except NoDevice :
1088
+ logger .warning ("No HomesData avaible for testing" )
1089
+
1090
+ try :
1091
+ Homecoach = HomeCoach (authorization )
1092
+ except NoDevice :
1093
+ logger .warning ("No HomeCoach avaible for testing" )
1094
+
1070
1095
# If we reach this line, all is OK
1071
1096
logger .info ("OK" )
1072
1097
0 commit comments