Fix errors if rest source becomes unavailable (#24986)
* Fix errors if rest source becomes unavailable * Remove exclamation mark
This commit is contained in:
1 parent
412910ca65
commit
003ca655ee
1 file changed
+3
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user