Skip to content

Commit 07034ec

Browse files
committed
Fix for mixed cameras setup (Welcome & Presence)
1 parent 0f75ea9 commit 07034ec

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

lnetatmo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ def __init__(self, authData):
343343
for camera in self.events:
344344
self.lastEvent[camera]=self.events[camera][sorted(self.events[camera])[-1]]
345345
self.default_home = list(self.homes.values())[0]['name']
346+
if not self.cameras[self.default_home] : raise NoDevice("No camera available")
346347
self.default_camera = list(self.cameras[self.default_home].values())[0]
347348

348349
def homeById(self, hid):
@@ -609,7 +610,7 @@ def getStationMinMaxTH(station=None, module=None):
609610
Camera = WelcomeData(authorization)
610611
except NoDevice :
611612
if stdout.isatty():
612-
print("lnetatmo.py : warning, no camera available for testing")
613+
print("lnetatmo.py : warning, no Welcome camera available for testing")
613614

614615
# If we reach this line, all is OK
615616

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
setup(
66
name='lnetatmo',
7-
version='1.2.1',
7+
version='1.2.2',
88
classifiers=[
99
'Development Status :: 5 - Production/Stable',
1010
'Intended Audience :: Developers',
@@ -17,7 +17,7 @@
1717
scripts=[],
1818
data_files=[],
1919
url='https://github.com/philippelt/netatmo-api-python',
20-
download_url='https://github.com/philippelt/netatmo-api-python/tarball/1.2.1',
20+
download_url='https://github.com/philippelt/netatmo-api-python/tarball/1.2.2',
2121
license='GPL V3',
2222
description='Simple API to access Netatmo weather station data from any python script.'
2323
)

0 commit comments

Comments
 (0)