Environment Canada Hourly Forecast

I’m rebuilding my Home Assistant on new hardware and I can’t seem to get the hourly forecast.
If I drill down into the Forecast I can see the “Daily” and “Hourly” but I can’t seem to get weather.forecast_hourly enabled.

Was this killed post HA Ver. 2023.11.3?

Nevermind, Figure out that Hourly is selectable in the Weather Forecast card.

@rlongfield

Would you mind sharing your findings with me. A “Breaking Change” in 2024.04.01 removed the weather.forecast_hourly . I have a template that used that sensor. It’s no longer functioning because of the change. My template looks like this;

template:
  - trigger:
      {SENSORS OMITTED FOR CLARITY}
    sensor:
      - name: Weatherman Data
        state: "OK"
        attributes:
          weather_condition_now: >
            {% set cond_now = states('weather.stratford_hourly') %}
            {% if states('sun.sun') == 'below_horizon' %}
                {% if cond_now == 'sunny' %} night {% elif cond_now == 'partlycloudy' %} night-partly-cloudy {% else %} {{ cond_now }} {% endif %}
            {% else %}
                {{ cond_now }}
            {% endif %}
          weather_temperature_now: >
            {{ state_attr('weather.stratford', 'temperature') | float(0.0) }}

          weather_condition_0: >
            {% set cond0 = state_attr('weather.stratford_hourly', 'forecast')[0].condition %}
            {% set next_setting = as_timestamp(state_attr('sun.sun', 'next_setting')) %}
            {% set next_rising = as_timestamp(state_attr('sun.sun', 'next_rising')) %}
            {% set cond0_time = as_timestamp(state_attr('weather.stratford_hourly', 'forecast')[0].datetime) %}
            {% if cond0_time < next_rising and next_rising < next_setting %}
                {% if cond0 == 'sunny' %} night {% elif cond0 == 'partlycloudy' %} night-partly-cloudy {% else %} {{ cond0 }} {% endif %}
            {% else %}
                {{ cond0 }}
            {% endif %}

Thanks

The only place I found it was in the Weather Card. I stopped trying to figure out where (or how to get) the weather.*_hourly went

The hourly has broken for me too with the latest HA.
I noticed the hourly is still found in the weather sensor, it is just not available on my dashboard.


I notice it is mentioned in the Backward incompatible changes, but it doesn’t say how to utilize the hourly forecast now.

Found this.

The Get Forecast service works, just need to figure out how to get this into a template then dashboard.

service: weather.get_forecasts
target:
  entity_id: weather.kitchener_waterloo
data:
  type: hourly

Here is one example ( Ive done 1 for each day/hour i need in UI ) so i don’t have all i.e 24 hours

# Trigger 0 Hourly
  - trigger:
      - platform: state
        entity_id: weather.forecast_home
    action:
      - service: weather.get_forecasts
        data:
          type: hourly
        target:
          entity_id: weather.forecast_home
        response_variable: hourly
    sensor:
      - name: weather-0
        availability: "true"
        unique_id: weather_0
        state: "{{ hourly['weather.forecast_home'].forecast[0].temperature }}"
        unit_of_measurement: °C
        attributes:
          weather_datetime: "{{ hourly['weather.forecast_home'].forecast[0].datetime }}"
          weather_condition: "{{ hourly['weather.forecast_home'].forecast[0].condition }}"
          weather_temp: "{{ hourly['weather.forecast_home'].forecast[0].temperature }}"
          weather_humid: "{{ hourly['weather.forecast_home'].forecast[0].humidity }}"
          weather_wind_bearing: "{{ hourly['weather.forecast_home'].forecast[0].wind_bearing }}"
          weather_wind_speed: "{{ hourly['weather.forecast_home'].forecast[0].wind_speed }}"
          weather_wind_gust: "{{ hourly['weather.forecast_home'].forecast[0].wind_gust_speed }}"
          weather_precipitationt: "{{ hourly['weather.forecast_home'].forecast[0].precipitation }}"

Below is another with i.e all_attr(in 1) + 5 days-attr in 1 sensor ( This can be adapted to hourly, by changing the type/response_variable, like above )

ApexCharts card - A highly customizable graph card - #3454 by Mariusthvdb.

Edit: The reason i choosed 1 for each hour/day, is because i Changed my Weather-overview to Custom:button-cards

1 Like

I’m glad my use of hourly forecast was covered by the existing weather card. This change doesn’t feel like an improvement.

So after trying to create an hourly trigger template I realized all I had to do was update my dashboard so that the hourly entity was changed to my standard weather entity and my hourly forecast showed up.

Hello, mine doesn’t the hourly on the dashboard, how did you exactly updated your dashboard? I am using custom:Weather_card. Thanks

Just use the primary weather entity that is created as the standard entity.
Make sure forecast_type is hourly or daily, and make sure show_forecast is true.

show_current: true
show_forecast: true
type: weather-forecast
entity: weather.kitchener_waterloo
forecast_type: hourly

1 Like

Thank you, doesn’t work for me, I am using Weather-Card with animated icons, not the weather-forecast. It seems the custom:weather-card that needs an update. Will play with it later this week. Thanks again

I use both.

          - type: custom:weather-card
            entity: weather.kitchener_waterloo
            name: K-W
          - type: weather-forecast
            show_current: false
            show_forecast: true
            entity: weather.kitchener_waterloo
            forecast_type: hourly
          - type: weather-forecast
            show_current: false
            show_forecast: true
            entity: weather.kitchener_waterloo
            forecast_type: daily