Weather.com (The Weather Channel) Custom Integration

Thanks for pointing out! I’m completely new to HomeAssistant and initially thout that HACS == HA :sweat_smile:

Installed HACS and then installed this integration, seems to work fine except few missing translations for UA.

Now I need to figure out how to display it more pretty on dashboard. Another google-dive then.

Thanks once more and forgive me for asking such a dumb things)

Like TxHarleyDude said, this is only available in HACS which is not available by default in HA. Once you get HACS set up though it should be pretty quick and easy to install this :slight_smile:

Feel free to send a PR to update the translations!

Hhhhhmmmm…I keep getting “invalid API key” when using the key from wunderground page source view. Not sure what is wrong?

UPDATE
Okay seems to be multiple API keys, I need to use the very 1st one, working now.

I noticed on the Github page it says:

Forecast (daily and hourly):

Date/time of forecast
Temperature (high)
Temperature (low)
Condition (icon)
Precipitation quantity
Precipitation probability
Wind speed
Wind bearing (cardinal direction)

I’m mainly interested in the precipitation forecast however I can’t find these entities or information anywhere. Is it possible to get these?

Forecast data is part of the weather.LOCATION_NAME entity. You can get the forecast data by calling the weather.get_forecasts service - more info is available here:

Is it possible to get the hourly UV index prediction? Trying to figure out how to access it as it’s available on weather.com. thanks.
P.S. I really hope weather.com realize they can make money off this and start selling API keys to non enterprise clients. I’m fairly certain as this integration becomes more popular (and as HA itself gets more popular) this API key will eventually be shut down. Cannot imagine them letting thousands (probably tens of thousands soon) of IPs using this constantly. And sometimes at these big companies setting up the process of letting retail buy APIs may be too much overhead for them to bother and instead they’ll just shut it down and say to go buy their mobile apps if we want access, completely ignoring the HA use case. :grimacing::grimacing::grimacing:

Is it possible to get the hourly UV index prediction?

That’s already included in the data:

You can extract the UV index (and anything else that you’re interested in) with the weather.get_forecasts service - see the Home Assistant weather docs for more info.

I’m fairly certain as this integration becomes more popular (and as HA itself gets more popular) this API key will eventually be shut down

Keep in mind that the API key in the GitHub instructions is used by Weather.com themselves - when you visit wunderground.com (one of the sites they own) your browser will make requests to their API using that same API key:

So while it’s certainly possible for them to block the current API key and switch to a new one, we would be able to capture that new key just as easily. It’s also worth noting that I’ve been personally using this API key for over a year without any problems, and if you put the API key into your favorite search engine you’ll find discussions about it going back to 2021. So yes, they absolutely can block/change the key, but this key has been public knowledge for years already and they haven’t done anything yet.

1 Like

Ah thanks. Then the hourly UV index must just be unused by the card I’m using (weather chart card).
Any recommendations for a good visualizing card for weather? I did pretty deep research and settled on the chart one but open to suggestions :pray:t2:.
Good to hear about it h API key

Any recommendations for a good visualizing card for weather?

I’m still using Platinum Weather Card but I can’t recommend it because it’s an abandoned project and it has a lot of bugs with current versions of Home Assistant. There are some forks of it that look promising but I haven’t tried any of them yet - maybe give one of those a try?

Thanks ya I dismissed that one for the same reason. It’s dead. I almost feel ill have to write my own if I want the perfect one :grimacing:

@jaydeethree is there a way to get forecast wind_gust too?

No, unfortunately the Weather.com API that I’m using does not provide wind_gust data for the forecast.

Thank you, @jaydeethree. This is the most accurate weather integration for me.
However, is it possible to get more hourly forecasts for up to 7 days?

Currently this is not possible because the API only provides 2 days of hourly forecast data. However I looked at the API documentation and saw that there is an endpoint I can switch to that provides 15 days of forecast data (both daily and hourly data). I should have time to do some testing with that in the next 1-2 weeks, and if this API endpoint works properly then I’ll release a new version that includes 15 days of forecast data.

@jaydeethree Thanks for such a wonderful integration! I have been looking around for a good weather data service and came across this.

I was looking at the API docs listed in the Google docs link and wondering if Air Quality and Pollen sensors are on your radar to expose via the integration?

I just released a new version that provides 15 days of forecast data (this is for both daily and hourly forecasts). Thanks for the suggestion!

Getting that data would require the integration to make additional API calls, and I’m trying to minimize the number of API calls since this is not supposed to be a public API. My hope is that if I keep the number of requests reasonable then IBM/Weather.com won’t shut this down. So no, I am not planning to add those sensors to this integration.

2 Likes

Wow so fast! I can’t thank you enough. Your contributions to the community are truly outstanding!

im a bit confused, the docs say: GitHub - jaydeethree/Home-Assistant-weatherdotcom: Home Assistant custom component/integration for Weather.com

To access these values in automations, scripts, etc. you will need to create triggered template sensors for them. This post on the Home Assistant forums provides details about how to do that.

example:

template:
  - trigger:
      - platform: state
        entity_id: weather.whatever
    action:
      - service: weather.get_forecast
        data: etc...

why does that need to be done if the integration is already calling the service and getting the data for itself?

That’s just how Home Assistant works. The integration does get the data for itself, but if you want to use that data in automations/scripts then you need to create additional sensors to expose the data - Home Assistant does not allow automations/scripts to access the data directly.

2 Likes

I am considering migrating from a different automation system and am starting testing with Weather Forecasts, and found this thread/integration.

Do you mind if I ask a ‘help-desky’ question as my first post? I’ve put a few hours into getting this going. The paradigm is different.

I have this service installed and working, with the default 23 sensors all showing up as ‘sensor.x_x’ entities on two locations.

I see that that @duceduc posted a template that does gets forecast data that I think creates sensors that not exposed as part of the entity [probably have terminology wrong].

I tried adding this template through the UI, but that doesn’t seem possible, so I added it to configuration.yaml, but I’m not sure I know how to determine if it is working. It doesn’t show up under helpers or entities so I’m not sure where to see that it exists or is doing what it is supposed to do.

I do see a temperature forecast under ‘weather.home’ and ‘weather.camper’ when I click on the entity but I can’t seem to find where I would access the weather condition for a few days ahead?

Thanks for any tips, and kudos to the author for the nice integration (will buy you a beer or coffee when I have a moment).