ShareShortcuts

Total Weather By Siri

tldodge
Bifurcar “Total Weather By Siri”

¿Creaste algo nuevo a partir de este atajo? Compártelo como bifurcación: se convierte en un atajo tuyo, que tú administras, y ambas páginas se enlazan entre sí para que tldodge reciba el crédito.

  1. 1Obtén el atajo y modifícalo en la app Atajos. Ponle un nombre propio.
  2. 2Compártelo desde la app Atajos y copia el enlace de iCloud.
  3. 3Vuelve aquí, pega el enlace y describe qué es diferente, p. ej., “Se añadió un paso que usa Apple Intelligence para personalizar el texto”.
Descargas
78K
Guardado
4
Acciones
589
Categoría
Weather
Versión
11.1
Idioma
EN

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.

Novedades

Versión 11.1

Repaired download link.

Historial de versiones
11.1 23 de sep. de 2025

Reverted to version 10.6 due to a bug in iOS 26. Will release version 11 when resolved.

11.1 23 de sep. de 2025

May now select individual conditions to hide in weather report.

11.1 27 de sep. de 2025

Repaired download link.

11.0 23 de sep. de 2025

May now select individual conditions to hide in weather report.

10.6 4 de abr. de 2025

Precipitation amounts are now reported for past six hours instead of one hour to match the Apple Weather app.

10.6 4 de abr. de 2025

Precipitation amounts are now reported for past six hours instead of one hour to match the Apple Weather app.

10.5 6 de mar. de 2025

Precipitation amount is now reported hourly instead of past 24 hours.

10.4 22 de nov. de 2024

Fix some bugs created by iOS & iPadOS 18.

10.3 19 de sep. de 2023

Fixed a compatibility issue with iOS & iPadOS 17.

10.2 2 de feb. de 2023

Updated conditions dictionary.

10.1 25 de nov. de 2022

Added overnight low temperatures and updated conditions dictionary.

10.0 15 de sep. de 2022

Added compatibility with iOS 16 & iPadOS 16.

9.1 27 de mar. de 2021

Bug fixes.

9.0 25 de mar. de 2021

Added wind data to tomorrow’s forecast. Temperature units (°F or °C) are now selected in device Settings.

8.9 17 de mar. de 2021

Added wind to tomorrow’s forecast. Temperature units (°F or °C) are now selected in device Settings.

8.8 3 de dic. de 2020

Fixed a bug that caused some to receive a “Could not evaluate the key path” error.

8.7 26 de ago. de 2020

Today’s forecasted temperatures are now more accurate.

8.6 23 de mar. de 2020

Updated weather conditions dictionary. Improved stability through better error handling when data is missing from weather.com.

8.3 30 de nov. de 2019

Improved visibility reporting.

8.3 30 de nov. de 2019

Improved visibility reporting.

Qué hace

589 acciones
  1. Dictionary
  2. Comment
    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 SHORT…
  3. Dictionary
  4. Get Dictionary from Input
  5. Set Variable
    OptionsDict
  6. Comment
    This section sets the rate and pitch of Siri's voice for consistency and a more natural speech.
  7. Number
  8. Set Variable
    SiriRate
  9. Number
  10. Set Variable
    SiriPitch
  11. Comment
    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.
  12. Show Notification
    Getting your current or selected location . . .
  13. Get Current Weather
  14. Set Variable
    WeatherConditions
  15. Get Details of Locations
  16. Set Variable
    City
  17. Get Details of Weather
  18. Set Variable
    Location
  19. Get Weather Forecast
  20. Set Variable
    WeatherForecast
  21. Comment
    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.)
  22. Get Device Details
  23. Round Number
  24. Set Variable
    iOSVersion
  25. Comment
    This section gets the current date and time and sets the time period of the day (morning, afternoon, evening, or night.)
  26. Dictionary
  27. Set Variable
    TimePeriods
  28. Date
  29. Set Variable
    Now
  30. Get Details of Locations
  31. Get Details of Locations
  32. Dictionary
  33. Comment
    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 (requi…
  34. Set Variable
    RemoteDict
  35. Get Dictionary Value
  36. Set Variable
    Now
  37. Format Date
  38. Set Variable
    DateToday
  39. Adjust Date
  40. Format Date
  41. Set Variable
    DateTomorrow
  42. Adjust Date
  43. Format Date
  44. Set Variable
    DateYesterday
  45. Format Date
  46. Set Variable
    WeekDayNow
  47. Format Date
  48. Set Variable
    TimeNow
  49. Format Date
  50. Set Variable
    HourNow
  51. Get Dictionary Value
  52. Set Variable
    TimeOfDay
  53. Get Time Between Dates
  54. Set Variable
    TimeDiff
  55. Get Dictionary Value
  56. Set Variable
    RemoteTimeDay
  57. Comment
    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 …
  58. Dictionary
  59. Set Variable
    ConditionsDict
  60. Get Dictionary Value
  61. If
  62. Get Dictionary Value
  63. Text
  64. Set Variable
    ConditionPhrase
  65. If
  66. Text
  67. Set Variable
    ConditionPhrase
  68. Comment
    This section determines and formats the wind direction and rounds off the wind speed. The dictionary of wind directions was designed by Joe Really.
  69. Dictionary
  70. Set Variable
    WindDirDict
  71. Count
  72. If
  73. Calculate
  74. Round Number
  75. Get Dictionary Value
  76. Set Variable
    WindDirection
  77. Get Dictionary Value
  78. If
  79. Get Variable
  80. Round Number
  81. Set Variable
    WindSpeed
  82. If
  83. Text
  84. Set Variable
    WindUnit
  85. If
  86. Text
  87. Set Variable
    WindUnit
  88. If
  89. Get Variable
  90. Round Number
  91. Set Variable
    WindSpeed
  92. If
  93. Text
  94. Set Variable
    WindUnit
  95. If
  96. Text
  97. Set Variable
    WindUnit
  98. Text
  99. Set Variable
    WindPhrase
  100. If
  101. Text
  102. Set Variable
    WindPhrase
  103. Comment
    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.
  104. Count
  105. If
  106. Round Number
  107. Set Variable
    Temperature
  108. If
  109. Text
  110. Set Variable
    TempPhrase
  111. If
  112. If
  113. Text
  114. Set Variable
    TempPhrase
  115. If
  116. Text
  117. Set Variable
    TempPhrase
  118. Round Number
  119. Set Variable
    FeelsLike
  120. If
  121. Text
  122. Set Variable
    FeelsLikePhrase
  123. If
  124. Text
  125. Set Variable
    FeelsLikePhrase
  126. If
  127. Text
  128. Set Variable
    TempPhrase
  129. Comment
    This section determines the humidity and dew point phrase, if either are given.
  130. Count
  131. If
  132. If
  133. Calculate
  134. Set Variable
    AdjustedHumidity
  135. If
  136. Set Variable
    AdjustedHumidity
  137. Count
  138. If
  139. Text
  140. Set Variable
    DewpointPhrase
  141. If
  142. Round Number
  143. Set Variable
    Dewpoint
  144. If
  145. Text
  146. Set Variable
    DewpointPhrase
  147. If
  148. If
  149. Text
  150. Set Variable
    DewpointPhrase
  151. If
  152. Text
  153. Set Variable
    DewpointPhrase
  154. Text
  155. Set Variable
    HumidityPhrase
  156. If
  157. Text
  158. Set Variable
    HumidityPhrase
  159. Comment
    This section sets the Visibility phrase.
  160. Count
  161. If
  162. Get Dictionary Value
  163. If
  164. Round Number
  165. Set Variable
    Visibility
  166. If
  167. Text
  168. Set Variable
    VisibilityPhrase
  169. If
  170. Text
  171. Set Variable
    VisibilityPhrase
  172. If
  173. Round Number
  174. Set Variable
    Visibility
  175. If
  176. Text
  177. Set Variable
    VisibilityPhrase
  178. If
  179. Text
  180. Set Variable
    VisibilityPhrase
  181. If
  182. Text
  183. Set Variable
    VisibilityPhrase
  184. Comment
    This section rounds off the current Precipitation Amount and sets the Precipitation Chance phrase to use.
  185. Get Dictionary Value
  186. If
  187. Format Number
  188. Set Variable
    PrecipitationAmount
  189. Text
  190. Set Variable
    Precipitation
  191. If
  192. Format Number
  193. Set Variable
    PrecipitationAmount
  194. Text
  195. Set Variable
    Precipitation
  196. If
  197. Calculate
  198. Set Variable
    AdjustedPrecipChance
  199. If
  200. Set Variable
    AdjustedPrecipChance

Ver como código
Beta

Todas las acciones de este atajo escritas en Cherri, un lenguaje de programación para Atajos. Ideal para aprender cómo funciona.

#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()
}
Descompilado con cherri 2.3.0 (GPL-2.0). Puede que necesite pequeños ajustes antes de compilarse.

Valoraciones y reseñas

Escribe una reseña
–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aún no hay reseñas. ¡Sé el primero en compartir tu opinión!

Publicidad

También te puede gustar

Ver todo
Publicidad