Hi everyone, i’m trying to implement Wunderground into my HomeAssistant istance and i’m trying with multiscrape, since i do not have a weather station (and so i can’t get a wunderground’s API).
I have no problem with temperature and humidity, but i can’t retrieve datas such as wind, gust, rain and total rain.
(Note: since i’m in Europe i need to convert them from in to mm, if that may help)
I tried with this setup (to avoid having “unknown” when it is 0 on wunderground) and it does not work:
#--- PIOGGIA GIORNALIERA ---
- unique_id: pioggia_oggi
name: Pioggia Oggi
select: "#main-page-content > div > div > div > div:nth-child(2) > div > lib-tile-current-conditions > div > div.module__body > div > div.weather__summary > div:nth-child(5) > div > div.weather__text > lib-display-unit > span > span.wu-value.wu-value-to"
value_template: >
{% if (value | float) == 0,00 %}
0
{% else %}
{{ ((value | float) * (25,4) ) | round(2) }}
{% endif %}
unit_of_measurement: mm
So i tried with a classic scrape sensor and less template but still (even if on the website it is actually at 0.33in) it shows 0mm:
#--- PIOGGIA GIORNALIERA ---
- platform: scrape
name: Pioggia Oggi
resource: https://www.wunderground.com/dashboard/pws/ILEGNA6?cm_ven=localwx_pwsdash
select: "#main-page-content > div > div > div > div:nth-child(2) > div > lib-tile-current-conditions > div > div.module__body > div > div.weather__summary > div:nth-child(5) > div > div.weather__text > lib-display-unit > span > span.wu-value.wu-value-to"
value_template: "{{ ((value | float) * (25,4) ) | round(2) }}"
unit_of_measurement: mm
Any ideas on how to solve?
Plus: is the template correct to show 0 when “unknown” and the value on other occasions?
Thanks in advance