Fix errors if rest source becomes unavailable (#24986)
* Fix errors if rest source becomes unavailable * Remove exclamation mark
This commit is contained in:
parent
412910ca65
commit
003ca655ee
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue