-
Notifications
You must be signed in to change notification settings - Fork 17
Upgrade notes for 3.x to 4.x
In release 4.x, the multiscrape component became an integration and is now built on top of the standard rest integration. This made it possible introduce a binary sensor that is working on the same single http request for all sensors. It also supports all connectivity features of the rest platform: https://www.home-assistant.io/integrations/rest/
Becoming an integration means that the configuration changed as well. You now need to specify your sensors as part of the multiscrape integration. If you don't want to re-add your sensors to lovelace, use the old selector ids (like version and releasedate below) as the new name of the sensor.
Old configuration:
sensor:
- 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"
New configuration (including a new binary_sensor):
multiscrape:
- name: home assistant scraper
resource: https://www.home-assistant.io
scan_interval: 3600
sensor:
- unique_id: version
name: Latest version
select: ".current-version > h1:nth-child(1)"
value_template: '{{ (value.split(":")[1]) }}'
- unique_id: releasedate
name: Release date
select: ".release-date"
binary_sensor:
- name: Latest version == 2021.6.0
select: ".current-version > h1:nth-child(1)"
value_template: '{{ (value.split(":")[1]) | trim == "2021.6.0" }}'
Please check the rest integration page for more details. All fields in there apply except 'json_attributes' and 'json_attributes_path'.