Class representing an automation in the ESP RainMaker system. This class implements the ESPAutomationInterface.

Implements

Constructors

Properties

The list of actions to be performed when the automation is triggered.

automationId: string

The unique identifier of the automation.

automationName: string

The name of the automation.

enabled: boolean

Indicates whether the automation is currently enabled.

The operator used to combine multiple events (AND/OR).

events: (
    | ESPAutomationEvent
    | ESPWeatherEvent
    | ESPWeatherCondition
    | ESPDaylightEvent
)[]

The list of events that trigger this automation.

The type of events that trigger this automation.

The geographical coordinates for weather/daylight based automations.

metadata?: any

Additional metadata associated with the automation.

nodeId?: string

The ID of the node associated with this automation.

region?: string

The region for weather/daylight based automations.

retrigger?: boolean

Indicates whether the automation should be retriggered after completion.

Methods

  • Updates the retrigger option of an existing automation.

    Parameters

    • retrigger: boolean

      A boolean indicating whether the automation can be triggered more than once while the conditions are met.

    Returns Promise<ESPAPIResponse>

    A promise that resolves to the API response after successful update.