Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Home Assistant custom component for scraping multiple values (from a single HTTP request) with a separate sensor for each value.

Notifications You must be signed in to change notification settings

danieldotnl/hass-multiscrape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Buy Me A Coffee

Installation

hacs_badge

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'