Skip to content

Commit

Permalink
Fix for unusual entity names #2
Browse files Browse the repository at this point in the history
  • Loading branch information
erikkastelec committed Feb 23, 2021
1 parent 7c60f74 commit 12056b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/wemportal/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"documentation": "https://github.com/erikkastelec/hass-WEM-Portal",
"issue_tracker": "https://github.com/erikkastelec/hass-WEM-Portal/issues",
"dependencies": [],
"version": "1.1.1",
"version": "1.1.2",
"codeowners": [
"@erikkastelec"
],
Expand Down
3 changes: 2 additions & 1 deletion custom_components/wemportal/wemportalapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ def scrape_pages(self, response):
# Catch heading not starting at 0
try:
header = div.xpath(header_query).extract()[0]
header = header.replace(" ", "").replace(" ", "_").lower()
header = header.replace("/#", "").replace(" ", "").replace(" - ", "_").replace("/*+/*", "_").replace(
" ", "_").lower()
except IndexError:
header = "unknown"
continue
Expand Down

0 comments on commit 12056b2

Please sign in to comment.