mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 01:07:10 +00:00
Stop Octoprint from logging errors during startup (#4220)
* Fix log errors * Remove discovery code
This commit is contained in:
parent
d7d71c97e2
commit
53d1a040d4
@ -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
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user