Anyone know how to scrape the guage and forecast from this website?
I checked this briefly and was able to scrape the current value as follows:
-
Setup a new scrape sensor with Resource → https://auroraforecast.com/
-
Configure the sensor as follows
Select →#AuroraForecastDescription > h2 > span
Value template →{{ value | regex_findall_index('(\d+)(?=/10)') }}
Edit:
Basic forecast information (low, medium, intense) can be scraped with the following sensors:
Name Forecast1
Select → #ThreeDayForecast > div.threeDayItem.item0 > div
Value template → {{ value | regex_findall_index('(.*)(?=Aurora)') }}
Name Forecast2
Select → #ThreeDayForecast > div.threeDayItem.item1 > div
Value template → {{ value | regex_findall_index('(.*)(?=Aurora)') }}
Name Forecast3
Select → #ThreeDayForecast > div.threeDayItem.item2 > div
Value template → {{ value | regex_findall_index('(.*)(?=Aurora)') }}
I didn’t find a possibilty to scrape the number for the forecast so far.
This scrape sensor is working well, thanks. I am interested in what you used to show the graphic?
Figured it out, it is a Guage card.
Thanks
Very nice!
With Multiscrape you can scrape the number value of the forecast like this:
multiscrape:
- resource: "https://auroraforecast.com/"
name: Aurora Forecast
sensor:
- unique_id: aurora_forecast_day1
name: Aurora Forecast Day 1
select: "div.threeDayItem.item0 > div"
attribute: "class"
value_template: "{{ value[1].split('level')[1] }}"