From 003ca655eed3d8c2c6300ae030859c24866d6efe Mon Sep 17 00:00:00 2001 From: Robert Dunmire III Date: Sat, 6 Jul 2019 13:33:37 -0400 Subject: [PATCH] Fix errors if rest source becomes unavailable (#24986) * Fix errors if rest source becomes unavailable * Remove exclamation mark --- homeassistant/components/scrape/sensor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/homeassistant/components/scrape/sensor.py b/homeassistant/components/scrape/sensor.py index a5975d4f9d0..80af36e6d1d 100644 --- a/homeassistant/components/scrape/sensor.py +++ b/homeassistant/components/scrape/sensor.py @@ -109,6 +109,9 @@ class ScrapeSensor(Entity): def update(self): """Get the latest data from the source and updates the state.""" self.rest.update() + if self.rest.data is None: + _LOGGER.error("Unable to retrieve data") + return from bs4 import BeautifulSoup