I need some help with scrape


I’m new to HA and I’m trying to read some values from my heat pump that sets up a local webpage. I have found the numbers I’m looking for but I can’t manage to access them with scrape.

The value I’m trying to access is (in this case) 22 on the highlighted row.

This is what I’ve got so far:

  - platform: scrape
    name: Framledning
    select: ".screen@p2HC_div > div:nth-child(6)"
    value_template: '{{ value I int }}'
    unit_of_measurement: "°C"

But the sensor.framledning won’t even show up. I also tried

select: ".cp115i5:is(div)"

like in an example I found in the documentation but it didn’t work (the example worked).

Really grateful for any help!

From what I can see in the screenshot, the id is cscreenOp2HC_div?

To convert a value to an integer you need to use the pipe symbol |, not a capital i.

Have you tried to just use the id? I would hope that the id is unique on this page, and in general I would recommend to keep the selectors as simple as possible.

select: ".cp115i5"

And lastly, are you sure that what you are seeing in the web developer tools is the actual HTML that the resource URL provides? What your browser renders is not necessarily the same that the scrape integration sees.