Hello all,
Below is my current code. Can someone here help me with the default area based on the criteria below? Thank you all for your help.
I would like to have the default option ALWAYS send the message to the notify.family service but I would also like the default option to send the message to the “notify.tvs” service (I have created a notify group with my tvs in it called “notify.tvs”). BUT I would like the “notify.tvs” to ONLY send the message to the tvs if the helper called “input_boolean.text_notifications_tvs” is set to “on”.
text_notify:
sequence:
- condition: state
entity_id: input_boolean.text_notifications
state: 'on'
- choose:
- conditions:
- condition: template
value_template: '{{ who == "weston"}}'
- condition: state
entity_id: input_boolean.text_notifications_weston
state: 'on'
sequence:
- service: notify.weston
data:
title: '{{ title }}'
message: '{{ message }}'
- conditions:
- condition: template
value_template: '{{ who == "clarice"}}'
- condition: state
entity_id: input_boolean.text_notifications_clarice
state: 'on'
sequence:
- service: notify.clarice
data:
title: '{{ title }}'
message: '{{ message }}'
- conditions:
- condition: template
value_template: '{{ who == "parents"}}'
- condition: state
entity_id: input_boolean.text_notifications_parents
state: 'on'
- service: notify.parents_ios
data:
title: '{{ title }}'
message: '{{ message }}'
default:
- service: notify.family
data:
title: '{{ title }}'
message: '{{ message }}'