Docs »

Automations »

Commands »

outcome

The outcome: command makes a sequence of commands conditional. Each outcome must have a unique name.

Key  
if@bool: This key should resolve to a yes or no value to determine whether this outcome is desirable.
then: If this outcome matches, the commands to run.

Syntax



start:
  outcome/weekend:
    if@bool: {{'now'|date('l') in ['Saturday','Sunday']}}
    then:
      return:
        output: It is the weekend.


Multiple outcomes can be grouped in a decision command. The first matching outcome is used.