Hi,
I’m a beginner and trying to integrate some special sensors in my HASS.
There is a value, that is only available by website (no ModBus, etc.)
Here’s an abstract from the website:
<g id="svgConsumptionTooltip" transform="translate(565,190)" class="" style="user-select: none;">
<rect rx="5" ry="5" fill="#F3F3F3" stroke="#0a519c" stroke-width="2" width="105.48599243164062" x="-52.74299621582031" height="34.454694747924805" y="-17.227347373962402"></rect>
<text text-anchor="middle" fill="#0a518c" font-size="10" y="-3.512263298034668">
<tspan x="0">Power consumption</tspan>
<tspan x="0" dy="12">988 W</tspan>
</text>
</g>
I’d like to get the value of power consumption: here seen as 988 W in the last span.
I’ve tried to build a custom sensor
sensor:
- platform: scrape
name: varta_consumption
resource: http://192.168.1.88/index.html
select: "#svgConsumptionTooltip"
index: 1
The idea behind is to get a string and later to extract the value by RegEx. But first of all I’d like to get whole string from the website. So I’ve left the regex here for now.
But looking at the entity, the value of this sensor is “unknown”, only.
Do you have any idea, how to simply extract this value?
CU and thanks!