I have a blueprint script that controls different light senario based on variables sent from HMI or automation. This is working fine but, when I try to add a service to one of the sequence it fails:
blueprint:
name: Generell Lyskontroll
description: En generell blueprint for lyskontroll.
domain: script
input:
rommodus:
name: "Rommodus"
description: Velg hvilket rom skriptet gjelder for
default: []
selector:
entity:
domain: input_select
lys_auto:
name: "Lys i auto"
description: "Trigges av: action == 'Auto' or action_automasjon == 'auto'. Ingen avhengigheter"
default: []
selector:
action:
lys_av:
name: "Lys i av"
description: "Trigges av: action == 'Av' or action_automasjon == 'av' or action == 'Av (Auto)'. Ingen avhengigheter"
default: []
selector:
action:
lys_avnatt:
name: "Lys i avnatt"
description: "Trigges av: action_automasjon == 'avnatt' or action == 'Natt (Auto)'. Ingen avhengigheter, skal brukes for å sette gjestemodus og barnemodus i ulike senarioer."
default: []
selector:
action:
lys_maks:
name: "Lys i maks"
description: "Trigges av: action == 'Maks' or action_automasjon == 'maks'. Ingen avhengigheter"
default: []
selector:
action:
lys_kos:
name: "Lys i kos"
description: "Trigges av: action == 'Kos' or action_automasjon == 'kos'. Ingen avhengigheter"
default: []
selector:
action:
mode: single
sequence:
- variables:
action: "{{ action }}"
action_automasjon: "{{ action_automasjon }}"
- choose:
- conditions:
- condition: template
value_template: "{{ action == 'Auto' or action_automasjon == 'auto' }}"
sequence: !input lys_auto
- conditions:
- condition: template
value_template: "{{ action == 'Av' or action_automasjon == 'av' or action == 'Av (Auto)' }}"
sequence: !input lys_av
- conditions:
- condition: template
value_template: "{{ action_automasjon == 'avnatt' or action == 'Natt (Auto)' }}"
sequence:
- !input lys_avnatt
- service: input_select.select_option
target: !input rommodus
data:
option: "Auto"
- conditions:
- condition: template
value_template: "{{ action_automasjon == 'maks' or action == 'Maks' }}"
sequence: !input lys_maks
- conditions:
- condition: template
value_template: "{{ action_automasjon == 'kos' or action == 'Kos' }}"
sequence: !input lys_kos
This is working fine:
- conditions:
- condition: template
value_template: "{{ action == 'Av' or action_automasjon == 'av' or action == 'Av (Auto)' }}"
sequence: !input lys_av
This is not:
- conditions:
- condition: template
value_template: "{{ action_automasjon == 'avnatt' or action == 'Natt (Auto)' }}"
sequence:
- !input lys_avnatt
- service: input_select.select_option
target: !input rommodus
data:
option: "Auto"
Following error: Message malformed: expected a dictionary for dictionary value @ data[‘sequence’][1][‘choose’][2][‘sequence’][1][‘target’]