Adjust scrape coordinator logging (#81299)
This commit is contained in:
parent
dd092d86d4
commit
283f8585b8
2 changed files with 3 additions and 2 deletions
|
@ -33,4 +33,6 @@ class ScrapeCoordinator(DataUpdateCoordinator[BeautifulSoup]):
|
|||
await self._rest.async_update()
|
||||
if (data := self._rest.data) is None:
|
||||
raise UpdateFailed("REST data is not available")
|
||||
return await self.hass.async_add_executor_job(BeautifulSoup, data, "lxml")
|
||||
soup = await self.hass.async_add_executor_job(BeautifulSoup, data, "lxml")
|
||||
_LOGGER.debug("Raw beautiful soup: %s", soup)
|
||||
return soup
|
||||
|
|
|
@ -170,7 +170,6 @@ class ScrapeSensor(CoordinatorEntity[ScrapeCoordinator], TemplateSensor):
|
|||
def _extract_value(self) -> Any:
|
||||
"""Parse the html extraction in the executor."""
|
||||
raw_data = self.coordinator.data
|
||||
_LOGGER.debug("Raw beautiful soup: %s", raw_data)
|
||||
try:
|
||||
if self._attr is not None:
|
||||
value = raw_data.select(self._select)[self._index][self._attr]
|
||||
|
|
Loading…
Add table
Reference in a new issue