Add types-beautifulsoup4 dependency (#98377)

This commit is contained in:
Marc Mueller 2023-08-14 11:50:14 +02:00 committed by GitHub
parent 4dd102f818
commit 180ff24492
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -178,6 +178,7 @@ class ScrapeSensor(
def _extract_value(self) -> Any:
"""Parse the html extraction in the executor."""
raw_data = self.coordinator.data
value: str | list[str] | None
try:
if self._attr is not None:
value = raw_data.select(self._select)[self._index][self._attr]