Skip to content

Commit

Permalink
change HomesData and self-test
Browse files Browse the repository at this point in the history
  • Loading branch information
JurgenLB authored Nov 11, 2024
1 parent e8863dc commit 1a13c29
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion lnetatmo.py
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,9 @@ def __init__(self, authData, home=None):
#print (h.keys())
if home in (h["name"], h["id"]):
self.Homes_Data = h
else:
self.Homes_Data = self.rawData[0]
self.homeid = self.Homes_Data['id']
if not self.Homes_Data : raise NoDevice("No Devices available")


Expand Down Expand Up @@ -1160,7 +1163,6 @@ def getStationMinMaxTH(station=None, module=None, home=None):

try:
homes = HomeData(authorization)
homeid = homes.homeid
except NoDevice :
logger.warning("No home available for testing")

Expand All @@ -1175,11 +1177,24 @@ def getStationMinMaxTH(station=None, module=None, home=None):
logger.warning("No thermostat avaible for testing")

try:
print (' ')
logger.info("Homes Data")
#homesdata = HomesData(authorization, homeid)
homesdata = HomesData(authorization)
homeid = homesdata.homeid
except NoDevice:
logger.warning("No HomesData avaible for testing")

try:
print (' ')
logger.info("Home Status")
HomeStatus(authorization, homeid)
except NoDevice:
logger.warning("No Home available for testing")

try:
print (' ')
logger.info("HomeCoach")
Homecoach = HomeCoach(authorization)
except NoDevice:
logger.warning("No HomeCoach avaible for testing")
Expand Down

0 comments on commit 1a13c29

Please sign in to comment.