Improved output of list-weather.ps1

This commit is contained in:
Markus Fleschutz 2021-04-22 14:06:58 +02:00
parent ea2c047548
commit 8afe073e7e

View File

@ -24,20 +24,19 @@ try {
$WindSpeed = $Hourly.windspeedKmph $WindSpeed = $Hourly.windspeedKmph
$WindDir = $Hourly.winddir16Point $WindDir = $Hourly.winddir16Point
$UV = $Hourly.uvIndex $UV = $Hourly.uvIndex
$Visib = $Hourly.visibility
$Clouds = $Hourly.cloudcover $Clouds = $Hourly.cloudcover
$Desc = $Hourly.weatherDesc.value $Desc = $Hourly.weatherDesc.value
if ($Hour -eq 0) { if ($Hour -eq 0) {
if ($Day -eq 0) { if ($Day -eq 0) {
"🕗 Today at $Area ($Region, $Country)" "🕗 🌡 ☂️ 💨 ☀️ ☁️ TODAY at $Area ($Region, $Country)"
} elseif ($Day -eq 1) { } elseif ($Day -eq 1) {
"🕗 Tomorrow" " TOMORROW"
} else { } else {
"🕗 Day After Tomorrow" " DAY AFTER TOMORROW"
} }
$Day++ $Day++
} }
"$($Hour)°°`t$($Temp)°C`t$($Precip)mm $($Humidity)%`t$($WindSpeed)km/h from $WindDir`t$($Pressure)hPa UV$($UV) $($Visib)km $($Clouds)% $Desc" "$($Hour)°°`t$($Temp)°C`t$($Precip)mm $($Humidity)% $($WindSpeed)km/h from $WindDir`tUV$($UV) $($Pressure)hPa $($Clouds)% $Desc"
$Hour++ $Hour++
} }