Can someone please help me how to read this value with Scrape ?
I suggest you don’t use that page, but rather this one:
This ensures that it’s value is always in same HTML XPath location. In the table you link to, it can vary.
so if I’m not mistaken (and it accepts XPath) Otherwise you need CSS selector (there are browser addons to help youu pick the right value).
- platform: scrape
name: Grab Value
resource: https://2cryptocalc.com/eth-mining-calculator?hashrate=299
select: "//*[@id="pool24coins"]/text()"
Obviously change hashrate to the hashrate your rig mines
Oh yes thats correct. thx
But sadly this code doesn´t work for me.
Unfortunately, I don’t really know my way around this.
Maybe someone can tell me which parameters work here.
Wrong quotations lol. Try this
- platform: scrape
name: Grab Value
resource: https://2cryptocalc.com/eth-mining-calculator?hashrate=299
select: '//*[@id="pool24coins"]/text()'
Unfortunately, I just can’t get it to run.
This is what the code looks like for me now.
But unfortunately no entity is created.
You should make it a sensor?
Example configuration.yaml entry
sensor:
- platform: scrape
resource: https://www.home-assistant.io
select: ".current-version h1"
So it would look like:
sensor:
- platform: scrape
name: Grab Value
resource: https://2cryptocalc.com/eth-mining-calculator?hashrate=299
select: '//*[@id="pool24coins"]/text()'
It is a Sensor. My configuration.yaml looks like this:
Did you try it? Is it working with your installation of hass?