The first bit of data I’m trying to grab is the 24hr snow fall, so console gave me this: #snow_report_1 > div.snow_report__content.row > ul > li:nth-child(2) > div > h5
It seems to make sense, but doesn’t work.
I’m trying to scrape a temperature measurement from a website - measurements are added every hour to a string - so far I can retrieve the entire string with measurements after ‘var query_temp’ - but I’m not experienced enough with this to obtain the last measurement (these are always in the positions -5 to -1 from the end of the string - indicated in the figure below). Could anyone point me in the right direction?
But I’m getting a new error if I include this line:
Error loading /config/configuration.yaml: while parsing a block mapping
in "/config/configuration.yaml", line 795, column 9
expected <block end>, but found '<scalar>'
in "/config/configuration.yaml", line 798, column 119```
Hi. I’d like to scrape a status indicator. The problem is that the element has no data in it, but rather the only thing that changes is the colour defined in the style attribute
We’d need the URL or the full HTML (pastebin?), and confirmation that the data you’re after is in the HTML as originally downloaded (View Source rather than F12 DevTools).
Could be as simple as select: div.buy-value.
If that colour definition is in the original HTML as fetched (i.e. not dynamically loaded afterwards), RESTful binary sensor. If that colour isn’t used anywhere else in the document, and the page length isn’t too great:
binary_sensor:
- platform: rest
resource: URL
value_template: "{{ 'rgb(93, 199, 22);' in value }}"
Lots of "if"s there, but without a URL or the HTML to go off, I have to make assumptions.
Since posting I’ve realised that multiscrape has an attribute key which should be able to return the tag attributes but somehow it does not work for this particular element. I’m experimenting with something like:
- name: O-Life Home Charger status
unique_id: o_life_home_charger_status
select: ".spot-list-item div:nth-child(1) div div .charger-status-dot"
attribute: "class"
value_template: "{{value}}"
which I believe should return “charger-status-dot”, but it fails. It seems to work fine with other selectors that I am already getting from this page. Is it because the div is actually empty?
I am not certain if this is the right location for this, but does anyone have any tips to creating a scrap sensor that would contain the statement from this alert>
I have tried a few things but honestly don’t understand the “selector” portion of his to try and get what I would like.
Any tips or help is appreciated.
I always get unavailable as the entity.
Where am I going wrong?
All I need is to retrieve date and highest point time into a time stamp so I can create a reminder in HA
still unavailable.
Just to verify, I don’t need a restart. I am using the multiscrape loading under YAML configuration reloading, not a full restart. Should work to update, right?