Updated Animated Radar Map Forecast Card

Credit where due: I started with @jpenyc’s “Add an active Weather Radar Map” post back from 2016. I optimized a few of the steps, added a few pretty extras, and am sharing my own remix.

Repo: https://github.com/bundito/radar-forecast

radar-forecast

The directions for setting it up are pretty simple, except for getting the link to the animated radar image. The other parameters are just setting a few Dark Sky sensors to display the high and low temperatures. It’s all documented on my repo at https://github.com/bundito/radar-forecast

Ironically, the ORD (Chicago O’Hare) radar I have displayed is currently down for maintenance. :open_mouth:

The maps come from Weather Underground, which is primarily US-based. The process for another country’s map should be similar… I’ll try to detail that in a bit.

Please enjoy and share any comments or suggestions.

1 Like

Just installed this and it’s working good so far.

I’ll let you know more when I actually get some weather to animate. :smiley:

Looks like your component is broken in the latest release of HA (0.83.2).

When I visit a view that contains your component I just get a blank screen and have this in the log:

2018-12-01 15:47:42 ERROR (MainThread) [frontend.js.latest.201811211] http://192.168.1.11:8123/local/lovelace/radar-forecast.js?v=1:24:57 Uncaught TypeError: Cannot read property 'state' of undefined
2018-12-01 15:47:57 ERROR (MainThread) [frontend.js.latest.201811211] http://192.168.1.11:8123/local/lovelace/radar-forecast.js?v=1:24:57 Uncaught TypeError: Cannot read property 'state' of undefined

Hm. I’ve had some home network issues and haven’t worked with HA for the past day or two.

I assume it worked for you before the latest update? Do you have all the right Dark Sky sensors chosen in your config file? That’s what usually causes that error - trying to get the state of a sensor that’s not been imported.

I’ve still got more home LAN work to do, but I’ll look at it tonight.

I ran the update, and yeah, definitely broken now. Sigh.

I’ll try to figure out why and get a revised component posted. Now where is the 0.83.1 changelog…

1 Like

Okay, I’ve gotten it fixed. I’ll be posting the revised version to my repo (https://github.com/bundito/radar-forecast) momentarily. I’ll also be revising the README with a few small changes.

The biggest change you have to make right now is this: in your sensors department (whether it’s in configuration.yaml or sensors.yaml), make sure your Dark Sky sensor is configured with this addition:

- platform: darksky
  api_key:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  forecast:
    - 0     <-------------
    - 1
    - 2
    - 3
    - 4
    - 5

Day “0” means “today” in the latest revision of HA (83.1). They renamed some of the other variables likewise.

In your ui-lovelace.yaml configuration, make the following changes:

 - type: custom:radar-forecast
   image: https://bit.ly/2FNnlTT
   title: Current ORD Forecast
   forecast: sensor.dark_sky_daily_summary
   high:  sensor.dark_sky_daytime_high_temperature_0    <---------
   low: sensor.dark_sky_overnight_low_temperature_0     <---------
   summary: sensor.dark_sky_summary
   units: F

The high and low temperatures now need the _0 tacked on at the end. This will eliminate the cannot read state of 'unknown' errors that were blanking out your page.

Thanks for your patience. I hope you re-enable the card and continue enjoying it. Right now, mine is showing snow flurries. Yay.

1 Like

Awesome!

made the required changes and my radar card works again.

Thanks! :smiley:

Update for anyone using this card:

Due to PR #21820, there was a breaking change to the Dark Sky sensors. The docs have been updated, but the gist of it is that “_0” at the end of the sensors have become “_0d”. Be sure to change them.