Name

action await sun, actionawaitsun, kPMActionActionAwaitSun — Wait for a specific sun observation to occur.

Synopsis

action await sun structure { type, at, geolocation, offset, availability, scatter, quiet, drift };
type : string, choice
at : string, choice, default
geolocation : geolocation structure
offset : integer, default, optional, range -86400..86400
availability : string, choice, optional
scatter : integer, default, optional, range 60..43200
quiet : boolean, default, optional
drift : integer, default, optional, range 1..86400

Description

Wait for a specific sun observation to occur.

The next action will not be performed until a predicted sun observation occurs.

Fields

type. Type of action to perform.

type is a string. type must be await sun, kPMActionType_AwaitSun.

at. Astronomical Sun event to calculate.

at is a string. If at is omitted, the default sunrise is used. at must be one of the following ten constants:

  • night end, kPMActionAt_NightEnd.
  • nautical dawn, kPMActionAt_NauticalDawn.
  • dawn, kPMActionAt_Dawn.
  • sunrise, kPMActionAt_Sunrise.
  • sunrise limit, kPMActionAt_SunriseLimit.
  • sunset limit, kPMActionAt_SunsetLimit.
  • sunset, kPMActionAt_Sunset.
  • dusk, kPMActionAt_Dusk.
  • nautical dusk, kPMActionAt_NauticalDusk.
  • night begin, kPMActionAt_NightBegin.

geolocation. Location to calculate Sun position from.

geolocation is a geolocation structure.

offset. Offset from the calculated astronomical event.

Useful for creating triggers to occur some time before an astronomical event.

offset is an integer. If offset is omitted, the default -1800 is used. offset is optional. offset must be between -86400 and 86400, inclusive.

availability. Should the host be made available for this trigger.

availability is a string. availability is optional. availability must be one of the following three constants:

  • wake up, kPMActionAvailability_WakeUp.
  • power on, kPMActionAvailability_PowerOn.
  • power on or wake up, kPMActionAvailability_PowerOnOrWakeUp.

scatter. Scatter the date.

scatter is an integer. If scatter is omitted, the default 300 is used. scatter is optional. scatter must be between 60 and 43200, inclusive.

quiet. Minimise the notifications.

quiet is a boolean. If quiet is omitted, the default false is used. quiet is optional.

drift. Acceptable drift.

drift is an integer. If drift is omitted, the default 120 is used. drift is optional. drift must be between 1 and 86400, inclusive.