I’m implementing fields in a script to make a master notification script. User a select selector to choose which notification method to use. This works fine until I use multiple: true
. I see when using this, it is formatted as a list. But nowhere can I find how to use that in my condition template. What do I need to do to make this work when using mutliple?
alias: Notifier Master
sequence:
- if:
- condition: template
value_template: "{{ (msg_notifers) == 'AlexaTTS' }}"
then:
- parallel:
- action: notify.alexa_media_office_echo
metadata: {}
data:
message: "{{ msg_text }}"
- action: notify.alexa_media_kitchen_echo
metadata: {}
data:
message: "{{ msg_text }}"
- action: notify.alexa_media_garage_echo
metadata: {}
data:
message: "{{ msg_text }}"
- action: notify.alexa_media_master_bedroom_echo_dot
metadata: {}
data:
message: "{{ msg_text }}"
alias: TTS on all Alexa devices
alias: Alexa TTS
- if:
- condition: template
value_template: "{{ (msg_notifers) == 'Pushover' }}"
then:
- action: notify.pushover
metadata: {}
data:
message: msg_text
title: msg_title
alias: Pushover
fields:
msg_text:
selector:
text: null
name: Message Text
description: Text of the message
msg_title:
selector:
text: null
name: Message Title
msg_notifers:
selector:
select:
options:
- AppPush
- AppTTS
- Pushover
- AlexaTTS
multiple: false
description: Select which notifications methods to use
name: Notifiers
required: true
description: ""
icon: mdi:microphone-message