This is a more intuitive, complete and up-to-the-minute weather report spoken in a natural manner by Siri in the language of your choice.
Great for use with HomePod or including with your “Good Morning!” routine. Simply add a Run Shortcut action to your Shortcut to hear this complete weather report first thing in the morning to plan your day.
Features
Coming soon for 2026! For those who desire an abbreviated weather report, version 11 now allows for the selection of 7 individual conditions that will be hidden in the report.
Siri reports the current weather and the next day’s forecast for your location in a natural, conversational manner.
For the deaf: While importing, set the “Deaf?” option to “True” to read instead of hear Siri’s weather report.
May be configured to report the weather for your current location (default) or a specific location.
May also be configured to use either imperial or metric units in weather report:
- Select False for inches or True for millimeters of precipitation.
- Select False for mph or True for km/h of wind speed.
- Select False for inHg or True for hPa of barometric pressure.
- Select False for miles or True for km of visibility.
- To select temperature units: Go to your device Settings > General > Language & Region > Temperature Unit and select °F or °C.
- Coming soon! Select False for each of the following weather conditions to hide from the report: Visibility, Wind, Humidity, Barometric Pressure, Air Quality, UV Index, and Sun Phases.
Select your preferred language translation of report by Microsoft Translator, your preferred Siri language, and your preferred Siri voice.
Siri intuitively adjusts report based on the time of day, the current weather conditions, the amount of past and the chance of future precipitation, and more.
The air quality index and category are reported when available.
The UV index and risk category are reported when available during daylight hours.
Future sunrise and sunset times are reported when available.
If you are new to creating your own Shortcuts, Total Weather by Siri may also be helpful by providing examples of using multilevel dictionaries and creating new dictionaries from lists.
Nouveautés
Repaired download link.
Ce qu’il fait
589 actions-
Dictionary
-
CommentThis section sets options such as setting units of measurement to either Imperial or Metric and setting the option for the hearing impaired (read instead of hear Siri's weather report.) IMPORTANT: DO NOT EDIT QUESTIONS. DOING SO WILL CAUSE THE SHORT…
-
Dictionary
-
Get Dictionary from Input
-
Set VariableOptionsDict
-
CommentThis section sets the rate and pitch of Siri's voice for consistency and a more natural speech.
-
Number
-
Set VariableSiriRate
-
Number
-
Set VariableSiriPitch
-
CommentThis section gets the weather data from www.weather.com for the user's current location and passes the name of the city on for use by Siri.
-
Show NotificationGetting your current or selected location . . .
-
Get Current Weather
-
Set VariableWeatherConditions
-
Get Details of Locations
-
Set VariableCity
-
Get Details of Weather
-
Set VariableLocation
-
Get Weather Forecast
-
Set VariableWeatherForecast
-
CommentThis section gets the device iOS version. (Some weather data in iOS 16 such as visibility, humidity, and participation chances are reported in a different format than iOS 15 and earlier.)
-
Get Device Details
-
Round Number
-
Set VariableiOSVersion
-
CommentThis section gets the current date and time and sets the time period of the day (morning, afternoon, evening, or night.)
-
Dictionary
-
Set VariableTimePeriods
-
Date
-
Set VariableNow
-
Get Details of Locations
-
Get Details of Locations
-
Dictionary
-
CommentIf a remote weather location has been selected, an optional Total Weather Time Adjust module may be run by inserting a Run Shortcut action here. It will get the current day and time for the selected remote location from the TimeZoneDB.com API (requi…
-
Set VariableRemoteDict
-
Get Dictionary Value
-
Set VariableNow
-
Format Date
-
Set VariableDateToday
-
Adjust Date
-
Format Date
-
Set VariableDateTomorrow
-
Adjust Date
-
Format Date
-
Set VariableDateYesterday
-
Format Date
-
Set VariableWeekDayNow
-
Format Date
-
Set VariableTimeNow
-
Format Date
-
Set VariableHourNow
-
Get Dictionary Value
-
Set VariableTimeOfDay
-
Get Time Between Dates
-
Set VariableTimeDiff
-
Get Dictionary Value
-
Set VariableRemoteTimeDay
-
CommentThis section creates a dictionary of phrases for Siri to use to improve grammar when describing current (0) and forecasted (1) weather conditions. The appropriate phrase is then selected to match current conditions. The dictionary below may need to …
-
Dictionary
-
Set VariableConditionsDict
-
Get Dictionary Value
-
If
-
Get Dictionary Value
-
Text
-
Set VariableConditionPhrase
-
If
-
Text
-
Set VariableConditionPhrase
-
CommentThis section determines and formats the wind direction and rounds off the wind speed. The dictionary of wind directions was designed by Joe Really.
-
Dictionary
-
Set VariableWindDirDict
-
Count
-
If
-
Calculate
-
Round Number
-
Get Dictionary Value
-
Set VariableWindDirection
-
Get Dictionary Value
-
If
-
Get Variable
-
Round Number
-
Set VariableWindSpeed
-
If
-
Text
-
Set VariableWindUnit
-
If
-
Text
-
Set VariableWindUnit
-
If
-
Get Variable
-
Round Number
-
Set VariableWindSpeed
-
If
-
Text
-
Set VariableWindUnit
-
If
-
Text
-
Set VariableWindUnit
-
Text
-
Set VariableWindPhrase
-
If
-
Text
-
Set VariableWindPhrase
-
CommentThis section formats and rounds off the current temperatures. It sets the High and Low temperature phrases to use. It also sets the "Feels Like" temperature.
-
Count
-
If
-
Round Number
-
Set VariableTemperature
-
If
-
Text
-
Set VariableTempPhrase
-
If
-
If
-
Text
-
Set VariableTempPhrase
-
If
-
Text
-
Set VariableTempPhrase
-
Round Number
-
Set VariableFeelsLike
-
If
-
Text
-
Set VariableFeelsLikePhrase
-
If
-
Text
-
Set VariableFeelsLikePhrase
-
If
-
Text
-
Set VariableTempPhrase
-
CommentThis section determines the humidity and dew point phrase, if either are given.
-
Count
-
If
-
If
-
Calculate
-
Set VariableAdjustedHumidity
-
If
-
Set VariableAdjustedHumidity
-
Count
-
If
-
Text
-
Set VariableDewpointPhrase
-
If
-
Round Number
-
Set VariableDewpoint
-
If
-
Text
-
Set VariableDewpointPhrase
-
If
-
If
-
Text
-
Set VariableDewpointPhrase
-
If
-
Text
-
Set VariableDewpointPhrase
-
Text
-
Set VariableHumidityPhrase
-
If
-
Text
-
Set VariableHumidityPhrase
-
CommentThis section sets the Visibility phrase.
-
Count
-
If
-
Get Dictionary Value
-
If
-
Round Number
-
Set VariableVisibility
-
If
-
Text
-
Set VariableVisibilityPhrase
-
If
-
Text
-
Set VariableVisibilityPhrase
-
If
-
Round Number
-
Set VariableVisibility
-
If
-
Text
-
Set VariableVisibilityPhrase
-
If
-
Text
-
Set VariableVisibilityPhrase
-
If
-
Text
-
Set VariableVisibilityPhrase
-
CommentThis section rounds off the current Precipitation Amount and sets the Precipitation Chance phrase to use.
-
Get Dictionary Value
-
If
-
Format Number
-
Set VariablePrecipitationAmount
-
Text
-
Set VariablePrecipitation
-
If
-
Format Number
-
Set VariablePrecipitationAmount
-
Text
-
Set VariablePrecipitation
-
If
-
Calculate
-
Set VariableAdjustedPrecipChance
-
If
-
Set VariableAdjustedPrecipChance
Afficher en tant que code
Chaque action de ce raccourci écrite en Cherri, un langage de programmation pour Raccourcis. Idéal pour comprendre son fonctionnement.
#include 'actions/math'
#include 'actions/location'
#define color red
#define glyph sun
/*
This section sets options such as setting units of measurement to either Imperial or Metric and setting the option for the hearing impaired (read instead of hear Siri's weather report.)
IMPORTANT: DO NOT EDIT QUESTIONS. DOING SO WILL CAUSE THE SHORTCUT TO NOT WORK PROPERLY.
Setting the dictionary values below to "True", will switch:
Text output instead of Siri.
Precipitation from inches to millimeters.
Wind Speed from miles per hour to kilometers per hour.
Barometric Pressure from inches of mercury to hectopascals.
Visibility from miles to kilometers.
You may select temperature units (°F or °C) in your device settings. Go to General > Language & Region > Temperature Unit.
*/
const Dictionary = {
"Deaf?": false,
"Switch precip to mm?": false,
"Switch pressure to hPa?": false,
"Switch visibility to km?": false,
"Switch wind to km/h?": false
}
getDictionary(Dictionary)
@OptionsDict
// This section sets the rate and pitch of Siri's voice for consistency and a more natural speech.
@SiriRate = 0.5
@SiriPitch = 1
// This section gets the weather data from www.weather.com for the user's current location and passes the name of the city on for use by Siri.
showNotification("Getting your current or selected location . . .", false)
getCurrentWeather()
@WeatherConditions
getLocationDetail(@WeatherConditions, "City")
@City
getWeatherDetail(@WeatherConditions, "Location")
@Location
@WeatherForecast = getWeatherForecast()
// This section gets the device iOS version. (Some weather data in iOS 16 such as visibility, humidity, and participation chances are reported in a different format than iOS 15 and earlier.)
const SystemVersion = getDeviceDetail("System Version")
round(SystemVersion)
@iOSVersion
// This section gets the current date and time and sets the time period of the day (morning, afternoon, evening, or night.)
@TimePeriods = {
"00": {
"hightemp": "1",
"lowtemp": "1",
"report": "this morning",
"sunphase": "morning"
},
"01": {
"hightemp": "1",
"lowtemp": "1",
"report": "this morning",
"sunphase": "morning"
},
"02": {
"hightemp": "1",
"lowtemp": "1",
"report": "this morning",
"sunphase": "morning"
},
"03": {
"hightemp": "1",
"lowtemp": "1",
"report": "this morning",
"sunphase": "morning"
},
"04": {
"hightemp": "1",
"lowtemp": "1",
"report": "this morning",
"sunphase": "morning"
},
"05": {
"hightemp": "1",
"lowtemp": "1",
"report": "this morning",
"sunphase": "morning"
},
"06": {
"hightemp": "1",
"lowtemp": "2",
"report": "this morning",
"sunphase": "morning"
},
"07": {
"hightemp": "1",
"lowtemp": "2",
"report": "this morning",
"sunphase": "morning"
},
"08": {
"hightemp": "1",
"lowtemp": "2",
"report": "this morning",
"sunphase": "morning"
},
"09": {
"hightemp": "1",
"lowtemp": "2",
"report": "this morning",
"sunphase": "morning"
},
"10": {
"hightemp": "1",
"lowtemp": "2",
"report": "this morning",
"sunphase": "morning"
},
"11": {
"hightemp": "1",
"lowtemp": "2",
"report": "this morning",
"sunphase": "morning"
},
"12": {
"hightemp": "1",
"lowtemp": "3",
"report": "this afternoon",
"sunphase": "afternoon"
},
"13": {
"hightemp": "1",
"lowtemp": "3",
"report": "this afternoon",
"sunphase": "afternoon"
},
"14": {
"hightemp": "1",
"lowtemp": "3",
"report": "this afternoon",
"sunphase": "afternoon"
},
"15": {
"hightemp": "1",
"lowtemp": "3",
"report": "this afternoon",
"sunphase": "afternoon"
},
"16": {
"hightemp": "1",
"lowtemp": "3",
"report": "this afternoon",
"sunphase": "afternoon"
},
"17": {
"hightemp": "1",
"lowtemp": "3",
"report": "this evening",
"sunphase": "evening"
},
"18": {
"hightemp": "1",
"lowtemp": "3",
"report": "this evening",
"sunphase": "evening"
},
"19": {
"hightemp": "2",
"lowtemp": "3",
"report": "this evening",
"sunphase": "evening"
},
"20": {
"hightemp": "2",
"lowtemp": "3",
"report": "tonight",
"sunphase": "evening"
},
"21": {
"hightemp": "2",
"lowtemp": "3",
"report": "tonight",
"sunphase": "evening"
},
"22": {
"hightemp": "2",
"lowtemp": "3",
"report": "tonight",
"sunphase": "evening"
},
"23": {
"hightemp": "2",
"lowtemp": "3",
"report": "tonight",
"sunphase": "evening"
}
}
currentDate()
@Now
getLocationDetail(@Location, "Longitude")
getLocationDetail(@Location, "Latitude")
/*
If a remote weather location has been selected, an optional Total Weather Time Adjust module may be run by inserting a Run Shortcut action here. It will get the current day and time for the selected remote location from the TimeZoneDB.com API (requires a free API Key by registering.)
Insert a Run Shortcut action below and set to run the Total Weather Time Adjust Module shortcut and set the Input to the above "Dictionary" (magic variable.) "Show While Running" should be switched off.
Reset the variable RemoteDict below from "Dictionary" to "Shortcut Result".
*/
@RemoteDict = {
"Lat": "{}",
"Location": "{@Location}",
"Lon": "{}",
"Now": "{@Now}",
"RemoteTimeDay": ""
}
@Now = @RemoteDict['Now']
formatDate(@Now, "Custom", "MMM dd, yyyy")
@DateToday
adjustDate(@DateToday, "Add")
formatDate(, "Custom", "MMM dd, yyyy")
@DateTomorrow
adjustDate(@DateToday, "Subtract")
formatDate(, "Custom", "MMM dd, yyyy")
@DateYesterday
formatDate(@Now, "Custom", "EEEE")
@WeekDayNow
formatDate(@Now, "Custom", "hh:mm a")
@TimeNow
formatDate(@Now, "Custom", "HH")
@HourNow
@TimeOfDay = @TimePeriods["{@HourNow}.report"]
rawAction("is.workflow.actions.gettimebetweendates", {
"WFInput": "{@Now}",
"WFTimeUntilFromDate": "{CurrentDate}",
"WFTimeUntilUnit": "Hours"
})
@TimeDiff
@RemoteTimeDay = @RemoteDict['RemoteTimeDay']
// This section creates a dictionary of phrases for Siri to use to improve grammar when describing current (0) and forecasted (1) weather conditions. The appropriate phrase is then selected to match current conditions. The dictionary below may need to be manually updated from time to time when a condition is added by weather.com that is not included.
@ConditionsDict = {
"Blowing Snow": {
"0": "There is blowing snow",
"1": "with blowing snow"
},
"Breezy": {
"0": "It is breezy",
"1": "and breezy"
},
"Clear": {
"0": "There are clear skies",
"1": "with clear skies"
},
"Cloudy": {
"0": "It is cloudy",
"1": "with cloudy skies"
},
"Drizzle": {
"0": "There is drizzle",
"1": "with drizzle"
},
"Flurries": {
"0": "There are snow flurries",
"1": "with snow flurries"
},
"Foggy": {
"0": "It is foggy",
"1": "and foggy"
},
"Freezing Rain": {
"0": "There is freezing rain",
"1": "and freezing rain"
},
"Haze": {
"0": "It is hazy",
"1": "with haze"
},
"Heavy Fog": {
"0": "There is heavy fog",
"1": "with heavy fog"
},
"Heavy Rain": {
"0": "There is heavy rain",
"1": "with heavy rain"
},
"Isolated Thundershowers": {
"0": "There are isolated thundershowers",
"1": "with isolated thundershowers"
},
"Isolated Thunderstorms": {
"0": "There are isolated thunderstorms",
"1": "with isolated thunderstorms"
},
"Light Rain": {
"0": "There is light rain",
"1": "with light rain"
},
"Light Snow Showers": {
"0": "There are light snow showers",
"1": "with light snow showers"
},
"Mixed Rain And Snow": {
"0": "There is a mix of rain and snow",
"1": "with a mix of rain and snow"
},
"Mixed Snow And Sleet": {
"0": "There is mixed snow and sleet",
"1": "with mixed snow and sleet"
},
"Mostly Clear": {
"0": "It is mostly clear",
"1": "with mostly clear skies"
},
"Mostly Cloudy": {
"0": "There are mostly cloudy skies",
"1": "with mostly cloudy skies"
},
"Mostly Sunny": {
"0": "It’s mostly sunny ",
"1": "with mostly sunny skies"
},
"Partly Cloudy": {
"0": "It is partly cloudy",
"1": "with partly cloudy skies"
},
"Rain": {
"0": "It is raining",
"1": "with rain"
},
"Scattered Showers": {
"0": "There are scattered showers",
"1": "with scattered showers"
},
"Scattered Thunderstorms": {
"0": "There are scattered thunderstorms",
"1": "with scattered thunderstorms"
},
"Showers": {
"0": "There are rain showers",
"1": "with rain showers"
},
"Sleet": {
"0": "It is sleeting",
"1": "with sleet"
},
"Snow": {
"0": "It is snowing",
"1": "and snow"
},
"Snow Showers": {
"0": "There are snow showers",
"1": "with snow showers"
},
"Sunny": {
"0": "It is sunny",
"1": "with sunny skies"
},
"Thunderstorm": {
"0": "There is a thunderstorm",
"1": "with a thunderstorm"
},
"Thunderstorms": {
"0": "There are thunderstorms",
"1": "with thunderstorms"
},
"Windy": {
"0": "It is windy.",
"1": "and windy"
}
}
const DictionaryValue = getValue(@ConditionsDict, "")
if DictionaryValue contains @WeatherConditions['Condition'] {
const CurrentConditions = @ConditionsDict["{@WeatherConditions['Condition']}.0"]
@ConditionPhrase = "{CurrentConditions} in {@City}"
} else {
@ConditionPhrase = "There are currently {@WeatherConditions['Condition']} conditions in {@City}"
}
// This section determines and formats the wind direction and rounds off the wind speed. The dictionary of wind directions was designed by Joe Really.
@WindDirDict = {
"0": "northerly",
"1": "northeasterly",
"2": "easterly",
"3": "southeasterly",
"4": "southerly",
"5": "southwesterly",
"6": "westerly",
"7": "northwesterly",
"8": "northerly"
}
const Count = count(@WeatherConditions, "Characters")
if Count {
const CalculationResult = @WeatherConditions / 45
round(CalculationResult)
@WindDirection = @WindDirDict[]
const DictionaryValue1 = getValue(@OptionsDict, "Switch wind to km/h?")
if DictionaryValue1 == 0 {
// TODO: Get Variable not supported: Assign variable here to '@WeatherConditions'.
ceil(@WeatherConditions, "Ones Place")
@WindSpeed
if @WindSpeed == 1 {
@WindUnit = "mile per hour"
} else {
@WindUnit = "miles per hour"
}
} else {
// TODO: Get Variable not supported: Assign variable here to '@WeatherConditions'.
round(@WeatherConditions)
@WindSpeed
if @WindSpeed == 1 {
@WindUnit = "kilometer per hour"
} else {
@WindUnit = "kilometers per hour"
}
}
@WindPhrase = " There is a {@WindDirection} wind blowing at {@WindSpeed} {@WindUnit}."
} else {
@WindPhrase = "nil"
}
// This section formats and rounds off the current temperatures. It sets the High and Low temperature phrases to use. It also sets the "Feels Like" temperature.
const Count1 = count(@WeatherConditions)
if Count1 {
round(@WeatherConditions)
@Temperature
if @Temperature == 1 {
@TempPhrase = " The temperature is {@Temperature} degree"
} else {
if @Temperature == -1 {
@TempPhrase = " The temperature is {@Temperature} degree"
} else {
@TempPhrase = " The temperature is {@Temperature} degrees"
}
}
round(@WeatherConditions)
@FeelsLike
if @FeelsLike == @Temperature {
@FeelsLikePhrase = "."
} else {
@FeelsLikePhrase = ", but it feels like {@FeelsLike}."
}
} else {
@TempPhrase = "nil"
}
// This section determines the humidity and dew point phrase, if either are given.
const Count2 = count(@WeatherConditions, "Characters")
if Count2 {
if @WeatherConditions < 1 {
@AdjustedHumidity = @WeatherConditions * 100
} else {
@AdjustedHumidity = @WeatherConditions
}
const Count3 = count(@WeatherConditions, "Characters")
if !Count3 {
@DewpointPhrase = "nil"
} else {
round(@WeatherConditions)
@Dewpoint
if @Dewpoint == 1 {
@DewpointPhrase = " with a dew point of {@Dewpoint} degree"
} else {
if @Dewpoint == -1 {
@DewpointPhrase = " with a dew point of {@Dewpoint} degree"
} else {
@DewpointPhrase = " with a dew point of {@Dewpoint} degrees"
}
}
}
@HumidityPhrase = " The relative humidity is {@AdjustedHumidity}%{@DewpointPhrase}."
} else {
@HumidityPhrase = "nil"
}
// This section sets the Visibility phrase.
const Count4 = count(@WeatherConditions, "Characters")
if Count4 {
const DictionaryValue2 = getValue(@OptionsDict, "Switch visibility to km?")
if DictionaryValue2 == 0 {
ceil(@WeatherConditions, "Tenths")
@Visibility
if @Visibility == 1 {
@VisibilityPhrase = " with a visibility of {@Visibility} mile."
} else {
@VisibilityPhrase = " with a visibility of {@Visibility} miles."
}
} else {
ceil(@WeatherConditions, "Tenths")
@Visibility
if @Visibility == 1 {
@VisibilityPhrase = " with a visibility of {@Visibility} kilometer."
} else {
@VisibilityPhrase = " with a visibility of {@Visibility} kilometers."
}
}
} else {
@VisibilityPhrase = "."
}
// This section rounds off the current Precipitation Amount and sets the Precipitation Chance phrase to use.
const DictionaryValue3 = getValue(@OptionsDict, "Switch precip to mm?")
if DictionaryValue3 == 0 {
formatNumber(@WeatherConditions, 2)
@PrecipitationAmount
@Precipitation = "{@PrecipitationAmount} inches"
} else {
formatNumber(@WeatherConditions, 2)
@PrecipitationAmount
@Precipitation = "{@PrecipitationAmount} millimetres"
}
if @iOSVersion == 16 {
@AdjustedPrecipChance = @WeatherConditions * 100
} else {
@AdjustedPrecipChance = @WeatherConditions
}
@PrecipChDict = {
"0": {
"0": "There has been no measurable precipitation within the past six hours and none is currently expected.",
"1": "There has been {@Precipitation} of precipitation within the past six hours, however no additional is expected at present."
},
"10": {
"0": "There is currently a slight {@AdjustedPrecipChance}% chance of precipitation, although there has been no measurable amount in the past six hours.",
"1": "There has been {@Precipitation} of precipitation in the past six hours and there is a slight chance of {@AdjustedPrecipChance}% for new amounts."
},
"100": {
"0": "There is a 100% chance of precipitation, although there has been no measurable amount in the past six hours.",
"1": "There has been {@Precipitation} of precipitation in the past six hours and there is currently a 100% chance for new amounts."
},
"20": {
"0": "There is currently a small {@AdjustedPrecipChance}% chance of precipitation, although there has been no measurable amount in the past six hours.",
"1": "There has been {@Precipitation} of precipitation in the past six hours and there is a slight chance of {@AdjustedPrecipChance}% for additional amounts."
},
"30": {
"0": "There is currently a {@AdjustedPrecipChance}% chance of precipitation, although there has been no measurable amount in the past six hours.",
"1": "There has been {@Precipitation} of precipitation in the past six hours and there is a low chance of {@AdjustedPrecipChance}% for new amounts."
},
"40": {
"0": "There is currently a {@AdjustedPrecipChance}% chance of precipitation, although there has been no measurable amount in the past six hours.",
"1": "There has been {@Precipitation} of precipitation in the past six hours and there is a moderate chance of {@AdjustedPrecipChance}% for new amounts."
},
"50": {
"0": "There is currently a 50 50 chance of precipitation, although there has been no measurable amount in the past six hours.",
"1": "There has been {@Precipitation} of precipitation in the past six hours and there is a 50 50 chance for an additional amount."
},
"60": {
"0": "There is currently a good chance of {@AdjustedPrecipChance}% for precipitation, although there has been no measurable amount in the past six hours.",
"1": "There has been {@Precipitation} of precipitation in the past six hours and there is a moderate chance of {@AdjustedPrecipChance}% for new amounts."
},
"70": {
"0": "There is currently a high chance of {@AdjustedPrecipChance}% for precipitation, although there has been no measurable amount in the past six hours.",
"1": "There has been {@Precipitation} of precipitation in the past six hours and there is a high chance of {@AdjustedPrecipChance}% for an additional amount."
},
"80": {
"0": "Precipitation is soon likely with a {@AdjustedPrecipChance}% chance, although there has been no measurable amount in the past six hours.",
"1": "There has been {@Precipitation} of precipitation in the past six hours and an additional amount is likely with an {@AdjustedPrecipChance}% chance."
},
"90": {
"0": "Precipitation is soon likely with a {@AdjustedPrecipChance}% chance, although there has been no measurable amount in the past six hours.",
"1": "There has been {@Precipitation} of precipitation in the past six hours and an additional amount is likely with an {@AdjustedPrecipChance}% chance."
}
}
if @PrecipitationAmount == "0.00" {
@AmountSwitch = "0"
} else {
@AmountSwitch = "1"
}
const Count5 = count(@WeatherConditions, "Characters")
if !Count5 {
@PrecipPhrase = "nil"
} else {
ceil(@AdjustedPrecipChance, "Tens Place")
@PrecipPhrase = " {}"
}
// This section formats the barometric pressure and phrase.
const Count6 = count(@WeatherConditions, "Characters")
if Count6 {
const DictionaryValue4 = getValue(@OptionsDict, "Switch pressure to hPa?")
if DictionaryValue4 == 0 {
ceil(@WeatherConditions, "Hundredths")
@Pressure
@PressurePhrase = " The barometric pressure is {@Pressure} inches of mercury."
} else {
ceil(@WeatherConditions, "Hundredths")
@Pressure
@PressurePhrase = " The barometric pressure is {@Pressure} hectopascals."
}
} else {
@PressurePhrase = "nil"
}
// This section create a list of formatted forecast dates.
formatDate(@WeatherForecast['Date'], "Custom", "MMM dd, yyyy")
@ForecastDateList
// This section creates a dictionary of forecasted high temperatures.
for _ in @WeatherForecast {
getListItem(@ForecastDateList, @RepeatIndex)
setValue(@ForecastHighTempDict, @RepeatItem)
@ForecastHighTempDict
}
// This section creates a dictionary of forecasted low temperatures.
for _ in @WeatherForecast {
getListItem(@ForecastDateList, @RepeatIndex)
setValue(@ForecastLowTempDict, @RepeatItem)
@ForecastLowTempDict
}
// This section creates a dictionary of forecasted conditions.
for _ in @WeatherForecast {
getListItem(@ForecastDateList, @RepeatIndex)
setValue(@ForecastCondDict, @RepeatItem)
@ForecastCondDict
}
// This section creates a dictionary of forecasted wind speeds.
const DictionaryValue5 = getValue(@OptionsDict, "Switch wind to km/h?")
if DictionaryValue5 == 0 {
for _ in @WeatherForecast {
getListItem(@ForecastDateList, @RepeatIndex)
setValue(@ForecastWindSpeedDict, @RepeatItem)
@ForecastWindSpeedDict
}
} else {
for _ in @WeatherForecast {
getListItem(@ForecastDateList, @RepeatIndex)
setValue(@ForecastWindSpeedDict, @RepeatItem)
@ForecastWindSpeedDict
}
}
// This section creates a dictionary of forecasted wind directions.
for _ in @WeatherForecast {
getListItem(@ForecastDateList, @RepeatIndex)
setValue(@WindDirectionDict, @RepeatItem)
@WindDirectionDict
}
// This section creates a dictionary of forecasted precipitation chances.
for _ in @WeatherForecast {
getListItem(@ForecastDateList, @RepeatIndex)
setValue(@ForecastPrecipChDict, @RepeatItem)
@ForecastPrecipChDict
}
// This section creates a dictionary of forecasted sunrise times.
adjustDate(@WeatherForecast['Sunrise Time'], "Add")
formatDate(, "Custom", "MMM dd, yyyy")
@ForecastSunriseDateList
adjustDate(@WeatherForecast['Sunrise Time'], "Add")
const FormattedDate = formatDate(, "Custom", "h:mm a")
for _ in FormattedDate {
getListItem(@ForecastSunriseDateList, @RepeatIndex)
setValue(@ForecastSunriseDict, @RepeatItem)
@ForecastSunriseDict
}
// This section creates a dictionary of forecasted sunset times.
adjustDate(@WeatherForecast['Sunset Time'], "Add")
formatDate(, "Custom", "MMM dd, yyyy")
@ForecastSunsetDateList
adjustDate(@WeatherForecast['Sunset Time'], "Add")
const FormattedDate1 = formatDate(, "Custom", "h:mm a")
for _ in FormattedDate1 {
getListItem(@ForecastSunsetDateList, @RepeatIndex)
setValue(@ForecastSunsetDict, @RepeatItem)
@ForecastSunsetDict
}
// This section creates a dictionary of sunrise and sunset periods.
@SunPhaseDict = {
"00": "morning",
"01": "morning",
"02": "morning",
"03": "morning",
"04": "morning",
"05": "morning",
"06": "morning",
"07": "morning",
"08": "morning",
"09": "morning",
"10": "morning",
"11": "morning",
"12": "afternoon",
"13": "afternoon",
"14": "afternoon",
"15": "afternoon",
"16": "afternoon",
"17": "evening",
"18": "evening",
"19": "evening",
"20": "evening",
"21": "evening",
"22": "evening",
"23": "evening"
}
// This section sets the sunrise phrase.
@ForecastSunriseToday = @ForecastSunriseDict[@DateToday]
const Count7 = count(@ForecastSunriseToday, "Characters")
if Count7 {
rawAction("is.workflow.actions.gettimebetweendates", {
"WFInput": "{@ForecastSunriseToday}",
"WFTimeUntilFromDate": "{@TimeNow}"
})
@ForecastSunriseDiff
} else {
@ForecastSunriseDiff = -1
}
if @ForecastSunriseDiff < 0 {
@ForecastSunriseTomorrow = @ForecastSunriseDict[@DateTomorrow]
const Count8 = count(@ForecastSunriseTomorrow, "Characters")
if Count8 {
@SunrisePeriod = @TimePeriods["{@ForecastSunriseTomorrow}.sunphase"]
@SunrisePhrase = " Sunrise tomorrow {@SunrisePeriod} will be at {@ForecastSunriseTomorrow}."
@SunriseOrder = 1
} else {
}
} else {
const Count9 = count(@ForecastSunriseToday)
if Count9 {
@SunrisePeriod = @TimePeriods["{@ForecastSunriseToday}.sunphase"]
@SunrisePhrase = " Sunrise this {@SunrisePeriod} will be at {@ForecastSunriseToday}."
@SunriseOrder = 0
} else {
}
}
// This section sets the sunset phrase.
@ForecastSunsetToday = @ForecastSunsetDict[@DateToday]
const Count10 = count(@ForecastSunsetToday, "Characters")
if Count10 {
rawAction("is.workflow.actions.gettimebetweendates", {
"WFInput": "{@ForecastSunsetToday}",
"WFTimeUntilFromDate": "{@TimeNow}"
})
@ForecastSunsetDiff
} else {
@ForecastSunsetDiff = -1
}
if @ForecastSunsetDiff < 0 {
@ForecastSunsetTomorrow = @ForecastSunsetDict[@DateTomorrow]
const Count11 = count(@ForecastSunsetTomorrow, "Characters")
if Count11 {
@SunsetPeriod = @TimePeriods["{@ForecastSunsetTomorrow}.sunphase"]
@SunsetPhrase = " Sunset tomorrow {@SunsetPeriod} will be at {@ForecastSunsetTomorrow}."
@SunsetOrder = 1
} else {
}
} else {
const Count12 = count(@ForecastSunsetToday)
if Count12 {
@SunsetPeriod = @TimePeriods["{@ForecastSunsetToday}.sunphase"]
@SunsetPhrase = " Sunset this {@SunsetPeriod} will be at {@ForecastSunsetToday}."
@SunsetOrder = 0
} else {
}
}
// This section sets the order of the sunrise and sunset phrases.
if @SunriseOrder > @SunsetOrder {
@SunSchedule = "{@SunsetPhrase}{@SunrisePhrase}"
} else {
@SunSchedule = "{@SunrisePhrase}{@SunsetPhrase}"
}
// This section sets the Air Quality and Index phrase if it is provided.
const Text = "{@WeatherConditions['Air Quality Category']}"
const Count13 = count(Text, "Characters")
if Count13 == 0 {
@AirQualityPhrase = "nil"
} else {
uppercase(@WeatherConditions)
@AirQualityCat
@AirQualityPhrase = " The air quality is {@AirQualityCat} with an index of {@WeatherConditions['Air Quality Index']}."
}
// This section sets the UV Index to be included only after Sunrise and before Sunset.
@UVCatDict = {
"0": "low",
"1": "low",
"10": "very high",
"2": "low",
"3": "moderate",
"4": "moderate",
"5": "moderate",
"6": "high",
"7": "high",
"8": "very high",
"9": "very high"
}
round(@WeatherConditions)
@UVIndex
if @UVIndex < 11 {
@UVCatagory = @UVCatDict[@UVIndex]
} else {
@UVCatagory = "Extreme"
}
formatDate(, "Custom", "HH:mm")
@SunriseToday
formatDate(, "Custom", "HH:mm")
@SunsetToday
const FormattedDate2 = formatDate(@TimeNow, "Custom", "HH:mm")
if FormattedDate2 > @SunriseToday {
const FormattedDate3 = formatDate(@TimeNow, "Custom", "HH:mm")
if FormattedDate3 < @SunsetToday {
@UVIndexPhrase = " The UV risk is {@UVCatagory} with an index of {@UVIndex}."
} else {
}
} else {
}
// This section gets today's past or forecasted high temp and formats the phrase.
@HighSwitch = @TimePeriods["{@HourNow}.hightemp"]
if @HighSwitch == "2" {
const Count14 = count(@WeatherConditions, "Characters")
if Count14 {
round(@WeatherConditions)
@TodaysHigh
@HighPhrase = " The high today was {@TodaysHigh}"
} else {
@HighPhrase = "nil"
}
} else {
const DictionaryValue6 = getValue(@ForecastHighTempDict, @DateToday)
const Count15 = count(DictionaryValue6, "Characters")
if Count15 {
formatNumber(DictionaryValue6, 0)
@ForecastTodaysHigh
round(@ForecastTodaysHigh)
@ForecastHighTempToday
@HighPhrase = " The expected high today is {@ForecastHighTempToday}"
} else {
@HighPhrase = "nil"
}
}
// This section gets today's past or forecasted low temp and formats the phrasing.
@LowSwitch = @TimePeriods["{@HourNow}.lowtemp"]
// Between 7AM and Noon, the past overnight low is reported.
if @LowSwitch == "2" {
const Count16 = count(@WeatherConditions, "Characters")
if Count16 {
round(@WeatherConditions)
@Low
const Count17 = count(@HighPhrase, "Characters")
if Count17 {
@LowPhrase = ", the overnight low was {@Low}."
} else {
@LowPhrase = " The overnight low was {@Low}."
}
} else {
@LowPhrase = "."
}
} else {
// Between Noon and Midnight, today's forecasted low is reported.
if @LowSwitch == "3" {
const DictionaryValue7 = getValue(@ForecastLowTempDict, @DateTomorrow)
const Count18 = count(DictionaryValue7, "Characters")
if Count18 {
formatNumber(DictionaryValue7, 0)
@ForecastTodaysLow
round(@ForecastTodaysLow)
@ForecastLowTempToday
const Count19 = count(@HighPhrase, "Characters")
if Count19 {
@LowPhrase = ", the low overnight will be {@ForecastLowTempToday}."
} else {
@LowPhrase = " The low overnight will be {@ForecastLowTempToday}."
}
} else {
@LowPhrase = "."
}
} else {
// Between Midnight and 6AM, today's forecasted low is reported, while available.
const DictionaryValue8 = getValue(@ForecastLowTempDict, @DateToday)
const Count20 = count(DictionaryValue8, "Characters")
if Count20 {
formatNumber(DictionaryValue8, 0)
@ForcastYesterdaysLow
round(@ForcastYesterdaysLow)
@ForcastLowTempYesterday
const Count21 = count(@HighPhrase, "Characters")
if Count21 {
@LowPhrase = ", the low overnight will be {@ForcastLowTempYesterday}."
} else {
@LowPhrase = " The low overnight will be {@ForcastLowTempYesterday}."
}
} else {
@LowPhrase = "."
}
}
}
// This section gets tomorrow's forecast and formats the phrasing.
const DictionaryValue6 = getValue(@ForecastHighTempDict, @DateTomorrow)
const Count15 = count(DictionaryValue6, "Characters")
if Count15 {
formatNumber(DictionaryValue6, 0)
@ForecastHigh
round(@ForecastHigh)
@ForecastHighTempTomorrow
@HighTomorrowPhrase = "Tomorrow's high will be {@ForecastHighTempTomorrow}"
} else {
@HighTomorrowPhrase = "nil"
}
adjustDate(@DateTomorrow, "")
formatDate(, "Custom", "MMM dd, yyyy")
const DictionaryValue7 = getValue(@ForecastLowTempDict)
const Count18 = count(DictionaryValue7, "Characters")
if Count18 {
formatNumber(DictionaryValue7, 0)
@ForecastLow
round(@ForecastLow)
@ForecastLowTempTomorrow
const Count22 = count(@ForecastHigh, "Characters")
if Count22 {
@LowTomorrowPhrase = " and the overnight low will be {@ForecastLowTempTomorrow}"
} else {
@LowTomorrowPhrase = "Tomorrow's overnight low will be {@ForecastLowTempTomorrow}"
}
} else {
@LowTomorrowPhrase = "nil"
}
const DictionaryValue9 = getValue(@WindDirectionDict, @DateTomorrow)
@WindDirTomorrow = DictionaryValue9
const Count23 = count(DictionaryValue9, "Characters")
if Count23 {
const CalculationResult1 = @WindDirTomorrow / 45
round(CalculationResult1)
@WindDirTomorrowPhrase = " {}"
} else {
@WindDirTomorrowPhrase = "nil"
}
const DictionaryValue10 = getValue(@ForecastWindSpeedDict, @DateTomorrow)
round(DictionaryValue10)
@ForecastWindSpeedTomorrow
const Text1 = " {DictionaryValue10}"
const Count24 = count(Text1, "Characters")
if Count24 == 0 {
@ForecastWindSpeedPhrase = "nil"
} else {
const DictionaryValue11 = getValue(@OptionsDict, "Switch wind to km/h?")
if DictionaryValue11 == 0 {
if @ForecastWindSpeedTomorrow == 1 {
@ForecastWindSpeedPhrase = " and a{@WindDirTomorrowPhrase} wind at about {@ForecastWindSpeedTomorrow} mile per hour "
} else {
@ForecastWindSpeedPhrase = " and a{@WindDirTomorrowPhrase} wind at about {@ForecastWindSpeedTomorrow} miles per hour"
}
} else {
if @ForecastWindSpeedTomorrow == 1 {
@ForecastWindSpeedPhrase = " and a{@WindDirTomorrowPhrase} wind at about {@ForecastWindSpeedTomorrow} kilometer per hour"
} else {
@ForecastWindSpeedPhrase = " and a{@WindDirTomorrowPhrase} wind at about {@ForecastWindSpeedTomorrow} kilometers per hour"
}
}
}
@ForecastCondTomorrow = @ForecastCondDict[@DateTomorrow]
const DictionaryValue12 = getKeys(@ConditionsDict)
if DictionaryValue12 contains @ForecastCondTomorrow {
const TomorrowsConditions = @ConditionsDict["{@ForecastCondTomorrow}.1"]
@TomorrowsCondPhrase = " {TomorrowsConditions}{@ForecastWindSpeedPhrase}."
} else {
@TomorrowsCondPhrase = " with {@ForecastCondTomorrow} conditions{@ForecastWindSpeedPhrase}. "
}
const DictionaryValue13 = getValue(@ForecastPrecipChDict, @DateTomorrow)
if @iOSVersion >= 16 {
@ForecastPrecipChTomorrow = DictionaryValue13 * 100
} else {
@ForecastPrecipChTomorrow = DictionaryValue13
}
const Text2 = "{DictionaryValue13}"
const Count25 = count(Text2, "Characters")
if Count25 == 0 {
@ForecastPrecipPhrase = "nil"
} else {
@ForecastPrecipPhrase = " The chance for precipitation on {@DateTomorrow} is {@ForecastPrecipChTomorrow}%. "
}
// This section formats the report to pass on to Siri to read aloud or the output of a text report.
translate(, "en_US")
const DictionaryValue14 = getValue(@OptionsDict, "Deaf?")
if DictionaryValue14 == 0 {
speak(, "en-US")
} else {
show()
}
Notes et avis
Écrire un avisAucun avis pour le moment. Sois le premier à partager ton avis !