update weather alert messaging

This commit is contained in:
Ryan Peters 2023-06-02 16:47:47 -04:00
parent 41811ef2c0
commit 538eaba37d

View File

@ -30,10 +30,11 @@ var apiUrl = configuration["ApiUrl"];
var gotifyUrl = configuration["GotifyUrl"];
var weatherSet = await httpClient.GetFromJsonAsync<WeatherSet>(apiUrl);
var todaysForecast = weatherSet.Forecast.FirstOrDefault().Summary;
var notificationResponse = await httpClient.PostAsJsonAsync(gotifyUrl, new
{
title = "Weather Conditions",
message = $"{weatherSet.Current.ConditionName} and {weatherSet.Current.Temperature} degrees",
message = $"Today will be {todaysForecast.ConditionName} a high of {todaysForecast.HighTemp} and a low of {todaysForecast.LowTemp}. Currently, it is {weatherSet.Current.ConditionName} and {weatherSet.Current.Temperature} degrees.",
priority = 5
});