A simple regex should work if the string you need always starts with a ‘#’ and ends with ‘kW’. I created this scrape sensor with your example html as the input:
Once you have that working, go and slap whoever decided that octothorpe-delimited multi-line text in an HTML body was an appropriate way to share data.
Ok Gonzotek,
this morning I figured out the situation.
I have to read a simple txt file with the string I have indicated.
But for some reason HA fails to authenticate and returns me <DOCTYPE… (rest) or Unauthorized (scrape). The rest returns the first 12 char and scrape the content.
I suspect that’s because you’re replacing the decimal point with a comma which is making it not a number, and thus conflicting with the unit_of_measurement setting. Suggest you don’t do that replacement: your locale setting should do that reformatting in your front end display.
The system cannot restart because the configuration is not valid: Invalid config for [rest]: [unit_of_measurement] is an invalid option for [rest]. Check: rest->rest->0->unit_of_measurement.