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:22:20 -08:00
1 parent ec7f2657cd
commit 0ceace96e7
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 ''