Fix errors if rest source becomes unavailable (#24986)
* Fix errors if rest source becomes unavailable * Remove exclamation markpull/24998/head
parent
412910ca65
commit
003ca655ee
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue