Stop Octoprint from logging errors during startup (#4220)

* Fix log errors

* Remove discovery code
This commit is contained in:
William Scanlon 2016-11-05 10:55:59 -04:00 committed by Paulus Schoutsen
parent d7d71c97e2
commit 53d1a040d4

View File

@ -11,13 +11,10 @@ import requests
import voluptuous as vol
from homeassistant.const import CONF_API_KEY, CONF_HOST, CONTENT_TYPE_JSON
from homeassistant.helpers import discovery
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
DISCOVER_BINARY_SENSORS = 'octoprint.binary_sensor'
DISCOVER_SENSORS = 'octoprint.sensors'
DOMAIN = 'octoprint'
OCTOPRINT = None
@ -44,12 +41,6 @@ def setup(hass, config):
_LOGGER.error("Error setting up OctoPrint API: %r", conn_err)
return False
for component, discovery_service in (
('sensor', DISCOVER_SENSORS),
('binary_sensor', DISCOVER_BINARY_SENSORS)):
discovery.discover(hass, discovery_service, component=component,
hass_config=config)
return True