mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-16 06:58:18 +02:00
Update check-weather.ps1
This commit is contained in:
parent
d9f65fd00d
commit
becc2d5a06
@ -97,7 +97,7 @@ Computer, open `name` settings
|
|||||||
Computer, check `name`
|
Computer, check `name`
|
||||||
----------------------
|
----------------------
|
||||||
* let the computer check something.
|
* let the computer check something.
|
||||||
* replace `name` by: "CPU", "date", "DNS", "operating system", "ping", "swap space", "time", "time zone", or "up-time".
|
* replace `name` by: "CPU", "date", "DNS", "operating system", "ping", "swap space", "time", "time zone", "up-time", or "weather".
|
||||||
|
|
||||||
|
|
||||||
🔊 Audio
|
🔊 Audio
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Checks the weather for critical values
|
Checks the weather
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Checks the current weather for critical values.
|
Checks the current weather for critical values.
|
||||||
.PARAMETER location
|
.PARAMETER location
|
||||||
@ -52,6 +52,9 @@ try {
|
|||||||
} else {
|
} else {
|
||||||
"WEATHER ALERT: $Result"
|
"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
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||||
|
Loading…
Reference in New Issue
Block a user