having an issue with a script i am writing that gets disabled in HA with this error:
Script with alias 'BETA - UNIFIED NOTIFICATION SCRIPT' could not be validated and has been disabled: expected dictionary @ data['sequence'][13]['choose'][0]['sequence'][0]. Got '{'
the error happens at this sequence step where i am triggering selected actions based on response from the notification:
# SEQUENCE 13
- alias: "Run the actions"
default: []
choose:
- alias: "Trigger: Timeout"
conditions: "{{ user_response.result == 'timeout' }}"
sequence: "{{ timeout_actions }}"
- alias: "Trigger: first_option"
conditions: "{{ user_response.result == 'option_one' }}"
sequence: "{{ option_one_actions }}"
- alias: "Trigger: second_option"
conditions: "{{ user_response.result == 'option_two' }}"
sequence: "{{ option_two_actions }}"
- alias: "Trigger: third_option"
conditions: "{{ user_response.result == 'option_three' }}"
sequence: "{{ option_three_actions }}"
the actions are fields
defined in the script like:
confirm_action:
name: "Option 1 - Action"
description: "Action for Opt 1"
default: []
selector:
action:
and i have a check to see if they are empty in some building blocks in the sequence that set them to an empty dictionary if nothing is chosen:
# SEQUENCE 6
- alias: Option 1 Settings
variables:
option_one_actions: "{{ iif(confirm_action is defined, confirm_action, {}) }}"
am i missing something obvious on how to pass an action to the sequence?