Weather.com (The Weather Channel) Custom Integration

That’s fantastic, thanks! I’m gonna switch my home forecast from Tomorrow.io over to this one.

Hi
I have a problem with API to your integration. I create account on wunderground.com and then generate API and still in toyr integration get INVALID API. Then i connect by free vpn to USA and again generate APi and the same problem. Please help me…

It looks like you opened an issue in GitHub, so let’s work on it there:

Just wanted to say both THANK YOU and also to note that you have one of the best set up sensors and names.
I hope if weather.com ever shut down the API keys they allow for a way to pay for one because I would be very willing to pay some kind of annual subscription ($10-$30 / yr range seems reasonable) to maintain access. I’ve been using a combination of the built-in weather + tomorrow.io + openweather and they all have various issues / incorrect information for my location.

1 Like

Hello, I’ve just updated to v1.1.0. How do I call the daily forecast now. It is not showing up in the developer tool like the previous version.
In the past, I was able to call

{{ state_attr('weather.my_weather', 'forecast')[0].precipitation }}

This is a change that’s being made within Home Assistant as part of the new weather entity types, which I migrated to in version 1.1.0. The old types will stop working in Home Assistant 2024.3 so I had to switch over to the new way of doing things or else this integration would stop working in about 5 months.

From my understanding the only way to do this now is to create triggered template sensors as described in this post. That will allow you to expose individual attributes (like precipitation) as their own sensors, which you can then use however you’d like.

ok. I just don’t understand these changes. For the weather, I was able to to write the code in my automation to call said forecast. Now I need to create individual sensors and than call that sensor in my automations?

Yes, you need to create individual sensors now and call them in your automations. For what it’s worth I don’t like this change either and I would prefer if all this data was still available as attributes, but this is what Home Assistant is doing. For now you can downgrade to version 1.0.8.1 of this integration to get the old behavior - the only difference between that version and 1.1.0 is this change to use the new type of weather entities. However you will need to upgrade to at least version 1.1.0 of this integration before you install Home Assistant 2024.3, or else the integration will stop working.

1 Like

Hehe. So in other words, make the changes before 2024.3 draws near. I think I have made all the changes (6 files) I needed.

If anyone is confused and need a working example, here is my 2 sensors. I’ve created a daily and hourly forecast. You just need to change the entity_id and name if mine is too basic :stuck_out_tongue:

Update: Works with version 2023.12+ Thanks to @ Taras

template:
# My Weather Entities Daily
  - trigger:
      - platform: state
        entity_id: weather.my_weather
    action:
      - service: weather.get_forecasts
        data:
          type: daily
        target:
          entity_id: weather.my_weather
        response_variable: daily
    sensor:
      - name: My Weather Forecast Daily
        icon: mdi:weather-cloudy
        state: "{{ daily['weather.my_weather'].forecast[0].condition }}"
        attributes:
          forecast: "{{ daily['weather.my_weather'].forecast }}"
          
# My Weather Entities Hourly
  - trigger:
      - platform: time_pattern
        hours: /1
    action:
      - service: weather.get_forecasts
        data:
          type: hourly
        target:
          entity_id: weather.my_weather
        response_variable: hourly
    sensor:
      - name: My Weather Forecast Hourly
        icon: mdi:weather-cloudy
        state: "{{ hourly['weather.my_weather'].forecast[0].condition }}"
        attributes:
          forecast: "{{ hourly['weather.my_weather'].forecast }}"
3 Likes

Hi. I downloaded the app version & notice there is an advisory warning. Is this sensor available??

Could it be possible to have the attributes in the language of the entire system?
I mean, for example the conditions are only in english… how to have them in italian?

Sorry, weather advisories and warnings are not available in the APIs that this integration uses :frowning:

Home Assistant requires the names of the attributes to be in English:

The weather state (such as “cloudy” or “sunny”) should be automatically translated into your language by Home Assistant.

FYI, for anyone who happens to use this integration along with AppDaemon (or any other HASS API-based tools), the new weather.get_forecast service does not yet work in the API: Weather `get_forecast` service returns 500 on 2023.9.0 · Issue #99820 · home-assistant/core · GitHub. As such, you cannot use the “new & improved” service-based calls in such tools.

There is a pull request to fix this, but it has not yet been approved. This appears to be an active area of development, so hopefully we’ll see it soon.

Until then, I’m using template entities in order to replicate the old forecast system based on @duceduc’s templates above.

I installed through HACS, but when I added the integration using the api key e1f10…25&a, I get this error:

Setup deletes the api key when generating the error. Any ideas about this error? Thanks.

I think you have inputted to many characters in your api key. It should end with ...96f525

1 Like

duceduc is correct - get rid of the ‘&a’ that you have at the end of the key and that should fix it.

Doh! and I know that ‘&a’ is the http separator. Thanks to you both!

For some unknown reason I could not find ‘Weather.com’ integration in list of available integrations, when I want to add it via Devices & Services → Add Integration.

HA is freshly installed (vm in proxmox):

  • Core 2024.1.5
  • Supervisor 2023.12.1
  • Operating System 11.4

Default weather integration was installed and then deleted in order to install this integration.

Dear @jaydeethree , can you point me what I am probably missing or doing wrong?

Thanks in advance!

I believe that you will need to install via HACS first.

1 Like