Isn’t it nice to be able to get tomorrow’s weather forecast on your mobile every night? This is very simple automation, which takes you 2 minutes to set up in Home Assistant.

To find out what tomorrow’s weather forecast will be, we will use the yr.no integration. This is standard in Home Assistant. The entity is called weather.home, and contains data for the weather right now and the days ahead.

To retrieve the information in weather.home, we need to read the attributes of this entity. We do this by using “state_attr” in our automation. Here we read both “condition” and “temperature” to send this to the mobile phone using the Notify service.

If we use the following code in the message:
Tomorrow’s weather forecast {{state_attr (“weather.home”, “forecast”) [0] .condition}}. It will be around {{state_attr (“weather.home”, “forecast”) [0] .temperature}} degrees during the day.
Then we get tomorrow’s weather and tomorrow’s temperature in the message.

The trigger for this automation is “Time”. For example. then you can set it to run every night at 21:00.

The entire code for this automation will then be

alias: Weather forecast tomorrow
description: Send tomorrow's weather forecast for everyone
trigger:
   - platform: time
     at: '21: 00 '
condition: []
action:
   - service: notify.notify
     data:
       title: Good evening
       message:> -
         Tomorrow's weather forecast is {{state_attr ("weather.home", "forecast")
         [0] .condition}}. It's going to be around {{state_attr ("weather.home"),
         "forecast") [0] .temperature}} ° C during the day.
mode: single


Some of the links in this article are "affiliate links", a link with a special tracking code. This means if you click on an affiliate link and purchase the item, we will receive an affiliate commission. The price of the item is the same whether it is an affiliate link or not. Regardless, we only recommend products or services we believe will add value to our readers. By using the affiliate links, you are helping support our Website, and we genuinely appreciate your support.

By Lars

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.