diff --git a/homeassistant/components/sensor/scrape.py b/homeassistant/components/sensor/scrape.py index 0174407c7c3..1058d0f43e7 100644 --- a/homeassistant/components/sensor/scrape.py +++ b/homeassistant/components/sensor/scrape.py @@ -17,6 +17,7 @@ from homeassistant.const import ( CONF_PASSWORD, CONF_AUTHENTICATION, HTTP_BASIC_AUTHENTICATION, HTTP_DIGEST_AUTHENTICATION) from homeassistant.helpers.entity import Entity +from homeassistant.exceptions import PlatformNotReady import homeassistant.helpers.config_validation as cv REQUIREMENTS = ['beautifulsoup4==4.6.3'] @@ -73,8 +74,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None): rest.update() if rest.data is None: - _LOGGER.error("Unable to fetch data from %s", resource) - return False + raise PlatformNotReady add_entities([ ScrapeSensor(rest, name, select, attr, value_template, unit)], True)