Add scrape sensor name to logs (#38020)
This commit is contained in:
parent
19870ea867
commit
59063a7d61
1 changed files with 2 additions and 2 deletions
|
@ -122,7 +122,7 @@ class ScrapeSensor(Entity):
|
||||||
"""Get the latest data from the source and updates the state."""
|
"""Get the latest data from the source and updates the state."""
|
||||||
self.rest.update()
|
self.rest.update()
|
||||||
if self.rest.data is None:
|
if self.rest.data is None:
|
||||||
_LOGGER.error("Unable to retrieve data")
|
_LOGGER.error("Unable to retrieve data for %s", self.name)
|
||||||
return
|
return
|
||||||
|
|
||||||
raw_data = BeautifulSoup(self.rest.data, "html.parser")
|
raw_data = BeautifulSoup(self.rest.data, "html.parser")
|
||||||
|
@ -139,7 +139,7 @@ class ScrapeSensor(Entity):
|
||||||
value = tag.text
|
value = tag.text
|
||||||
_LOGGER.debug(value)
|
_LOGGER.debug(value)
|
||||||
except IndexError:
|
except IndexError:
|
||||||
_LOGGER.error("Unable to extract data from HTML")
|
_LOGGER.error("Unable to extract data from HTML for %s", self.name)
|
||||||
return
|
return
|
||||||
|
|
||||||
if self._value_template is not None:
|
if self._value_template is not None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue