Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Update example config with changes in release 4.0.0
  • Loading branch information
danieldotnl authored Jun 6, 2021
1 parent 6ebf849 commit 1ffcfca
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
[![Discord][discord-shield]][discord]
[![Community Forum][forum-shield]][forum]

## BREAKING CHANGE in release 4.0.0
If you are upgrading to release 4.0.0, see the [upgrade notes.](https://github.com/danieldotnl/ha-multiscrape/wiki/Upgrade-notes-for-3.x-to-4.x)

# HA MultiScrape custom component

This Home Assistant custom component can scrape multiple fields (using CSS selectors) from a single HTTP request (the existing scrape sensor can scrape a single field only). The scraped data becomes available in separate sensors.
Expand All @@ -30,19 +33,19 @@ Install via HACS (default store) or install manually by copying the files in a n
### Example configuration (YAML)

```yaml
sensor:
- platform: multiscrape
name: home assistant scraper
resource: https://www.home-assistant.io
scan_interval: 30
selectors:
version:
name: Current version
multiscrape:
- resource: https://www.home-assistant.io
scan_interval: 3600
sensor:
- name: Latest version
select: ".current-version > h1:nth-child(1)"
value_template: '{{ (value.split(":")[1]) }}'
releasedate:
name: Release date
- name: Release date
select: ".release-date"
binary_sensor:
- name: Latest version == 2021.7.0
select: ".current-version > h1:nth-child(1)"
value_template: '{{ (value.split(":")[1]) | trim == "2021.7.0" }}'
```
## Contributions are welcome!
Expand Down

0 comments on commit 1ffcfca

Please sign in to comment.