Weather forecast deprecated

Hi, I have a notification automation, that used to work and suddenly stopped. No idea why and cant get it to work. Help appreciated! Thanks

alias: "Notification: Weather morning if @ home"
description: Weather notification
trigger:
  - platform: time
    at: "06:15:00"
condition:
  - condition: or
    conditions:
      - condition: state
        entity_id: person.martyna
        state: home
      - condition: state
        entity_id: person.przemek
        state: home
    enabled: true
action:
  - service: notify.pe_phone
    data:
      title: Weather for my baby!
      message: >-
        Baby, it is {{state_attr('weather.home','temperature')}} C° now, the
        wind speed is {{state_attr('weather.home','wind_speed')}} km/h. The
        humidity is {{state_attr('weather.tomorrow_io_home_daily','humidity')}}
        %. It is {{ states('weather.home') }}. 

        Today, expect {{state_attr('weather.home', 'forecast')[0].temperature }}
        C° {{states('weather.home') }} with {%if state_attr('weather.home',
        'forecast').precipitation_type is none %}preciptation of {{
        state_attr('weather.home', 'forecast').precipitation_type }}{%else%}no
        precipitation{%endif%}.
      data:
        sticky: "true"
        notification_icon: mdi:weather-night-partly-cloudy
        color: green
  - service: notify.martyna_phone
    data:
      title: Weather for my baby!
      message: >-
        Baby, it is {{state_attr('weather.home','temperature')}} C° now, the
        wind speed is {{state_attr('weather.home','wind_speed')}} km/h. The
        humidity is {{state_attr('weather.tomorrow_io_home_daily','humidity')}}
        %. It is {{ states('weather.home') }}. 

        Today, expect {{state_attr('weather.home', 'forecast')[0].temperature }}
        C° {{states('weather.home') }} with {%if state_attr('weather.home',
        'forecast').precipitation_type is none %}preciptation of {{
        state_attr('weather.home', 'forecast').precipitation_type }}{%else%}no
        precipitation{%endif%}.
      data:

Did you migrate to the new weather.get_forecasts service?

1 Like

Your template references the forecast attribute of weather.home but that attribute has been eliminated from all Weather integrations. This was announced last September so that users could have several months to adapt to its eventual removal.

See the example linked in MaxK’s post.

2 Likes

All clear. Appreciated!