Rain radar integrations

I also use this weather radar card, available via HACS. It works nicely.

https://github.com/Makin-Things/weather-radar-card

Thank you both.
It is working. :slight_smile:
Do you know if default “playing time” is configurable? It seems to be 60 minutes.

Look for something in the URL that says radarRange=-1, which would be 1 hour. You can change it to - 6 or -12, perhaps more. Give it a try.

Thanks but changing to higher values is not reflected in playing time.

Did you refresh your browser cache when you changed it?

I guess I did.
I’m afraid 6-hour and 12-hour loops may be available to premium users only.

Many browsers will reload if you use the <ctl><F5> key combination.

If you see this at the bottom right, the three options are available:

image

Yes, 6h and 12h options are available but clicking them brings up subscription window.

The yearly Premium subscription on windy is like 20 EUR (less actually, but I cannot remember how much). I signed up, because it adds the long term forecast, and the 1 hour steps in forecast as well.
If you do sign up, go to the Community forum and ask about their API for home automation use.

They currently don’t have any for this kind of purposes, and would be nice to add it to HA if they would develop it.

If you want to get fancy you can use the config-template-card with a device tracker entity that contains lat/long coordinates and use that within the windy url to have weather based on your location:

type: custom:config-template-card
entities:
  - sensor.pixel_6_pro_geocoded_location
card:
  type: custom:hui-iframe-card
  title: null
  url: >-
    ${'https://embed.windy.com/embed2.html?lat='+states['sensor.pixel_6_pro_geocoded_location'].attributes.location[0]+'&lon='+states['sensor.pixel_6_pro_geocoded_location'].attributes.location[1]+'&detailLat='+states['sensor.pixel_6_pro_geocoded_location'].attributes.location[0]+'&detailLon='+states['sensor.pixel_6_pro_geocoded_location'].attributes.location[1]+'&width=650&height=450&zoom=6&level=surface&overlay=rain&product=ecmwf&menu=&message=true&marker=true&calendar=now&pressure=true&type=map&location=coordinates&detail=&metricWind=mph&metricTemp=%C2%B0F&radarRange=-1'}
  aspect_ratio: 135%
3 Likes

That is really fancy! Thanks for sharing!

1 Like

If you want to get fancy you can use the config-template-card with a device tracker entity that contains lat/long coordinates and use that within the windy url to have weather based on your location

I get this error:

“Custom element doesn’t exist: config-template-card.”

I understand I first need to create config-template-card. Right? How to do that?

You would need to install config-template-card from GitHub - iantrich/config-template-card: 📝 Templatable Lovelace Configurations via HACS or manually then the config I posted should work. My apologies for not clarifying in my original post.

Thanks. I have only recently installed HACS so I’m not proficient in it.
How do I install config-template-card using HACS?
Should I do it through “Add repository”? What do I put in the search box?

Strange. It works for me and I have no subscription. That said, it geolocates to my IP address.

Search config-template.

config-template does not find anything.
Is there something wrong with mu HACS installation?
“config” finds 7 items.

Well…maybe.

image

I couldn’t get your card to work. After some research, the custom:hui-iframe-card no longer exists, you have to replace it with custom:hui-element and define the card type iFrame.

type: custom:config-template-card
entities:
  - sensor.iphone_de_michel_geocoded_location
card:
  type: custom:hui-element
  card_type: iframe
  title: null
  url: >-
    ${'https://embed.windy.com/embed2.html?lat='+states['sensor.iphone_de_michel_geocoded_location'].attributes.Location[0]+'&lon='+states['sensor.iphone_de_michel_geocoded_location'].attributes.Location[1]+'&detailLat='+states['sensor.iphone_de_michel_geocoded_location'].attributes.Location[0]+'&detailLon='+states['sensor.iphone_de_michel_geocoded_location'].attributes.Location[1]+'&width=650&height=450&zoom=6&level=surface&overlay=rain&product=ecmwf&menu=&message=true&marker=true&calendar=now&pressure=true&type=map&location=coordinates&detail=&metricWind=mph&metricTemp=%C2%B0F&radarRange=-1'}
  aspect_ratio: 135%
1 Like

With thanks to @afxefx for the inspiration, I took the following as a challenge to myself.

Edit: Updated YAML to display radar and lightning. The animation covers a 6-hr period.
Edit 2: I was successful in getting it to work with the Manual UI card. YAML has been updated with appropriate indenting.
Edit 3: Removed unnecessary YAML content.

Make sure the config-template-card is properly configured. When you download it with HACS, the resource file will be in directory /config/www/community/config-template-card, and the file should be referenced to look for the resource file at URL: /hacsfiles/config-template-card/config-template-card.js. If the resource for the config-template-card can’t be found, it’s likely the resource file isn’t properly configured.

If you have problems, look here for tips: https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins

The rest should be easy if you have an iPhone (For an Andoroid, look at Rain radar integrations - #17 by afxefx for YAML guidance). This following is what works for me (I used the default iPhone entity and attributes), but it can be tweaked if you’re willing to experiment.

type: custom:config-template-card
entities:
  - states['device_tracker.iphone']
card:
  type: iframe
  title: Windy Radar
  url: >-
    ${'https://embed.windy.com/embed2.html?lat='+states['device_tracker.iphone'].attributes.latitude+'&lon='+states['device_tracker.iphone'].attributes.longitude+'&zoom=5&level=surface&overlay=radar&menu=&message=true&marker=&calendar=&pressure=&type=map&location=coordinates&detail=&detailLat='+states['device_tracker.iphone'].attributes.latitude+'&detailLon='+states['device_tracker.iphone'].attributes.longitude+'&metricWind=mph&metricTemp=%C2%B0F&radarRange=-6'}
  aspect_ratio: 135%

The aspect_ratio can be changed per your preference.

4 Likes