rule"Weather forecast for tomorrow"whenTimecron"0 30 17 * * ?"thenvarweather_forecast="Weather tomorrow 6am: "+String::format("%1$1d",(homef12Temperature.stateasNumber).intValue)+" °C"weather_forecast=weather_forecast+", Humidity: "+homef12Humidity.state.toStringweather_forecast=weather_forecast+", Cloudiness: "+homef12Cloudiness.state.toStringweather_forecast=weather_forecast+", "+homef12Condition.state.toStringvarrain_value=homef12RainVolume.state.toString.split(' ').get(0)varrain_value_rounded=Math::round(Float::parseFloat(rain_value))varrain_unit=homef12RainVolume.state.toString.split(' ').get(1)if(rain_value_rounded>0){weather_forecast=weather_forecast+", Rain: "+rain_value_rounded.toString+" "+rain_unit}varsnow_value=homef012SnowVolume.state.toString.split(' ').get(0)varsnow_value_rounded=Math::round(Float::parseFloat(snow_value))varsnow_unit=homef012SnowVolume.state.toString.split(' ').get(1)if(snow_value_rounded>0){weather_forecast=weather_forecast+", Snow: "+snow_value_rounded.toString+" "+snow_unit}logInfo("Weather forecast",weather_forecast)// send notification with the content of $weather_forecastend
This rule is fired at 17:30 in the afternoon, uses the weather forecast data for 12 hours in the future, and creates a string which can be send using your favorite method.