Update check-weather.ps1

This commit is contained in:
Markus Fleschutz
2021-12-01 12:53:37 +01:00
parent d9f65fd00d
commit becc2d5a06
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<#
.SYNOPSIS
Checks the weather for critical values
Checks the weather
.DESCRIPTION
Checks the current weather for critical values.
.PARAMETER location
@ -52,6 +52,9 @@ try {
} else {
"WEATHER ALERT: $Result"
}
$Reply = "$($Temp)°C, $($Precip)mm rain, $($Humidity)% humidity, $($Clouds)% clouds with wind $($WindSpeed)km/h from $WindDir at $Area ($Region)"
"✔️ $Reply"
& "$PSScriptRoot/speak-english.ps1" "$Reply"
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"