From 0ceace96e77cf3a88985718553ea75f8fd95910a Mon Sep 17 00:00:00 2001 From: Fabien Piuzzi <fabien@reefab.net> Date: Tue, 22 Jan 2019 06:21:59 +0100 Subject: [PATCH] Bugfix: prevent error notification when octoprint server auto detected but no configuration present. (#20303) --- homeassistant/components/octoprint.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/homeassistant/components/octoprint.py b/homeassistant/components/octoprint.py index b626e9a93b5..853ee67db9d 100644 --- a/homeassistant/components/octoprint.py +++ b/homeassistant/components/octoprint.py @@ -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 '' -- GitLab