update weather alert messaging
This commit is contained in:
parent
41811ef2c0
commit
538eaba37d
@ -30,10 +30,11 @@ var apiUrl = configuration["ApiUrl"];
|
|||||||
var gotifyUrl = configuration["GotifyUrl"];
|
var gotifyUrl = configuration["GotifyUrl"];
|
||||||
|
|
||||||
var weatherSet = await httpClient.GetFromJsonAsync<WeatherSet>(apiUrl);
|
var weatherSet = await httpClient.GetFromJsonAsync<WeatherSet>(apiUrl);
|
||||||
|
var todaysForecast = weatherSet.Forecast.FirstOrDefault().Summary;
|
||||||
|
|
||||||
var notificationResponse = await httpClient.PostAsJsonAsync(gotifyUrl, new
|
var notificationResponse = await httpClient.PostAsJsonAsync(gotifyUrl, new
|
||||||
{
|
{
|
||||||
title = "Weather Conditions",
|
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
|
priority = 5
|
||||||
});
|
});
|
Loading…
x
Reference in New Issue
Block a user