@espressif/rainmaker-base-cdf
    Preparing search index...

    Class ESPAutomation

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

    Implements

    Index

    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

    • Deletes the automation from the system.

      Returns Promise<ESPAPIResponse>

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

      If the automation ID is missing or invalid.

    • Updates the enabled status of an existing automation.

      Parameters

      • enabled: boolean

        The new enabled status for the automation.

      Returns Promise<ESPAPIResponse>

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

    • 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.

    • Updates an existing automation with new details.

      Parameters

      Returns Promise<ESPAPIResponse>

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

    • Updates the actions of an existing automation.

      Parameters

      • actions: ESPAutomationAction[]

        An array of action objects defining the actions to be performed when the automation is triggered.

      Returns Promise<ESPAPIResponse>

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

    • Updates the location of an existing automation.

      Parameters

      Returns Promise<ESPAPIResponse>

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

    • Updates the name of an existing automation.

      Parameters

      • name: string

        The new name for the automation.

      Returns Promise<ESPAPIResponse>

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