Hi team,
I'm wanting to return current weather conditions to a page on my app, starting simple such as the current temperature.
I have found the free MSN Weather connector, however this appears to require manual entry of a location to return weather details. I'm wondering if anyone has any ideas how I would be able to use the inbuilt location functions of PowerApps to have the MSN weather connector return the temperature at the location of where the user device is?
Thanks in advance!
Hi @Marty_Dub ,
I can give you what a use for the weather today and tomorrow at a location - first set a Variable (after connecting MSN Weather
UpdateContext(
{
varWeatherToday: MSNWeather.TodaysForecast(
Location.Latitude & "," & Location.Longitude,
"Metric"
).responses,
varWeatherTomorrow: MSNWeather.TomorrowsForecast(
Location.Latitude & "," & Location.Longitude,
"Metric"
).responses,
varWeather:true
}
)
then a HTML box
"<h3><u>Today</u></h3>
<p><b>Location: </b>" & varWeatherToday.source.location & "</p>
<p><b>Forecast:</b><br>" & varWeatherToday.daily.day.summary & "</p>
<p><b>Temperature (Day):</b> Low: " & varWeatherToday.daily.tempLo & " High: " & varWeatherToday.daily.tempHi & "</p>
<p><b>UV Index:</b> " & varWeatherToday.daily.uv & " (" & varWeatherToday.daily.uvDesc & ")</p>
<p><b>Wind:</b> " & varWeatherToday.daily.day.windSpd & " kph (max " & varWeatherToday.daily.windMax & ") from " & varWeatherToday.daily.day.windDir & " Degrees</p>
<p><b>Conditions:</b> " & varWeatherToday.daily.day.cap & "</p>
<h3><u>Tomorrow</u></h3>
<p><b>Forecast:</b><br>" & varWeatherTomorrow.daily.day.summary & "</p>
<p><b>Temperature (Day):</b> Low: " & varWeatherTomorrow.daily.tempLo & " High: " & varWeatherTomorrow.daily.tempHi & "</p>
<p><b>UV Index:</b> " & varWeatherTomorrow.daily.uv & " (" & varWeatherTomorrow.daily.uvDesc & ")</p>
<p><b>Wind:</b> " & varWeatherTomorrow.daily.day.windSpd & " kph (max " & varWeatherTomorrow.daily.windMax & ") from " & varWeatherTomorrow.daily.day.windDir & " Degrees</p>
<p><b>Conditions:</b> " & varWeatherTomorrow.daily.day.cap & "</p>"
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
WarrenBelz
146,751
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional