hass-multiscrape
hass-multiscrape copied to clipboard
Home Assistant custom component for scraping multiple values (from a single HTTP request) with a separate sensor for each value.
HA MultiScrape custom component
This repository is discontinued and replaced by https://github.com/danieldotnl/ha-multiscrape. The new repository is part of the default HACS store. Please switch!
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.
It is based on both the existing Rest sensor and the Scrape sensor. Most properties of the Rest and Scrape sensor apply.
Installation
Via HACS as a custom repository (https://github.com/danieldotnl/hass-multiscrape) or install manually by copying the files in a new 'custom_components/multiscrape' directory.
Example configuration
- platform: multiscrape
name: home assistant scraper
resource: https://www.home-assistant.io
scan_interval: 30
selectors:
version:
name: Current version
select: '.current-version > h1:nth-child(1)'
value_template: '{{ (value.split(":")[1]) }}'
releasedate:
name: Release date
select: '.release-date'
