Bugfix: prevent error notification when octoprint server auto detected but no configuration present. (#20303)

This commit is contained in:
Fabien Piuzzi authored and Paulus Schoutsen committed 2019-01-21 21:21:59 -08:00
1 parent 6511e11ec9
commit 3e056a24dd
1 file changed
+4
+4
View File
@@ -92,6 +92,10 @@ def setup(hass, config):
discovery.listen(hass, SERVICE_OCTOPRINT, device_discovered)
if DOMAIN not in config:
# Skip the setup if there is no configuration present
return True
for printer in config[DOMAIN]:
name = printer[CONF_NAME]
ssl = 's' if printer[CONF_SSL] else ''