ReferenceScripting APIMotionWeather
MotionWeather
interfaceThe weather where the desktop is (scene.weather), as a Weather layer shows it. What the desktop doesn't say is null, but rain and cloud come from the conditions and daylight from the sunrise and sunset or the clock.
| Name | MotionWeather |
|---|---|
| Kind | interface |
| Script reaches it as | MotionScene.weather · MotionScene.weatherAt() · MotionEvents.weather |
| Since | 0.3 |
Syntax
interface MotionWeather { … }Properties
| Name | Type | Description |
|---|---|---|
knownproperty | readonly boolean | Whether the desktop said what the weather is. |
conditionproperty | readonly "clear" | "partly" | "cloudy" | "fog" | "drizzle" | "rain" | "storm" | "snow" | "sleet" | "wind" | null | What it's like: clear, partly, cloudy, fog, drizzle, rain, storm, snow, sleet or wind; null when not known. |
temperatureproperty | readonly number | null | The temperature, °C, or null. |
windproperty | readonly number | null | The wind, km/h, or null. |
rainproperty | readonly number | How hard it rains: 0 dry to 1 pouring. |
cloudproperty | readonly number | How cloudy it is: 0 clear to 1 overcast. |
daylightproperty | readonly number | How light it is: 0 at night to 1 at midday, from the sunrise and sunset. |
highproperty | readonly number | null | Today's highest, °C, or null. |
lowproperty | readonly number | null | Today's lowest, °C, or null. |
placeproperty | readonly string | The place it's for, as named. |
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.