protocol Automation : BaseAutomation, CustomAppDataSupportingThe main representation of an automation, containing metadata fields as well as the automation
graph containing automation nodes, including Starter, Condition, and Action
instances, and more.
-
Indicates whether or not the automation is valid. Users are able to save incomplete automations with non-blocking errors.
Declaration
Swift
var isValid: Bool { get } -
Indicates whether or not the automation is currently running.
Declaration
Swift
var isRunning: Bool { get } -
List of Validation Issues.
Declaration
Swift
var validationIssues: [AutomationValidationIssue] { get } -
Whether the automation can be manually executed.
Set to true if both of the following conditions are true:
- The
Automationis valid. - automationGraph contains a
ManualStarternode.- In some cases, the platform determines the automation can be implicitly manually executed
without a
ManualStarternode.
- In some cases, the platform determines the automation can be implicitly manually executed
without a
Declaration
Swift
var manuallyExecutable: Bool { get } - The
-
Whether the underlying automation data is compatible with the current SDK. Set to
trueif the automationGraph doesn’t contain any fields that are unknown to the current SDK.Declaration
Swift
var compatibleWithSdk: Bool { get } -
Executes the automation.
Throws
HomeErrorif execution fails.Declaration
Swift
func execute() async throws -
Stops the automation.
Throws
HomeErrorif execution stop fails.Declaration
Swift
func stop() async throws -
Performs an update on the automation.
Declaration
Swift
func update(_ block: (MutableAutomationData) -> Void) async throws -> any AutomationParameters
block- A closure that receives an instance of
MutableAutomationDatato make desired updates.Return Value
An automation with the applied updates.