Read value from website (2cryptocalc)

Can someone please help me how to read this value with Scrape ?

URL: https://2cryptocalc.com/

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

1 Like

Oh yes thats correct. thx :slightly_smiling_face:
But sadly this code doesn´t work for me.

scrape

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.
code

But unfortunately no entity is created.
entities

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:
sensor

Did you try it? Is it working with your installation of hass?

look like pointing to the right place

so the select needs looking at

you need to do some more reading.