Scrape sensor improved - scraping multiple values

That did something. The errors are gone now from the logs, but there is no sensor created anywhere. Can’t find it in the status page or entities page. I’ll troubleshoot further, but if anyone has an idea where to look, I’m all ears :slight_smile:

Not working unfortunately, the result from that is:

initPageText(); ready();

Which is indeed in the body part. But I need this part:

<script type="text/javascript">
var webdata_sn = "";
var webdata_msvn = "V1.18.00";
var webdata_ssvn = "V1.18.00";
var webdata_pv_type = "";
var webdata_rate_p = "";
var webdata_now_p = "1441";
var webdata_today_e = "6.72";
var webdata_total_e = "10851.4";
var webdata_alarm = "";
var webdata_utime = "0";
var cover_mid = "";
var cover_ver = "";
var cover_wmode = "APSTA";
var cover_ap_ssid = "";
var cover_ap_ip = "";
var cover_ap_mac = "";
var cover_sta_ssid = "";
var cover_sta_rssi = "70%";
var cover_sta_ip = "";
var cover_sta_mac = "";
var status_a = "1";
var status_b = "0";
var status_c = "0";

Paste in the complete sensor config you’re using.

  - name: Zon test
    resource: http://xxx.xxx.xxx.xxx/status.html
    scan_interval: 10
    log_response: true
    sensor:
      - name: "Zon test"
        unique_id: zon_test
        select: "body > script:nth-child(2)"

I can’t use a value template yet, otherwise it doesn’t give me any results and some errors in the logs. This is purely to see what part of the site it grabs and that’s the one I’ve posted above.

Only if you use the wrong template. Try this for starters:

value_template: "{{ value[:100] }}"

which should convince you that we’re in the correct part of the document. Then tell me which bits of data you want and I’ll show you how to extract them.

Okay, now I’m getting:

var height=0;function fileText(id,value){if(document.getElementById(id)){document.getElementById(i

Which is not complete, but I’m unable to see more of the results. But yes, that is the top of where I need to be.

You put me on the right path! Thanks so much. I ended up with the following sensor config:

name: "Zon test"
unique_id: zon_test
select: "head > script:nth-child(3)"
value_template: "{{ (value.split(';')[6])|replace('var webdata_today_e = ','')|replace('\"', '')|float }}"
unit_of_measurement: "kWh"
device_class: "power"
state_class: "measurement"

Works perfectly!

1 Like

Glad it worked for you. Apologies, I missed that the <script> you needed was in the <head> not the <body>.

Hi, I try to scrape the value of VD HEIZEN TAG (which should output me the value 3,101KWh) already for several days - sadly, without success.

In the logs I always get the following error:

Scraper_noname_1 # Wärmepumpe Energieverbrauch Heizen # Unable to scrape data: Could not find a tag for given selector Consider using debug logging and log_response for further investigation.

My config:

- resource: http://xxx.xxx.x.xxx/?s=1,1
  scan_interval: 30
  log_response: true
  sensor:
    - unique_id: stiebel_eltron_energy_consumption_heizen
      name: Wärmepumpe Energieverbrauch Heizen
      select: "div.span-11:nth-child(3) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(2) > td:nth-child(2)"

This is the page_soup:

<?xml version="1.0"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="de" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>STIEBEL ELTRON Reglersteuerung</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<meta content="no" http-equiv="imagetoolbar"/>
<meta content="de" name="content-language"/>
<meta content="noindex,nofollow" name="robots"/>
<meta content="" name="keywords"/>
<meta content="" name="description"/>
<link href="./pics/brlogo.ico" rel="shortcut icon"/>
<!-- does not exist link rel="stylesheet" href="./css/netzwerk.css" type="text/css" media="all" /-->
<link href="./css/slider/ste_slider.css" rel="stylesheet" type="text/css"/>
<!-- Blueprint CSS framework -->
<link href="./css/blueprint/screen.css" media="screen, projection" rel="stylesheet" type="text/css"/>
<link href="./css/blueprint/print.css" media="print" rel="stylesheet" type="text/css"/>
<!--[if lt IE 8]><link rel="stylesheet" href="./css/blueprint/ie.css" type="text/css" media="screen, projection" /><![endif]-->
<link href="./css/layout.css" media="all" rel="stylesheet" type="text/css"/>
<link href="./css/sifr.css" media="all" rel="stylesheet" type="text/css"/>
<link href="./css/thickbox.css" media="all" rel="stylesheet" type="text/css"/>
<link href="./css/jquery.jqplot.min.css" rel="stylesheet" type="text/css"/>
<script src="./js/jquery.min.js" type="text/javascript"></script>
<script src="./js/thickbox.js" type="text/javascript"></script>
<script src="./js/sifr.js" type="text/javascript"></script>
<script src="./js/sifr_sw.js" type="text/javascript"></script>
<script src="./js/scripts.js" type="text/javascript"></script>
<script src="./js/json2.js" type="text/javascript"></script>
<script src="./js/plugins/jquery-ui-1.8.6.custom.min.js" type="text/javascript"></script>
<script src="./js/setDNS1.js" type="text/javascript"></script>
<!-- [if IE] -->
<script language="javascript" src="./js/excanvas.min.js" type="text/javascript"></script>
<!-- [endif] -->
<!-- for dateAxisRenderer.js -->
<script language="javascript" src="./js/plugins/Date.min.js" type="text/javascript"></script>
<!-- BEGIN: load jqplot -->
<script language="javascript" src="./js/jquery.jqplot.min.js" type="text/javascript"></script>
<script language="javascript" src="./js/plugins/jqplot.dateAxisRenderer.js" type="text/javascript"></script>
<script language="javascript" src="./js/plugins/jqplot.barRenderer.js" type="text/javascript"></script>
<script language="javascript" src="./js/plugins/jqplot.categoryAxisRenderer.js" type="text/javascript"></script>
<!-- END: load jqplot -->
<!-- BEGIN: load slider -->
<script language="javascript" src="./js/plugins/slider/jquery.ui.core.js" type="text/javascript"></script>
<script language="javascript" src="./js/plugins/slider/jquery.ui.widget.js" type="text/javascript"></script>
<script language="javascript" src="./js/plugins/slider/jquery.ui.mouse.js" type="text/javascript"></script>
<script language="javascript" src="./js/plugins/slider/jquery.ui.slider.js" type="text/javascript"></script>
<!-- END: load slider -->
<!-- BEGIN: Uhrzeit -->
<script language="javascript" type="text/javascript">
var timestampunterschied = 1684072651 * 1000 - new Date().getTime();
</script>
<script language="javascript" src="./js/uhrzeit.js" type="text/javascript"></script>
<!-- END:  Uhrzeit -->
</head>
<body>
<div id="header">
<div class="head curdef">
<div id="meta">
<div id="login">
</div>
</div>
<div class="eingestelle_sprache"><strong><a href="?s=5,3" style="color:white">DEUTSCH</a></strong></div>
<div id="Uhrzeit"></div>
<div class="title">
<a href="." onclick="return checkChanges(this);" title="zur Startseite">
<img alt="Servicewelt" src="./pics/title.png"/>
</a>
<div style="position: relative; color: #97B765; font-weight: 900; margin: 18px 0px 0px 323px;"></div>
</div>
<div class="logo"><a class="home_link" href="." onclick="return checkChanges(this);" title="zur Startseite"> </a></div>
</div>
</div>
<div class="container" id="page">
<div id="main">
<div id="SpacerFirefox"></div>
<div id="nav">
<div class="clear"></div>
<div class="nav left defaultfirst">
<div class="l left"> </div>
<div class="c left link1">
<a href="?s=0" onclick="return checkChanges(this);">START</a>
</div>
<div class="r left"> </div>
<div class="clear"></div>
</div>
<div class="nav left default parent">
<div class="l left"> </div>
<div class="c left link2">
<a>INFO</a>
</div>
<div class="r left"> </div>
<div class="clear"></div>
<div class="second">
<ul class="second">
<li>
<a href="?s=1,0" onclick="return checkChanges(this);">ANLAGE</a>
</li>
<li>
<a href="?s=1,1" onclick="return checkChanges(this);">WÄRMEPUMPE</a>
</li>
<li>
<a href="?s=1,8" onclick="return checkChanges(this);">Lizenzbestimmungen</a>
</li>
<li>
<a href="?s=1,9" onclick="return checkChanges(this);">NUTZUNGS- UND DATENSCHUTZRICHTLINIE</a>
</li>
<li>
<a href="?s=1,10" onclick="return checkChanges(this);">HANDBUCH</a>
</li>
</ul>
</div>
</div>
<div class="nav left default parent">
<div class="l left"> </div>
<div class="c left link3">
<a>DIAGNOSE</a>
</div>
<div class="r left"> </div>
<div class="clear"></div>
<div class="second">
<ul class="second">
<li>
<a href="?s=2,0" onclick="return checkChanges(this);">STATUS ANLAGE</a>
</li>
<li>
<a href="?s=2,2" onclick="return checkChanges(this);">STATUS WÄRMEPUMPE</a>
</li>
<li>
<a href="?s=2,4" onclick="return checkChanges(this);">ANALYSE WÄRMEPUMPE</a>
</li>
<li>
<a href="?s=2,6" onclick="return checkChanges(this);">INTERNE BERECHNUNG</a>
</li>
<li>
<a href="?s=2,7" onclick="return checkChanges(this);">SYSTEM</a>
</li>
<li>
<a href="?s=2,9" onclick="return checkChanges(this);">MELDUNGSLISTE</a>
</li>
</ul>
</div>
</div>
<div class="nav left default parent">
<div class="l left"> </div>
<div class="c left link4">
<a>PROGRAMME</a>
</div>
<div class="r left"> </div>
<div class="clear"></div>
<div class="second">
<ul class="second">
<li>
<a href="?s=3,0" onclick="return checkChanges(this);">HEIZPROGRAMM</a>
</li>
<li>
<a href="?s=3,2" onclick="return checkChanges(this);">WARMWASSERPROGRAMM</a>
</li>
<li>
<a href="?s=3,4" onclick="return checkChanges(this);">ZIRKULATIONSPROGRAMM</a>
</li>
<li>
<a href="?s=3,6" onclick="return checkChanges(this);">SILENTPROGRAMM 1</a>
</li>
<li>
<a href="?s=3,7" onclick="return checkChanges(this);">SILENTPROGRAMM 2</a>
</li>
<li>
<a href="?s=3,12" onclick="return checkChanges(this);">PARTYPROGRAMM</a>
</li>
<li>
<a href="?s=3,13" onclick="return checkChanges(this);">FERIENPROGRAMM</a>
</li>
<li>
<a href="?s=3,14" onclick="return checkChanges(this);">ANTILEGIONELLENPROGRAMM</a>
</li>
</ul>
</div>
</div>
<div class="nav left default parent">
<div class="l left"> </div>
<div class="c left link5">
<a>EINSTELLUNGEN</a>
</div>
<div class="r left"> </div>
<div class="clear"></div>
<div class="second">
<ul class="second">
<li>
<a href="?s=4,0" onclick="return checkChanges(this);">ZEIT / DATUM</a>
</li>
<li>
<a href="?s=4,1" onclick="return checkChanges(this);">SOMMERZEIT EINSTELLEN</a>
</li>
<li>
<a href="?s=4,2" onclick="return checkChanges(this);">HEIZEN</a>
</li>
<li>
<a href="?s=4,3" onclick="return checkChanges(this);">WARMWASSER</a>
</li>
<li>
<a href="?s=4,14" onclick="return checkChanges(this);">ENERGIEMANAGEMENT</a>
</li>
<li>
<a href="?s=4,15" onclick="return checkChanges(this);">ISG</a>
</li>
</ul>
</div>
</div>
<div class="nav left defaultlast parent">
<div class="l left"> </div>
<div class="c left link6">
<a>Profil</a>
</div>
<div class="r left"> </div>
<div class="clear"></div>
<div class="second">
<ul class="second last">
<li>
<a href="?s=5,0" onclick="return checkChanges(this);">Netzwerk</a>
</li>
<li>
<a href="?s=5,1" onclick="return checkChanges(this);">Sicherheit</a>
</li>
<li>
<a href="?s=5,2" onclick="return checkChanges(this);">Anlagenbild</a>
</li>
<li>
<a href="?s=5,3" onclick="return checkChanges(this);">SPRACHE</a>
</li>
</ul>
</div>
</div>
<div class="clear"></div>
</div>
<div class="span-24" id="sub_nav"><div class="left main sifr span-9" style="width: 45%">WÄRMEPUMPE</div>
<div class="span-15 last">
</div>
<div class="clear"></div></div>
<form action="#" id="werte" onsubmit="saveValues(this);return false;"><div id="content">
<div class="span-11 append-1" style="float:left"><table class="info"><tr><th class="round-top" colspan="2">PROZESSDATEN</th></tr> <tr class="even">
<td class="key">RÜCKLAUFTEMPERATUR</td>
<td class="value">32,7°C</td>
</tr>
<tr class="odd">
<td class="key">VORLAUFTEMPERATUR</td>
<td class="value">45,0°C</td>
</tr>
<tr class="even">
<td class="key">FROSTSCHUTZTEMPERATUR</td>
<td class="value">49,0°C</td>
</tr>
<tr class="odd">
<td class="key">AUSSENTEMPERATUR</td>
<td class="value">12,3°C</td>
</tr>
<tr class="even">
<td class="key">FORTLUFTTEMPERATUR</td>
<td class="value">7,6°C</td>
</tr>
<tr class="odd">
<td class="key">VERDAMPFERTEMPERATUR</td>
<td class="value">22,8°C</td>
</tr>
<tr class="even">
<td class="key">VERDICHTEREINTRITTSTEMPERATUR</td>
<td class="value">23,9°C</td>
</tr>
<tr class="odd">
<td class="key">ZWISCHENEINSPRITZUNGSTEMP</td>
<td class="value">42,5°C</td>
</tr>
<tr class="even">
<td class="key">HEISSGASTEMPERATUR</td>
<td class="value">73,0°C</td>
</tr>
<tr class="odd">
<td class="key">VERFLÜSSIGERTEMPERATUR</td>
<td class="value">38,5°C</td>
</tr>
<tr class="even">
<td class="key">ÖLSUMPFTEMPERATUR</td>
<td class="value">26,0°C</td>
</tr>
<tr class="odd">
<td class="key">DRUCK NIEDERDRUCK</td>
<td class="value">10,22bar</td>
</tr>
<tr class="even">
<td class="key">DRUCK MITTELDRUCK</td>
<td class="value">10,47bar</td>
</tr>
<tr class="odd">
<td class="key">DRUCK HOCHDRUCK</td>
<td class="value">21,38bar</td>
</tr>
<tr class="even">
<td class="key">WP WASSERVOLUMENSTROM</td>
<td class="value">0,0l/min</td>
</tr>
<tr class="odd">
<td class="key">SPANNUNG INVERTER</td>
<td class="value">431,0V</td>
</tr>
<tr class="even">
<td class="key">ISTDREHZAHL VERDICHTER</td>
<td class="value">0Hz</td>
</tr>
<tr class="odd">
<td class="key">SOLLDREHZAHL VERDICHTER</td>
<td class="value">0Hz</td>
</tr>
<tr class="even">
<td class="key">LÜFTERLEISTUNG REL</td>
<td class="value">0%</td>
</tr>
</table></div><div class="span-11 prepend-1" style="float:right"><table class="info"><tr><th class="round-top" colspan="2">WÄRMEMENGE</th></tr> <tr class="even">
<td class="key">VD HEIZEN TAG</td>
<td class="value">18,316KWh</td>
</tr>
<tr class="odd">
<td class="key">VD HEIZEN SUMME</td>
<td class="value">0,202MWh</td>
</tr>
<tr class="even">
<td class="key">VD WARMWASSER TAG</td>
<td class="value">13,685KWh</td>
</tr>
<tr class="odd">
<td class="key">VD WARMWASSER SUMME</td>
<td class="value">0,063MWh</td>
</tr>
<tr class="even">
<td class="key">NHZ HEIZEN SUMME</td>
<td class="value">0,000MWh</td>
</tr>
<tr class="odd">
<td class="key round-leftbottom">NHZ WARMWASSER SUMME</td>
<td class="value round-rightbottom">0,051MWh</td>
</tr>
</table></div><div class="span-11 prepend-1" style="float:right"><table class="info"><tr><th class="round-top" colspan="2">LEISTUNGSAUFNAHME</th></tr> <tr class="even">
<td class="key">VD HEIZEN TAG</td>
<td class="value">3,101KWh</td>
</tr>
<tr class="odd">
<td class="key">VD HEIZEN SUMME</td>
<td class="value">0,037MWh</td>
</tr>
<tr class="even">
<td class="key">VD WARMWASSER TAG</td>
<td class="value">3,970KWh</td>
</tr>
<tr class="odd">
<td class="key round-leftbottom">VD WARMWASSER SUMME</td>
<td class="value round-rightbottom">0,017MWh</td>
</tr>
</table></div><div class="span-11 prepend-1" style="float:right"><table class="info"><tr><th class="round-top" colspan="2">LAUFZEIT</th></tr> <tr class="even">
<td class="key">VD HEIZEN</td>
<td class="value">23h</td>
</tr>
<tr class="odd">
<td class="key">VD WARMWASSER</td>
<td class="value">8h</td>
</tr>
<tr class="even">
<td class="key">VD ABTAUEN</td>
<td class="value">0h</td>
</tr>
<tr class="odd">
<td class="key">NHZ 1</td>
<td class="value">0h</td>
</tr>
<tr class="even">
<td class="key">NHZ 2</td>
<td class="value">0h</td>
</tr>
<tr class="odd">
<td class="key">NHZ 1/2</td>
<td class="value">9h</td>
</tr>
<tr class="even">
<td class="key">ZEIT ABTAUEN</td>
<td class="value">0min</td>
</tr>
<tr class="odd">
<td class="key">STARTS ABTAUEN</td>
<td class="value">0</td>
</tr>
</table></div><div class="span-11 append-1" style="float:left"><table class="info"><tr><th class="round-top" colspan="2">STARTS</th></tr> <tr class="even">
<td class="key">VERDICHTER</td>
<td class="value">60</td>
</tr>
</table></div><div class="span-24"> </div>
</div> </form></div>
</div>
<div id="footer">
<!--[if IE]>
	<style type="text/css">
	#footer
{
		
		height:260px;
}
	#versionsNummer
	{
		position:relative;
		top:-33px;
	}
	</style>

     	<![endif]-->
<div class="span-24 last footer_middle curdef">
<div class="span-8 prepend-top" style="height:145px">
<div class="span-3">
<img src="./pics/ste_footer_website.png"/>
</div>
<div class="span-5 last">
<p>
				
          					Weitere Informationen zu unserem Produktprogramm und aktuelle Serviceangebote finden Sie unter					<a class="extern" href="http://www.stiebel-eltron.de" target="_blank">www.stiebel-eltron.de</a>
</p>
</div>
</div>
<div class="bordered span-1"></div>
<div class="span-6 prepend-top">
<div class="span-2">
<img src="./pics/footer_tel.png"/>
</div>
<div class="span-4 last">
<p>
					Unsere Service-Hotline erreichen Sie unter<br/><span class="big">05531 702-111</span>
</p>
</div>
</div>
<div class="bordered span-1"></div>
<div class="span-7 prepend-top last">
<p>
				Das Neueste rund um die Servicewelt				<br/><a class="extern" href="http://www.stiebel-eltron.de/erneuerbare-energien/kundenservice/servicewelt/isg/" target="_blank">servicewelt</a>
</p>
</div>
</div>
<div class="links span-23 prepend-top append-1 last footer_middle">
<div class="span-17">
<a class="intern" href="?forcepage=dsgvo" onclick="return checkChanges(this);">Datenschutz</a>
<a href="http://www.stiebel-eltron.de/de/info/impressum.html">Impressum</a>
       
      <p class="right" id="versionsNummer" style="margin-top:8px">v12.2.1</p>
</div>
<div class="copyright span-6 last curdef">
  		© STIEBEL ELTRON 2023  	</div>
</div>
</div>
</body>
</html>

Maybe there is someone who can help me with this issue. I would greatly appreciate your help :slight_smile:

To start with, your table has no <tbody> so remove that bit from the select.

Does that now work?

It’s a real shame people can’t be bothered to write decent, semantically-structured HTML. A sprinkling of relevant ids would have made that much easier.

Hi, I found this amazing HACS and wanted to continue with a project that I had parked for quite some time (since scrap didn’t allow for multiple values to be scraped).

I have to scrape a Wave Forecast website, and I get all values for the whole week right (even wind directions through the alt attribute of the logo) in a list (csv).

However, I don’t seem to find a way to properly integrate them with HA. It just creates a sensor with the random CSV value.
I’ve tried with different sensors, one sensor with several attributes, but nothing. This is my code:

- name: Wisuki scraper
  resource: https://wisuki.com/widget-summary?spot=1
  scan_interval: 43200
  sensor:
    - unique_id: wisuki_forecast
      name: Wisuki Forecast
      icon: mdi:waves
      select_list: "body > table > thead > tr > th" # Week day
      attributes:
        - name: Height
          select_list: "tbody > tr:nth-child(7) > td"
        - name: Period
          select_list: "tbody > tr:nth-child(8) > td"
        - name: Direction
          select_list: "body > table > tbody > tr:nth-child(6) > td > img"
          attribute: "alt"
        - name: Wind
          select_list: "tbody > tr:nth-child(3) > td"
        - name: Gust
          select_list: "tbody > tr:nth-child(4) > td"
        - name: Cardinality
          select_list: "body > table > tbody > tr:nth-child(2) > td > img"
          attribute: "alt"

Probably it’s just my lack of knowledge on how select_lists works, but I assume it was created to historical values for a specific sensor.

How could I make all these values be distributed within time in HA (basically that HA understands that they’re splitter in time)?
Or how is this functionality supposed to be used? Some use-case examples within Github’s documentation would be great.

image

You’ll have to make multiple sensors, or sensors with multiple attributes, to pull out the individual entries. It’s probably easiest to leave the scrape sensors as you have them and create template sensors. For example (assuming attribute names from your code rather than your screenshot):

template:
  - sensor:
      - name: Altura 1
        state: "{{ state_attr('wisuki_forecast', 'Height').split(',')[0] }}"
        unit_of_measurement: "m"
      - name: Altura 2
        state: "{{ state_attr('wisuki_forecast', 'Height').split(',')[1] }}"
        unit_of_measurement: "m"
      - name: Direccion 1
        state: "{{ state_attr('wisuki_forecast', 'Direction').split(',')[0] }}"
      - name: Direccion 2
        state: "{{ state_attr('wisuki_forecast', 'Direction').split(',')[1] }}"

An alternative is to turn your CSV strings into actual lists in the attributes:

      attributes:
        - name: Height
          select_list: "tbody > tr:nth-child(7) > td"
          value_template: "{{ value.split(',') }}"

which will give you a real list so you can do something like: state_attr('wisuki_forecast', 'Height')[2] to get the third tide height.

Hi @Troon,

Thanks for your quick reply. I have also tested to include them in different sensors, I guess I’ll have to do something like:

  • Sensor 1 (Height day 1) → value (e.g: 0.3m)
  • Sensor 2 (Period day 1) → value (e.g: 1)
  • Sensor 3 (Height day 2) → value (e.g: 0,5m)
  • etc…

I find this easy to play with, but my end idea is to be able to use a Card such as the weather one:

So I guess I’d have to create an entity through template sensors (like you mention) like the weather has:

However I’m not sure how they’ve created the “Pronostico (Forecast)” section in the Entity.
And also I see all those values for mins and max on next days (11.8 - 19.9 / 13.6 - 19 / etc), but in the device information I don’t see any of those values in any sensors:

Not sure how to play with my data to convert it to something similar that has the Wave Forecast (instead of temperature forecast), since I don’t even see the sensors that hold that data :sweat:

Another alternative:

template:
  - sensor:
      - name: Test
        state: "{{ now() }}"
        attributes:
          table: >
            {% set days = states('sensor.wisuki_forecast').split(',') %}
            {% set heights = state_attr('sensor.wisuki_forecast', 'Height').split(',') %}
            {% set directions = state_attr('sensor.wisuki_forecast', 'Direction').split(',') %}

            {% set ns = namespace(table=[]) %}
            {% for i in range(days|length) %}
              {% set ns.table = ns.table + {'day': days[i],
                                            'height': heights[i],
                                            'direction': directions[i]} %}
            {% endfor %}
            {{ ns.table }}

which should give a state with timestamp, and a list of dictionaries in the output like:

[ { 'day': 'Th',
    'height': '0.7',
    'direction': 'ENE' },
  { 'day': 'Fr',
    'height': '0.9',
    'direction': 'ENE' }, ... ]

Obviously, you can add all the other measurements as needed.

Wow thats a prompt reply! :pray:

I see all the different options we have, but I guess I should stick to mimic AccuWeather’s entity if I want to use its card.

I’ve been looking at how AccuWeather actually works to create the entity, and it seems to create an array with all the attributes in it (Day, Max temp, min temp, etc).
But then I guess it puts all data in different sensors, so I guess its easier to get all sensors separately.

As per what I can see, he has different sensors with “Temp day0”, “Temp day1”, etc, and then the statuses are directly the value, it does not use attributes.

If the idea is to always create separate sensors, I don’t get exactly why there is a select_list option.
At the end you’d need to define each sensors separately (but instead of using a CSS selector, a value_template for the value from the array), right?

I’ll take a look and run some tests and come back, thanks for the help!

Yes, just two different ways of doing the same thing. There are probably use cases where either way might be better.

I think I won’t be able to use the “Accuweather” card anyway. Although it has separate sensors for different things, I think I wasn’t seeing the info shown in the card in any of the sensors because on top of the sensors they create a different entity, not a sensor but a weather entity, which is not supported by multiscrape:

So I guess if there’s no workaround that, I’ll have to forget using that card.
Let’s setup first all sensors with the appropriate data :+1:, and then decide how to visualize it (or not, and just use automations)

1 Like

You can create a template weather entity referring to the sensors you scraped:

1 Like

Hi @danieldotnl,

Yes, that is an option I considered.
Also, I tried to use the Platinum Weather Card to directly map the values.

The issue is that these two options are both prepared for weather, and usually expect values like temperature (ºC), pressure, humidity, etc.

Its not set to map wave values (height, period, etc). At least I tried with the aforementioned card and it didn’t work.

For the moment I have all values in separate sensors, including some cool icon automations to indicate wind and wave direction, and I can write automations on top of. But I’ll have to re-think how to represent them in a Weather-like card.

I’ve been searching and I’m afraid I’d have to write my own custom card.

For anyone interested, here’s the code I finally used to scrape all forecast values of Wisuki:

- name: Wisuki scraper
  resource: https://wisuki.com/widget-summary?spot=2621
  scan_interval: 43200
  sensor:
    - unique_id: wisuki_waves
      name: Alibey
      icon: >-
          {% if is_state('binary_sensor.wisuki_waves_now', 'on') %}
            mdi:waves
          {% else %}
            mdi:wave
          {% endif %}
      value_template: "{{ iif(is_state('binary_sensor.wisuki_waves_now', 'on'), 'Go Surf!', 'Flat') }}"
    - unique_id: wisuki_wind_avg_0
      name: Viento
      icon: mdi:weather-windy
      select: "tbody > tr:nth-child(3) > td:nth-child(2)"
      state_class: measurement
      unit_of_measurement: kn
      device_class: wind_speed
    - unique_id: wisuki_wind_gust_0
      name: Racha
      icon: si:windicss
      select: "tbody > tr:nth-child(4) > td:nth-child(2)"
      state_class: measurement
      unit_of_measurement: kn
      device_class: wind_speed
    - unique_id: wisuki_wind_direction_0
      name: Cardinalidad
      icon: >-
        {% if value == 'N' %}
          mdi:arrow-down-thin
        {% elif value == 'NNE' %}
          mdi:arrow-bottom-left-thin
        {% elif value == 'ENE' %}
          mdi:arrow-bottom-left-thin
        {% elif value == 'E' %}
          mdi:arrow-left-thin
        {% elif value == 'ESE' %}
          mdi:arrow-top-left-thin
        {% elif value == 'SSE' %}
          mdi:arrow-top-left-thin
        {% elif value == 'S' %}
          mdi:arrow-up-thin
        {% elif value == 'SSO' %}
          mdi:arrow-top-right-thin
        {% elif value == 'OSO' %}
          mdi:arrow-top-right-thin
        {% elif value == 'O' %}
          mdi:arrow-right-thin
        {% elif value == 'ONO' %}
          mdi:arrow-bottom-right-thin
        {% elif value == 'NNO' %}
          mdi:arrow-bottom-right-thin
        {% else %}
          mdi:windsock
        {% endif %}
      select: "body > table > tbody > tr:nth-child(2) > td:nth-child(2) > img"
      attribute: "alt"
    - unique_id: wisuki_wave_height_0
      name: Altura
      icon: mdi:waves
      select: "tbody > tr:nth-child(7) > td:nth-child(2)"
      state_class: measurement
      unit_of_measurement: m
      device_class: distance
    - unique_id: wisuki_wave_period_0
      name: Periodo
      icon: mdi:waves-arrow-up
      select: "tbody > tr:nth-child(8) > td:nth-child(2)"
      state_class: measurement
      unit_of_measurement: s
      device_class: duration
    - unique_id: wisuki_wave_direction_0
      name: Dirección
      icon: >-
        {% if value == 'N' %}
          mdi:arrow-down
        {% elif value == 'NNE' %}
          mdi:arrow-bottom-left
        {% elif value == 'ENE' %}
          mdi:arrow-bottom-left
        {% elif value == 'E' %}
          mdi:arrow-left
        {% elif value == 'ESE' %}
          mdi:arrow-top-left
        {% elif value == 'SSE' %}
          mdi:arrow-top-left
        {% elif value == 'S' %}
          mdi:arrow-up
        {% elif value == 'SSO' %}
          mdi:arrow-top-right
        {% elif value == 'OSO' %}
          mdi:arrow-top-right
        {% elif value == 'O' %}
          mdi:arrow-right
        {% elif value == 'ONO' %}
          mdi:arrow-bottom-right
        {% elif value == 'NNO' %}
          mdi:arrow-bottom-right
        {% else %}
          mdi:windsock
        {% endif %}
      select: "body > table > tbody > tr:nth-child(6) > td:nth-child(2) > img"
      attribute: "alt"
    - unique_id: wisuki_wind_avg_1
      name: Viento 1d
      icon: mdi:weather-windy
      select: "tbody > tr:nth-child(3) > td:nth-child(3)"
      state_class: measurement
      unit_of_measurement: kn
      device_class: wind_speed
    - unique_id: wisuki_wind_gust_1
      name: Racha 1d
      icon: si:windicss
      select: "tbody > tr:nth-child(4) > td:nth-child(3)"
      state_class: measurement
      unit_of_measurement: kn
      device_class: wind_speed
    - unique_id: wisuki_wind_direction_1
      name: Cardinalidad 1d
      icon: >-
        {% if value == 'N' %}
          mdi:arrow-down-thin
        {% elif value == 'NNE' %}
          mdi:arrow-bottom-left-thin
        {% elif value == 'ENE' %}
          mdi:arrow-bottom-left-thin
        {% elif value == 'E' %}
          mdi:arrow-left-thin
        {% elif value == 'ESE' %}
          mdi:arrow-top-left-thin
        {% elif value == 'SSE' %}
          mdi:arrow-top-left-thin
        {% elif value == 'S' %}
          mdi:arrow-up-thin
        {% elif value == 'SSO' %}
          mdi:arrow-top-right-thin
        {% elif value == 'OSO' %}
          mdi:arrow-top-right-thin
        {% elif value == 'O' %}
          mdi:arrow-right-thin
        {% elif value == 'ONO' %}
          mdi:arrow-bottom-right-thin
        {% elif value == 'NNO' %}
          mdi:arrow-bottom-right-thin
        {% else %}
          mdi:windsock
        {% endif %}
      select: "body > table > tbody > tr:nth-child(2) > td:nth-child(3) > img"
      attribute: "alt"
    - unique_id: wisuki_wave_height_1
      name: Altura 1d
      icon: mdi:waves
      select: "tbody > tr:nth-child(7) > td:nth-child(3)"
      state_class: measurement
      unit_of_measurement: m
      device_class: distance
    - unique_id: wisuki_wave_period_1
      name: Periodo 1d
      icon: mdi:waves-arrow-up
      select: "tbody > tr:nth-child(8) > td:nth-child(3)"
      state_class: measurement
      unit_of_measurement: s
      device_class: duration
    - unique_id: wisuki_wave_direction_1
      name: Dirección 1d
      icon: >-
        {% if value == 'N' %}
          mdi:arrow-down
        {% elif value == 'NNE' %}
          mdi:arrow-bottom-left
        {% elif value == 'ENE' %}
          mdi:arrow-bottom-left
        {% elif value == 'E' %}
          mdi:arrow-left
        {% elif value == 'ESE' %}
          mdi:arrow-top-left
        {% elif value == 'SSE' %}
          mdi:arrow-top-left
        {% elif value == 'S' %}
          mdi:arrow-up
        {% elif value == 'SSO' %}
          mdi:arrow-top-right
        {% elif value == 'OSO' %}
          mdi:arrow-top-right
        {% elif value == 'O' %}
          mdi:arrow-right
        {% elif value == 'ONO' %}
          mdi:arrow-bottom-right
        {% elif value == 'NNO' %}
          mdi:arrow-bottom-right
        {% else %}
          mdi:windsock
        {% endif %}
      select: "body > table > tbody > tr:nth-child(6) > td:nth-child(3) > img"
      attribute: "alt"
    - unique_id: wisuki_wind_avg_2
      name: Viento 2d
      icon: mdi:weather-windy
      select: "tbody > tr:nth-child(3) > td:nth-child(4)"
      state_class: measurement
      unit_of_measurement: kn
      device_class: wind_speed
    - unique_id: wisuki_wind_gust_2
      name: Racha 2d
      icon: si:windicss
      select: "tbody > tr:nth-child(4) > td:nth-child(4)"
      state_class: measurement
      unit_of_measurement: kn
      device_class: wind_speed
    - unique_id: wisuki_wind_direction_2
      name: Cardinalidad 2d
      icon: >-
        {% if value == 'N' %}
          mdi:arrow-down-thin
        {% elif value == 'NNE' %}
          mdi:arrow-bottom-left-thin
        {% elif value == 'ENE' %}
          mdi:arrow-bottom-left-thin
        {% elif value == 'E' %}
          mdi:arrow-left-thin
        {% elif value == 'ESE' %}
          mdi:arrow-top-left-thin
        {% elif value == 'SSE' %}
          mdi:arrow-top-left-thin
        {% elif value == 'S' %}
          mdi:arrow-up-thin
        {% elif value == 'SSO' %}
          mdi:arrow-top-right-thin
        {% elif value == 'OSO' %}
          mdi:arrow-top-right-thin
        {% elif value == 'O' %}
          mdi:arrow-right-thin
        {% elif value == 'ONO' %}
          mdi:arrow-bottom-right-thin
        {% elif value == 'NNO' %}
          mdi:arrow-bottom-right-thin
        {% else %}
          mdi:windsock
        {% endif %}
      select: "body > table > tbody > tr:nth-child(2) > td:nth-child(4) > img"
      attribute: "alt"
    - unique_id: wisuki_wave_height_2
      name: Altura 2d
      icon: mdi:waves
      select: "tbody > tr:nth-child(7) > td:nth-child(4)"
      state_class: measurement
      unit_of_measurement: m
      device_class: distance
    - unique_id: wisuki_wave_period_2
      name: Periodo 2d
      icon: mdi:waves-arrow-up
      select: "tbody > tr:nth-child(8) > td:nth-child(4)"
      state_class: measurement
      unit_of_measurement: s
      device_class: duration
    - unique_id: wisuki_wave_direction_2
      name: Dirección 2d
      icon: >-
        {% if value == 'N' %}
          mdi:arrow-down
        {% elif value == 'NNE' %}
          mdi:arrow-bottom-left
        {% elif value == 'ENE' %}
          mdi:arrow-bottom-left
        {% elif value == 'E' %}
          mdi:arrow-left
        {% elif value == 'ESE' %}
          mdi:arrow-top-left
        {% elif value == 'SSE' %}
          mdi:arrow-top-left
        {% elif value == 'S' %}
          mdi:arrow-up
        {% elif value == 'SSO' %}
          mdi:arrow-top-right
        {% elif value == 'OSO' %}
          mdi:arrow-top-right
        {% elif value == 'O' %}
          mdi:arrow-right
        {% elif value == 'ONO' %}
          mdi:arrow-bottom-right
        {% elif value == 'NNO' %}
          mdi:arrow-bottom-right
        {% else %}
          mdi:windsock
        {% endif %}
      select: "body > table > tbody > tr:nth-child(6) > td:nth-child(4) > img"
      attribute: "alt"
    - unique_id: wisuki_wind_avg_3
      name: Viento 3d
      icon: mdi:weather-windy
      select: "tbody > tr:nth-child(3) > td:nth-child(5)"
      state_class: measurement
      unit_of_measurement: kn
      device_class: wind_speed
    - unique_id: wisuki_wind_gust_3
      name: Racha 3d
      icon: si:windicss
      select: "tbody > tr:nth-child(4) > td:nth-child(5)"
      state_class: measurement
      unit_of_measurement: kn
      device_class: wind_speed
    - unique_id: wisuki_wind_direction_3
      name: Cardinalidad 3d
      icon: >-
        {% if value == 'N' %}
          mdi:arrow-down-thin
        {% elif value == 'NNE' %}
          mdi:arrow-bottom-left-thin
        {% elif value == 'ENE' %}
          mdi:arrow-bottom-left-thin
        {% elif value == 'E' %}
          mdi:arrow-left-thin
        {% elif value == 'ESE' %}
          mdi:arrow-top-left-thin
        {% elif value == 'SSE' %}
          mdi:arrow-top-left-thin
        {% elif value == 'S' %}
          mdi:arrow-up-thin
        {% elif value == 'SSO' %}
          mdi:arrow-top-right-thin
        {% elif value == 'OSO' %}
          mdi:arrow-top-right-thin
        {% elif value == 'O' %}
          mdi:arrow-right-thin
        {% elif value == 'ONO' %}
          mdi:arrow-bottom-right-thin
        {% elif value == 'NNO' %}
          mdi:arrow-bottom-right-thin
        {% else %}
          mdi:windsock
        {% endif %}
      select: "body > table > tbody > tr:nth-child(2) > td:nth-child(5) > img"
      attribute: "alt"
    - unique_id: wisuki_wave_height_3
      name: Altura 3d
      icon: mdi:waves
      select: "tbody > tr:nth-child(7) > td:nth-child(5)"
      state_class: measurement
      unit_of_measurement: m
      device_class: distance
    - unique_id: wisuki_wave_period_3
      name: Periodo 3d
      icon: mdi:waves-arrow-up
      select: "tbody > tr:nth-child(8) > td:nth-child(5)"
      state_class: measurement
      unit_of_measurement: s
      device_class: duration
    - unique_id: wisuki_wave_direction_3
      name: Dirección 3d
      icon: >-
        {% if value == 'N' %}
          mdi:arrow-down
        {% elif value == 'NNE' %}
          mdi:arrow-bottom-left
        {% elif value == 'ENE' %}
          mdi:arrow-bottom-left
        {% elif value == 'E' %}
          mdi:arrow-left
        {% elif value == 'ESE' %}
          mdi:arrow-top-left
        {% elif value == 'SSE' %}
          mdi:arrow-top-left
        {% elif value == 'S' %}
          mdi:arrow-up
        {% elif value == 'SSO' %}
          mdi:arrow-top-right
        {% elif value == 'OSO' %}
          mdi:arrow-top-right
        {% elif value == 'O' %}
          mdi:arrow-right
        {% elif value == 'ONO' %}
          mdi:arrow-bottom-right
        {% elif value == 'NNO' %}
          mdi:arrow-bottom-right
        {% else %}
          mdi:windsock
        {% endif %}
      select: "body > table > tbody > tr:nth-child(6) > td:nth-child(5) > img"
      attribute: "alt"
    - unique_id: wisuki_wind_avg_4
      name: Viento 4d
      icon: mdi:weather-windy
      select: "tbody > tr:nth-child(3) > td:nth-child(6)"
      state_class: measurement
      unit_of_measurement: kn
      device_class: wind_speed
    - unique_id: wisuki_wind_gust_4
      name: Racha 4d
      icon: si:windicss
      select: "tbody > tr:nth-child(4) > td:nth-child(6)"
      state_class: measurement
      unit_of_measurement: kn
      device_class: wind_speed
    - unique_id: wisuki_wind_direction_4
      name: Cardinalidad 4d
      icon: >-
        {% if value == 'N' %}
          mdi:arrow-down-thin
        {% elif value == 'NNE' %}
          mdi:arrow-bottom-left-thin
        {% elif value == 'ENE' %}
          mdi:arrow-bottom-left-thin
        {% elif value == 'E' %}
          mdi:arrow-left-thin
        {% elif value == 'ESE' %}
          mdi:arrow-top-left-thin
        {% elif value == 'SSE' %}
          mdi:arrow-top-left-thin
        {% elif value == 'S' %}
          mdi:arrow-up-thin
        {% elif value == 'SSO' %}
          mdi:arrow-top-right-thin
        {% elif value == 'OSO' %}
          mdi:arrow-top-right-thin
        {% elif value == 'O' %}
          mdi:arrow-right-thin
        {% elif value == 'ONO' %}
          mdi:arrow-bottom-right-thin
        {% elif value == 'NNO' %}
          mdi:arrow-bottom-right-thin
        {% else %}
          mdi:windsock
        {% endif %}
      select: "body > table > tbody > tr:nth-child(2) > td:nth-child(6) > img"
      attribute: "alt"
    - unique_id: wisuki_wave_height_4
      name: Altura 4d
      icon: mdi:waves
      select: "tbody > tr:nth-child(7) > td:nth-child(6)"
      state_class: measurement
      unit_of_measurement: m
      device_class: distance
    - unique_id: wisuki_wave_period_4
      name: Periodo 4d
      icon: mdi:waves-arrow-up
      select: "tbody > tr:nth-child(8) > td:nth-child(6)"
      state_class: measurement
      unit_of_measurement: s
      device_class: duration
    - unique_id: wisuki_wave_direction_4
      name: Dirección 4d
      icon: >-
        {% if value == 'N' %}
          mdi:arrow-down
        {% elif value == 'NNE' %}
          mdi:arrow-bottom-left
        {% elif value == 'ENE' %}
          mdi:arrow-bottom-left
        {% elif value == 'E' %}
          mdi:arrow-left
        {% elif value == 'ESE' %}
          mdi:arrow-top-left
        {% elif value == 'SSE' %}
          mdi:arrow-top-left
        {% elif value == 'S' %}
          mdi:arrow-up
        {% elif value == 'SSO' %}
          mdi:arrow-top-right
        {% elif value == 'OSO' %}
          mdi:arrow-top-right
        {% elif value == 'O' %}
          mdi:arrow-right
        {% elif value == 'ONO' %}
          mdi:arrow-bottom-right
        {% elif value == 'NNO' %}
          mdi:arrow-bottom-right
        {% else %}
          mdi:windsock
        {% endif %}
      select: "body > table > tbody > tr:nth-child(6) > td:nth-child(6) > img"
      attribute: "alt"
    - unique_id: wisuki_wind_avg_5
      name: Viento 5d
      icon: mdi:weather-windy
      select: "tbody > tr:nth-child(3) > td:nth-child(7)"
      state_class: measurement
      unit_of_measurement: kn
      device_class: wind_speed
    - unique_id: wisuki_wind_gust_5
      name: Racha 5d
      icon: si:windicss
      select: "tbody > tr:nth-child(4) > td:nth-child(7)"
      state_class: measurement
      unit_of_measurement: kn
      device_class: wind_speed
    - unique_id: wisuki_wind_direction_5
      name: Cardinalidad 5d
      icon: >-
        {% if value == 'N' %}
          mdi:arrow-down-thin
        {% elif value == 'NNE' %}
          mdi:arrow-bottom-left-thin
        {% elif value == 'ENE' %}
          mdi:arrow-bottom-left-thin
        {% elif value == 'E' %}
          mdi:arrow-left-thin
        {% elif value == 'ESE' %}
          mdi:arrow-top-left-thin
        {% elif value == 'SSE' %}
          mdi:arrow-top-left-thin
        {% elif value == 'S' %}
          mdi:arrow-up-thin
        {% elif value == 'SSO' %}
          mdi:arrow-top-right-thin
        {% elif value == 'OSO' %}
          mdi:arrow-top-right-thin
        {% elif value == 'O' %}
          mdi:arrow-right-thin
        {% elif value == 'ONO' %}
          mdi:arrow-bottom-right-thin
        {% elif value == 'NNO' %}
          mdi:arrow-bottom-right-thin
        {% else %}
          mdi:windsock
        {% endif %}
      select: "body > table > tbody > tr:nth-child(2) > td:nth-child(7) > img"
      attribute: "alt"
    - unique_id: wisuki_wave_height_5
      name: Altura 5d
      icon: mdi:waves
      select: "tbody > tr:nth-child(7) > td:nth-child(7)"
      state_class: measurement
      unit_of_measurement: m
      device_class: distance
    - unique_id: wisuki_wave_period_5
      name: Periodo 5d
      icon: mdi:waves-arrow-up
      select: "tbody > tr:nth-child(8) > td:nth-child(7)"
      state_class: measurement
      unit_of_measurement: s
      device_class: duration
    - unique_id: wisuki_wave_direction_5
      name: Dirección 5d
      icon: >-
        {% if value == 'N' %}
          mdi:arrow-down
        {% elif value == 'NNE' %}
          mdi:arrow-bottom-left
        {% elif value == 'ENE' %}
          mdi:arrow-bottom-left
        {% elif value == 'E' %}
          mdi:arrow-left
        {% elif value == 'ESE' %}
          mdi:arrow-top-left
        {% elif value == 'SSE' %}
          mdi:arrow-top-left
        {% elif value == 'S' %}
          mdi:arrow-up
        {% elif value == 'SSO' %}
          mdi:arrow-top-right
        {% elif value == 'OSO' %}
          mdi:arrow-top-right
        {% elif value == 'O' %}
          mdi:arrow-right
        {% elif value == 'ONO' %}
          mdi:arrow-bottom-right
        {% elif value == 'NNO' %}
          mdi:arrow-bottom-right
        {% else %}
          mdi:windsock
        {% endif %}
      select: "body > table > tbody > tr:nth-child(6) > td:nth-child(7) > img"
      attribute: "alt"
    - unique_id: wisuki_wind_avg_6
      name: Viento 6d
      icon: mdi:weather-windy
      select: "tbody > tr:nth-child(3) > td:nth-child(8)"
      state_class: measurement
      unit_of_measurement: kn
      device_class: wind_speed
    - unique_id: wisuki_wind_gust_6
      name: Racha 6d
      icon: si:windicss
      select: "tbody > tr:nth-child(4) > td:nth-child(8)"
      state_class: measurement
      unit_of_measurement: kn
      device_class: wind_speed
    - unique_id: wisuki_wind_direction_6
      name: Cardinalidad 6d
      icon: >-
        {% if value == 'N' %}
          mdi:arrow-down-thin
        {% elif value == 'NNE' %}
          mdi:arrow-bottom-left-thin
        {% elif value == 'ENE' %}
          mdi:arrow-bottom-left-thin
        {% elif value == 'E' %}
          mdi:arrow-left-thin
        {% elif value == 'ESE' %}
          mdi:arrow-top-left-thin
        {% elif value == 'SSE' %}
          mdi:arrow-top-left-thin
        {% elif value == 'S' %}
          mdi:arrow-up-thin
        {% elif value == 'SSO' %}
          mdi:arrow-top-right-thin
        {% elif value == 'OSO' %}
          mdi:arrow-top-right-thin
        {% elif value == 'O' %}
          mdi:arrow-right-thin
        {% elif value == 'ONO' %}
          mdi:arrow-bottom-right-thin
        {% elif value == 'NNO' %}
          mdi:arrow-bottom-right-thin
        {% else %}
          mdi:windsock
        {% endif %}
      select: "body > table > tbody > tr:nth-child(2) > td:nth-child(8) > img"
      attribute: "alt"
    - unique_id: wisuki_wave_height_6
      name: Altura 6d
      icon: mdi:waves
      select: "tbody > tr:nth-child(7) > td:nth-child(8)"
      state_class: measurement
      unit_of_measurement: m
      device_class: distance
    - unique_id: wisuki_wave_period_6
      name: Periodo 6d
      icon: mdi:waves-arrow-up
      select: "tbody > tr:nth-child(8) > td:nth-child(8)"
      state_class: measurement
      unit_of_measurement: s
      device_class: duration
    - unique_id: wisuki_wave_direction_6
      name: Dirección 6d
      icon: >-
        {% if value == 'N' %}
          mdi:arrow-down
        {% elif value == 'NNE' %}
          mdi:arrow-bottom-left
        {% elif value == 'ENE' %}
          mdi:arrow-bottom-left
        {% elif value == 'E' %}
          mdi:arrow-left
        {% elif value == 'ESE' %}
          mdi:arrow-top-left
        {% elif value == 'SSE' %}
          mdi:arrow-top-left
        {% elif value == 'S' %}
          mdi:arrow-up
        {% elif value == 'SSO' %}
          mdi:arrow-top-right
        {% elif value == 'OSO' %}
          mdi:arrow-top-right
        {% elif value == 'O' %}
          mdi:arrow-right
        {% elif value == 'ONO' %}
          mdi:arrow-bottom-right
        {% elif value == 'NNO' %}
          mdi:arrow-bottom-right
        {% else %}
          mdi:windsock
        {% endif %}
      select: "body > table > tbody > tr:nth-child(6) > td:nth-child(8) > img"
      attribute: "alt"
    - unique_id: wisuki_wind_avg_7
      name: Viento 7d
      icon: mdi:weather-windy
      select: "tbody > tr:nth-child(3) > td:nth-child(9)"
      state_class: measurement
      unit_of_measurement: kn
      device_class: wind_speed
    - unique_id: wisuki_wind_gust_7
      name: Racha 7d
      icon: si:windicss
      select: "tbody > tr:nth-child(4) > td:nth-child(9)"
      state_class: measurement
      unit_of_measurement: kn
      device_class: wind_speed
    - unique_id: wisuki_wind_direction_7
      name: Cardinalidad 7d
      icon: >-
        {% if value == 'N' %}
          mdi:arrow-down-thin
        {% elif value == 'NNE' %}
          mdi:arrow-bottom-left-thin
        {% elif value == 'ENE' %}
          mdi:arrow-bottom-left-thin
        {% elif value == 'E' %}
          mdi:arrow-left-thin
        {% elif value == 'ESE' %}
          mdi:arrow-top-left-thin
        {% elif value == 'SSE' %}
          mdi:arrow-top-left-thin
        {% elif value == 'S' %}
          mdi:arrow-up-thin
        {% elif value == 'SSO' %}
          mdi:arrow-top-right-thin
        {% elif value == 'OSO' %}
          mdi:arrow-top-right-thin
        {% elif value == 'O' %}
          mdi:arrow-right-thin
        {% elif value == 'ONO' %}
          mdi:arrow-bottom-right-thin
        {% elif value == 'NNO' %}
          mdi:arrow-bottom-right-thin
        {% else %}
          mdi:windsock
        {% endif %}
      select: "body > table > tbody > tr:nth-child(2) > td:nth-child(9) > img"
      attribute: "alt"
    - unique_id: wisuki_wave_height_7
      name: Altura 7d
      icon: mdi:waves
      select: "tbody > tr:nth-child(7) > td:nth-child(9)"
      state_class: measurement
      unit_of_measurement: m
      device_class: distance
    - unique_id: wisuki_wave_period_7
      name: Periodo 7d
      icon: mdi:waves-arrow-up
      select: "tbody > tr:nth-child(8) > td:nth-child(9)"
      state_class: measurement
      unit_of_measurement: s
      device_class: duration
    - unique_id: wisuki_wave_direction_7
      name: Dirección 7d
      icon: >-
        {% if value == 'N' %}
          mdi:arrow-down
        {% elif value == 'NNE' %}
          mdi:arrow-bottom-left
        {% elif value == 'ENE' %}
          mdi:arrow-bottom-left
        {% elif value == 'E' %}
          mdi:arrow-left
        {% elif value == 'ESE' %}
          mdi:arrow-top-left
        {% elif value == 'SSE' %}
          mdi:arrow-top-left
        {% elif value == 'S' %}
          mdi:arrow-up
        {% elif value == 'SSO' %}
          mdi:arrow-top-right
        {% elif value == 'OSO' %}
          mdi:arrow-top-right
        {% elif value == 'O' %}
          mdi:arrow-right
        {% elif value == 'ONO' %}
          mdi:arrow-bottom-right
        {% elif value == 'NNO' %}
          mdi:arrow-bottom-right
        {% else %}
          mdi:windsock
        {% endif %}
      select: "body > table > tbody > tr:nth-child(6) > td:nth-child(9) > img"
      attribute: "alt"
  binary_sensor:
    - unique_id: wisuki_waves_now
      name: Surf
      value_template: >
        {% if states('sensor.wisuki_wave_heigth_0')|float(0) > 0.7 %}
          {{ "Go Surf!" }}
        {% else %}
          {{ "Flat" }}
        {% endif %}

Hey there!

Me again. I’ve been running for a week with the sensors, and although I still haven’t sorted a nice UI (just embedded some of the sensors to a Glance card temporary) I have been able to configure some cool automations with Telegram to alert when there is Surf forecast.

I have however some issues with multiscrape failing too much. Sensors are barely available, and if they’re not available when I want the automation to check, I miss it, so I am currently missing a lot of alerts.
To have an overview of availability, here’s an overview of last week (trying to refresh once an hour):

I’ve tried enabling the logs, but nothing useful in neither of them:

2023-05-25 21:24:48.414 ERROR (MainThread) [custom_components.multiscrape.coordinator] Wisuki scraper # Updating failed with exception: [Errno -3] Try again
2023-05-25 21:24:48.418 ERROR (MainThread) [custom_components.multiscrape.sensor] Wisuki scraper # Alibey # Unable to scrape data: Skipped scraping because data couldn't be updated
Consider using debug logging and log_response for further investigation.
2023-05-25 21:24:48.422 ERROR (MainThread) [custom_components.multiscrape.sensor] Wisuki scraper # Viento # Unable to scrape data: Skipped scraping because data couldn't be updated
Consider using debug logging and log_response for further investigation.
2023-05-25 21:24:48.426 ERROR (MainThread) [custom_components.multiscrape.sensor] Wisuki scraper # Racha # Unable to scrape data: Skipped scraping because data couldn't be updated
Consider using debug logging and log_response for further investigation.
2023-05-25 21:24:48.429 ERROR (MainThread) [custom_components.multiscrape.sensor] Wisuki scraper # Cardinalidad # Unable to scrape data: Skipped scraping because data couldn't be updated
Consider using debug logging and log_response for further investigation.
.... {"like this for every sensor"}

Where could this instability come from (pretty sure the website is stable, at least when I query it manually and I also have an iframe for that same website and its always available)? What could it be done?

I’ve thought it’d be interesting a config option within multiscrape to not change the state to unknown if value can’t be updated, but just do nothing (keep the old value).
WDYT @danieldotnl ?