Hotfix for Netatmo discovery (#3837)

This should definetly fix #2601

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>
This commit is contained in:
Hugo Dupras 2016-10-13 18:21:22 +02:00 committed by Paulus Schoutsen
parent d873a7baf0
commit 9a0bb62654
3 changed files with 28 additions and 24 deletions

View file

@ -49,12 +49,11 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
import lnetatmo
try:
data = WelcomeData(netatmo.NETATMO_AUTH, home)
if data.get_camera_names() == []:
return None
except lnetatmo.NoDevice:
return None
if data.get_camera_names() == []:
return None
sensors = config.get(CONF_MONITORED_CONDITIONS, SENSOR_TYPES)
for camera_name in data.get_camera_names():